Skip to content
Newer
Older
100644 90 lines (79 sloc) 2.92 KB
37e0d1f @ntrel Move GeanyDocument GUI elements and saved_encoding to private
ntrel authored
1 /*
df328e4 @ntrel Fix file header notice, copyright, Id string.
ntrel authored
2 * document-private.h - this file is part of Geany, a fast and lightweight IDE
37e0d1f @ntrel Move GeanyDocument GUI elements and saved_encoding to private
ntrel authored
3 *
1c2c455 @b4n Update copyright information
b4n authored
4 * Copyright 2008-2012 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5 * Copyright 2008-2012 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
37e0d1f @ntrel Move GeanyDocument GUI elements and saved_encoding to private
ntrel authored
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
d80bc7c @b4n Update FSF address
b4n authored
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
37e0d1f @ntrel Move GeanyDocument GUI elements and saved_encoding to private
ntrel authored
20 */
21
22
23 #ifndef GEANY_DOCUMENT_PRIVATE_H
24 #define GEANY_DOCUMENT_PRIVATE_H
25
de3d3b4 @eht16 Add document_save_file_as and document_rename_file to the plugin API.
eht16 authored
26
37e0d1f @ntrel Move GeanyDocument GUI elements and saved_encoding to private
ntrel authored
27 /* available UNDO actions, UNDO_SCINTILLA is a pseudo action to trigger Scintilla's
28 * undo management */
29 enum
30 {
31 UNDO_SCINTILLA = 0,
32 UNDO_ENCODING,
33 UNDO_BOM,
34 UNDO_ACTIONS_MAX
35 };
36
de3d3b4 @eht16 Add document_save_file_as and document_rename_file to the plugin API.
eht16 authored
37 typedef enum
38 {
39 FILE_OK,
7067b84 @eht16 Rework the GIO based file monitoring code.
eht16 authored
40 FILE_CHANGED, /* also valid for deleted files */
de3d3b4 @eht16 Add document_save_file_as and document_rename_file to the plugin API.
eht16 authored
41 FILE_IGNORE
42 }
43 FileDiskStatus;
44
37e0d1f @ntrel Move GeanyDocument GUI elements and saved_encoding to private
ntrel authored
45
46 typedef struct FileEncoding
47 {
48 gchar *encoding;
49 gboolean has_bom;
46cae47 @ntrel Use GeanyDocumentPrivate instead of using inheritance for non-public
ntrel authored
50 }
51 FileEncoding;
37e0d1f @ntrel Move GeanyDocument GUI elements and saved_encoding to private
ntrel authored
52
53
46cae47 @ntrel Use GeanyDocumentPrivate instead of using inheritance for non-public
ntrel authored
54 /* Private GeanyDocument fields */
55 typedef struct GeanyDocumentPrivate
37e0d1f @ntrel Move GeanyDocument GUI elements and saved_encoding to private
ntrel authored
56 {
57 /* GtkLabel shown in the notebook header. */
58 GtkWidget *tab_label;
b25980b @eht16 Small corrections to some API docs.
eht16 authored
59 /* GtkTreeView object for this document within the Symbols treeview of the sidebar. */
37e0d1f @ntrel Move GeanyDocument GUI elements and saved_encoding to private
ntrel authored
60 GtkWidget *tag_tree;
b25980b @eht16 Small corrections to some API docs.
eht16 authored
61 /* GtkTreeStore object for this document within the Symbols treeview of the sidebar. */
37e0d1f @ntrel Move GeanyDocument GUI elements and saved_encoding to private
ntrel authored
62 GtkTreeStore *tag_store;
b25980b @eht16 Small corrections to some API docs.
eht16 authored
63 /* Iter for this document within the Open Files treeview of the sidebar. */
37e0d1f @ntrel Move GeanyDocument GUI elements and saved_encoding to private
ntrel authored
64 GtkTreeIter iter;
65 /* Used by the Undo/Redo management code. */
66 GTrashStack *undo_actions;
67 /* Used by the Undo/Redo management code. */
68 GTrashStack *redo_actions;
69 /* Used so Undo/Redo works for encoding changes. */
70 FileEncoding saved_encoding;
153544a @eht16 Add utils_is_remote_path().
eht16 authored
71 gboolean colourise_needed; /* use document.c:queue_colourise() instead */
72 gint line_count; /* Number of lines in the document. */
73 gint symbol_list_sort_mode;
7067b84 @eht16 Rework the GIO based file monitoring code.
eht16 authored
74 /* indicates whether a file is on a remote filesystem, works only with GIO/GVfs */
153544a @eht16 Add utils_is_remote_path().
eht16 authored
75 gboolean is_remote;
7067b84 @eht16 Rework the GIO based file monitoring code.
eht16 authored
76 /* File status on disk of the document */
de3d3b4 @eht16 Add document_save_file_as and document_rename_file to the plugin API.
eht16 authored
77 FileDiskStatus file_disk_status;
78 /* Reference to a GFileMonitor object, only used when GIO file monitoring is used. */
79 gpointer monitor;
80 /* Time of the last disk check, only used when legacy file monitoring is used. */
81 time_t last_check;
82 /* Modification time of the document on disk, only used when legacy file monitoring is used. */
83 time_t mtime;
ec4a5ea @b4n Make sure to update the tag list only for the current document
b4n authored
84 /* ID of the idle callback updating the tag list */
85 guint tag_list_update_source;
de3d3b4 @eht16 Add document_save_file_as and document_rename_file to the plugin API.
eht16 authored
86 }
46cae47 @ntrel Use GeanyDocumentPrivate instead of using inheritance for non-public
ntrel authored
87 GeanyDocumentPrivate;
37e0d1f @ntrel Move GeanyDocument GUI elements and saved_encoding to private
ntrel authored
88
89 #endif
Something went wrong with that request. Please try again.