(vfs_strip_suffix_from_filename): refactoring.
[midnight-commander.git] / src / viewer / mcviewer.h
blobe377f12c35ce7f2f154ec5ab692f3c0f49f948e6
1 /** \file mcviewer.h
2 * \brief Header: internal file viewer
3 */
5 #ifndef MC__VIEWER_H
6 #define MC__VIEWER_H
8 #include "lib/global.h"
10 /*** typedefs(not structures) and defined constants **********************************************/
12 /*** enums ***************************************************************************************/
14 /*** structures declarations (and typedefs of structures)*****************************************/
16 struct WView;
17 typedef struct WView WView;
19 /*** global variables defined in .c file *********************************************************/
21 extern int mcview_default_hex_mode;
22 extern int mcview_default_nroff_flag;
23 extern int mcview_global_wrap_mode;
24 extern int mcview_default_magic_flag;
26 extern int mcview_altered_hex_mode;
27 extern int mcview_altered_magic_flag;
28 extern int mcview_altered_nroff_flag;
30 extern int mcview_remember_file_position;
31 extern int mcview_max_dirt_limit;
33 extern int mcview_mouse_move_pages;
34 extern char *mcview_show_eof;
36 /*** declarations of public functions ************************************************************/
38 /* Creates a new WView object with the given properties. Caveat: the
39 * origin is in y-x order, while the extent is in x-y order. */
40 extern WView *mcview_new (int y, int x, int lines, int cols, gboolean is_panel);
43 /* Shows {file} or the output of {command} in the internal viewer,
44 * starting in line {start_line}.
46 extern gboolean mcview_viewer (const char *command, const vfs_path_t * file_vpath, int start_line,
47 off_t search_start, off_t search_end);
49 extern gboolean mcview_load (WView * view, const char *command, const char *file, int start_line,
50 off_t search_start, off_t search_end);
52 /*** inline functions ****************************************************************************/
53 #endif /* MC__VIEWER_H */