1 /* edit.h - editor public API
3 Copyright (C) 1996, 1997, 2009 Free Software Foundation, Inc.
5 Authors: 1996, 1997 Paul Sheer
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 * \brief Header: editor public API
28 * \author Andrew Borodin
35 #include "../src/global.h" /* PATH_SEP_STR */
39 typedef struct WEdit WEdit
;
41 #define EDIT_KEY_EMULATION_NORMAL 0
42 #define EDIT_KEY_EMULATION_EMACS 1
43 #define EDIT_KEY_EMULATION_USER 2
45 extern int option_word_wrap_line_length
;
46 extern int option_typewriter_wrap
;
47 extern int option_auto_para_formatting
;
48 extern int option_tab_spacing
;
49 extern int option_fill_tabs_with_spaces
;
50 extern int option_return_does_auto_indent
;
51 extern int option_backspace_through_tabs
;
52 extern int option_fake_half_tabs
;
53 extern int option_persistent_selections
;
54 extern int option_cursor_beyond_eol
;
55 extern int option_line_state
;
56 extern int option_save_mode
;
57 extern int option_save_position
;
58 extern int option_syntax_highlighting
;
59 extern char *option_backup_ext
;
61 /* what editor are we going to emulate? */
62 extern int edit_key_emulation
;
64 extern int edit_confirm_save
;
66 extern int visible_tabs
;
67 extern int visible_tws
;
69 extern int simple_statusbar
;
72 void edit_stack_init (void);
73 void edit_stack_free (void);
75 int edit_file (const char *_file
, int line
);
77 const char *edit_get_file_name (const WEdit
*edit
);
78 int edit_get_curs_col (const WEdit
*edit
);
79 const char *edit_get_syntax_type (const WEdit
*edit
);
81 /* editor home directory */
82 #define EDIT_DIR ".mc" PATH_SEP_STR "cedit"
85 #define EDIT_SYNTAX_FILE EDIT_DIR PATH_SEP_STR "Syntax"
86 #define EDIT_CLIP_FILE EDIT_DIR PATH_SEP_STR "cooledit.clip"
87 #define EDIT_MACRO_FILE EDIT_DIR PATH_SEP_STR "cooledit.macros"
88 #define EDIT_BLOCK_FILE EDIT_DIR PATH_SEP_STR "cooledit.block"
89 #define EDIT_TEMP_FILE EDIT_DIR PATH_SEP_STR "cooledit.temp"
91 #define EDIT_GLOBAL_MENU "cedit.menu"
92 #define EDIT_LOCAL_MENU ".cedit.menu"
93 #define EDIT_HOME_MENU EDIT_DIR PATH_SEP_STR "menu"
95 #endif /* MC_EDIT_H */