Fixup various filedefs mappings
[geany-mirror.git] / src / documentprivate.h
blobf4db6ed3fa95fd8e6941e781ad3e561b6e5b6060
1 /*
2 * document-private.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2008-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5 * Copyright 2008-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
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.
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.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 * MA 02110-1301, USA.
24 #ifndef GEANY_DOCUMENT_PRIVATE_H
25 #define GEANY_DOCUMENT_PRIVATE_H
28 /* available UNDO actions, UNDO_SCINTILLA is a pseudo action to trigger Scintilla's
29 * undo management */
30 enum
32 UNDO_SCINTILLA = 0,
33 UNDO_ENCODING,
34 UNDO_BOM,
35 UNDO_ACTIONS_MAX
38 typedef enum
40 FILE_OK,
41 FILE_CHANGED, /* also valid for deleted files */
42 FILE_IGNORE
44 FileDiskStatus;
47 typedef struct FileEncoding
49 gchar *encoding;
50 gboolean has_bom;
52 FileEncoding;
55 /* Private GeanyDocument fields */
56 typedef struct GeanyDocumentPrivate
58 /* GtkLabel shown in the notebook header. */
59 GtkWidget *tab_label;
60 /* GtkTreeView object for this document within the Symbols treeview of the sidebar. */
61 GtkWidget *tag_tree;
62 /* GtkTreeStore object for this document within the Symbols treeview of the sidebar. */
63 GtkTreeStore *tag_store;
64 /* Iter for this document within the Open Files treeview of the sidebar. */
65 GtkTreeIter iter;
66 /* Used by the Undo/Redo management code. */
67 GTrashStack *undo_actions;
68 /* Used by the Undo/Redo management code. */
69 GTrashStack *redo_actions;
70 /* Used so Undo/Redo works for encoding changes. */
71 FileEncoding saved_encoding;
72 gboolean colourise_needed; /* use document.c:queue_colourise() instead */
73 gint line_count; /* Number of lines in the document. */
74 gint symbol_list_sort_mode;
75 /* indicates whether a file is on a remote filesystem, works only with GIO/GVfs */
76 gboolean is_remote;
77 /* File status on disk of the document */
78 FileDiskStatus file_disk_status;
79 /* Reference to a GFileMonitor object, only used when GIO file monitoring is used. */
80 gpointer monitor;
81 /* Time of the last disk check, only used when legacy file monitoring is used. */
82 time_t last_check;
83 /* Modification time of the document on disk, only used when legacy file monitoring is used. */
84 time_t mtime;
85 /* ID of the idle callback updating the tag list */
86 guint tag_list_update_source;
88 GeanyDocumentPrivate;
90 #endif