geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

documentprivate.h
Go to the documentation of this file.
1/*
2 * document-private.h - this file is part of Geany, a fast and lightweight IDE
3 *
4 * Copyright 2008 The Geany contributors
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21
22#ifndef GEANY_DOCUMENT_PRIVATE_H
23#define GEANY_DOCUMENT_PRIVATE_H 1
24
25#include <gtk/gtk.h>
26
27G_BEGIN_DECLS
28
29/* available UNDO actions, UNDO_SCINTILLA is a pseudo action to trigger Scintilla's
30 * undo management */
31enum
32{
39};
40
41typedef struct UndoReloadData
42{
43 guint actions_count; /* How many following undo/redo actions need to be applied. */
44 gint eol_mode; /* End-Of-Line mode before/after reloading. */
45}
47
48typedef enum
49{
51 FILE_CHANGED, /* also valid for deleted files */
55
56
57typedef struct FileEncoding
58{
59 gchar *encoding;
60 gboolean has_bom;
61}
63
64enum
65{
69
71};
72
73/* Private GeanyDocument fields */
75{
76 /* GtkLabel shown in the notebook header. */
77 GtkWidget *tab_label;
78 /* GtkTreeView object for this document within the Symbols treeview of the sidebar. */
79 GtkWidget *tag_tree;
80 /* GtkTreeStore object for this document within the Symbols treeview of the sidebar. */
81 GtkTreeStore *tag_store;
82 /* Indicates whether tag tree has to be updated */
84 /* Iter for this document within the Open Files treeview of the sidebar. */
85 GtkTreeIter iter;
86 /* Used by the Undo/Redo management code. */
87 GTrashStack *undo_actions;
88 /* Used by the Undo/Redo management code. */
89 GTrashStack *redo_actions;
90 /* Used so Undo/Redo works for encoding changes. */
92 gboolean colourise_needed; /* use document.c:queue_colourise() instead */
93 guint keyword_hash; /* hash of keyword string used for typename colourisation */
94 gint line_count; /* Number of lines in the document. */
96 /* indicates whether a file is on a remote filesystem, works only with GIO/GVfs */
97 gboolean is_remote;
98 /* File status on disk of the document */
100 /* Reference to a GFileMonitor object, only used when GIO file monitoring is used. */
101 gpointer monitor;
102 /* Time of the last disk check, only used when legacy file monitoring is used. */
104 /* Modification time of the document on disk, only used when legacy file monitoring is used. */
105 time_t mtime;
106 /* ID of the idle callback updating the tag list */
108 /* Whether it's temporarily protected (read-only and saving needs confirmation). Does
109 * not imply doc->readonly as writable files can be protected */
110 gint protected;
111 /* Save pointer to info bars allowing to cancel them programatically (to avoid multiple ones) */
113 /* Keyed Data List to attach arbitrary data to the document */
114 GData *data;
115}
117
118G_END_DECLS
119
120#endif /* GEANY_DOCUMENT_PRIVATE_H */
FileDiskStatus
@ FILE_CHANGED
@ FILE_IGNORE
@ FILE_OK
@ MSG_TYPE_RELOAD
@ MSG_TYPE_POST_RELOAD
@ NUM_MSG_TYPES
@ MSG_TYPE_RESAVE
@ UNDO_RELOAD
@ UNDO_ENCODING
@ UNDO_SCINTILLA
@ UNDO_BOM
@ UNDO_ACTIONS_MAX
@ UNDO_EOL
struct GeanyDocumentPrivate GeanyDocumentPrivate
struct FileEncoding FileEncoding
struct UndoReloadData UndoReloadData
gboolean has_bom
gchar * encoding
GTrashStack * redo_actions
FileDiskStatus file_disk_status
GtkTreeStore * tag_store
FileEncoding saved_encoding
GTrashStack * undo_actions
GtkWidget * info_bars[NUM_MSG_TYPES]