root/src/editor/edit.h

/* [previous][next][first][last][top][bottom][index][help]  */

INCLUDED FROM


   1 /*
   2    Editor public API
   3  */
   4 
   5 /** \file edit.h
   6  *  \brief Header: editor public API
   7  *  \author Paul Sheer
   8  *  \date 1996, 1997
   9  *  \author Andrew Borodin
  10  *  \date 2009, 2012
  11  */
  12 
  13 #ifndef MC__EDIT_H
  14 #define MC__EDIT_H
  15 
  16 #include "lib/global.h"         /* PATH_SEP_STR */
  17 #include "lib/vfs/vfs.h"        /* vfs_path_t */
  18 
  19 /*** typedefs(not structures) and defined constants **********************************************/
  20 
  21 #define DEFAULT_WRAP_LINE_LENGTH 72
  22 
  23 #define EDIT(x) ((WEdit *)(x))
  24 #define CONST_EDIT(x) ((const WEdit *)(x))
  25 
  26 /*** enums ***************************************************************************************/
  27 
  28 /*** structures declarations (and typedefs of structures)*****************************************/
  29 
  30 /* Editor widget */
  31 struct WEdit;
  32 typedef struct WEdit WEdit;
  33 
  34 typedef struct
  35 {
  36     int word_wrap_line_length;
  37     gboolean typewriter_wrap;
  38     gboolean auto_para_formatting;
  39     gboolean fill_tabs_with_spaces;
  40     gboolean return_does_auto_indent;
  41     gboolean backspace_through_tabs;
  42     gboolean fake_half_tabs;
  43     gboolean persistent_selections;
  44     gboolean drop_selection_on_copy;    /* whether we need to drop selection on copy to buffer */
  45     gboolean cursor_beyond_eol;
  46     gboolean cursor_after_inserted_block;
  47     gboolean state_full_filename;
  48     gboolean line_state;
  49     int line_state_width;
  50     int save_mode;
  51     gboolean confirm_save;      /* queries on a save */
  52     gboolean save_position;
  53     gboolean syntax_highlighting;
  54     gboolean group_undo;
  55     char *backup_ext;
  56     char *filesize_threshold;
  57     char *stop_format_chars;
  58     gboolean visible_tabs;
  59     gboolean visible_tws;
  60     gboolean show_right_margin;
  61     gboolean simple_statusbar;  /* statusbar draw style */
  62     gboolean check_nl_at_eof;
  63 } edit_options_t;
  64 
  65 /*** global variables defined in .c file *********************************************************/
  66 
  67 extern edit_options_t edit_options;
  68 
  69 /*** declarations of public functions ************************************************************/
  70 
  71 /* used in main() */
  72 void edit_stack_init (void);
  73 void edit_stack_free (void);
  74 
  75 gboolean edit_file (const vfs_path_t * file_vpath, long line);
  76 gboolean edit_files (const GList * files);
  77 
  78 const char *edit_get_file_name (const WEdit * edit);
  79 off_t edit_get_cursor_offset (const WEdit * edit);
  80 long edit_get_curs_col (const WEdit * edit);
  81 const char *edit_get_syntax_type (const WEdit * edit);
  82 
  83 /*** inline functions ****************************************************************************/
  84 #endif /* MC__EDIT_H */

/* [previous][next][first][last][top][bottom][index][help]  */