Add support for multi-hotkeys in editor (like a ctrl-x,t).
[pantumic.git] / edit / edit.h
blob04631c755874211caa644176fb1bd0d3fdc49c8e
1 /* edit.h - editor public API
3 Copyright (C) 1996, 1997, 2009 Free Software Foundation, Inc.
5 Authors: 1996, 1997 Paul Sheer
6 2009 Andrew Borodin
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
21 02110-1301, USA.
24 /** \file edit.h
25 * \brief Header: editor public API
26 * \author Paul Sheer
27 * \date 1996, 1997
28 * \author Andrew Borodin
29 * \date 2009
32 #ifndef MC_EDIT_H
33 #define MC_EDIT_H
35 #include "../src/global.h" /* PATH_SEP_STR */
36 #include "../src/fileloc.h"
38 /* Editor widget */
39 struct WEdit;
40 typedef struct WEdit WEdit;
42 #define EDIT_KEY_EMULATION_NORMAL 0
43 #define EDIT_KEY_EMULATION_EMACS 1
44 #define EDIT_KEY_EMULATION_USER 2
46 extern int option_word_wrap_line_length;
47 extern int option_typewriter_wrap;
48 extern int option_auto_para_formatting;
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;
71 /* used in main() */
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 #endif /* MC_EDIT_H */