edit.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* edit.h - editor public API
  2. Copyright (C) 1996, 1997, 2009 Free Software Foundation, Inc.
  3. Authors: 1996, 1997 Paul Sheer
  4. 2009 Andrew Borodin
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  16. 02110-1301, USA.
  17. */
  18. /** \file edit.h
  19. * \brief Header: editor public API
  20. * \author Paul Sheer
  21. * \date 1996, 1997
  22. * \author Andrew Borodin
  23. * \date 2009
  24. */
  25. #ifndef MC_EDIT_H
  26. #define MC_EDIT_H
  27. #include "../src/global.h" /* PATH_SEP_STR */
  28. #include "../src/fileloc.h"
  29. /* Editor widget */
  30. struct WEdit;
  31. typedef struct WEdit WEdit;
  32. extern int option_word_wrap_line_length;
  33. extern int option_typewriter_wrap;
  34. extern int option_auto_para_formatting;
  35. extern int option_fill_tabs_with_spaces;
  36. extern int option_return_does_auto_indent;
  37. extern int option_backspace_through_tabs;
  38. extern int option_fake_half_tabs;
  39. extern int option_persistent_selections;
  40. extern int option_cursor_beyond_eol;
  41. extern int option_line_state;
  42. extern int option_save_mode;
  43. extern int option_save_position;
  44. extern int option_syntax_highlighting;
  45. extern char *option_backup_ext;
  46. extern int edit_confirm_save;
  47. extern int visible_tabs;
  48. extern int visible_tws;
  49. extern int simple_statusbar;
  50. extern int option_check_nl_at_eof;
  51. extern int show_right_margin;
  52. /* used in main() */
  53. void edit_stack_init (void);
  54. void edit_stack_free (void);
  55. int edit_file (const char *_file, int line);
  56. const char *edit_get_file_name (const WEdit *edit);
  57. int edit_get_curs_col (const WEdit *edit);
  58. const char *edit_get_syntax_type (const WEdit *edit);
  59. #endif /* MC_EDIT_H */