WEdit::num_widget_lines and WEdit::num_widget_columns are removed.
[midnight-commander.git] / src / viewer / mcviewer.h
blobdfafa1e35fd6e806d3a1262b724c3786522f7de3
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 struct mcview_struct;
14 typedef enum
16 MCVIEW_EXIT_FAILURE = -1,
17 MCVIEW_EXIT_OK = 0,
18 MCVIEW_WANT_NEXT,
19 MCVIEW_WANT_PREV
20 } mcview_ret_t;
22 /*** enums ***************************************************************************************/
24 /*** structures declarations (and typedefs of structures)*****************************************/
26 /*** global variables defined in .c file *********************************************************/
28 extern int mcview_default_hex_mode;
29 extern int mcview_default_nroff_flag;
30 extern int mcview_global_wrap_mode;
31 extern int mcview_default_magic_flag;
33 extern int mcview_altered_hex_mode;
34 extern int mcview_altered_magic_flag;
35 extern int mcview_altered_nroff_flag;
37 extern int mcview_remember_file_position;
38 extern int mcview_max_dirt_limit;
40 extern int mcview_mouse_move_pages;
41 extern char *mcview_show_eof;
43 /*** declarations of public functions ************************************************************/
45 /* Creates a new mcview_t object with the given properties. Caveat: the
46 * origin is in y-x order, while the extent is in x-y order. */
47 extern struct mcview_struct *mcview_new (int y, int x, int lines, int cols, gboolean is_panel);
50 /* Shows {file} or the output of {command} in the internal viewer,
51 * starting in line {start_line}.
53 extern mcview_ret_t mcview_viewer (const char *command, const char *file, int start_line);
55 extern gboolean mcview_load (struct mcview_struct *, const char *, const char *, int);
57 /*** inline functions ****************************************************************************/
58 #endif /* MC__VIEWER_H */