Updated Makefile.am files after make -f git.mk
[anjuta.git] / plugins / symbol-db / plugin.h
blob6e729f40c3f41e32e8bfeb8869c93a683e9093dc
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2 /*
3 * plugin.h
4 * Copyright (C) Massimo Cora' 2007-2008 <maxcvs@email.it>
5 *
6 * plugin.h is free software.
7 *
8 * You may redistribute it and/or modify it under the terms of the
9 * GNU General Public License, as published by the Free Software
10 * Foundation; either version 2 of the License, or (at your option)
11 * any later version.
13 * plugin.h 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.
16 * See the GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with plugin.h. If not, write to:
20 * The Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor
22 * Boston, MA 02110-1301, USA.
25 #ifndef _SYMBOL_DB_H_
26 #define _SYMBOL_DB_H_
28 #include <libanjuta/anjuta-plugin.h>
29 #include <libanjuta/anjuta-launcher.h>
30 #include "symbol-db-engine.h"
33 G_BEGIN_DECLS
35 extern GType symbol_db_get_type (GTypeModule *module);
36 #define ANJUTA_TYPE_PLUGIN_SYMBOL_DB (symbol_db_get_type (NULL))
37 #define ANJUTA_PLUGIN_SYMBOL_DB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_PLUGIN_SYMBOL_DB, SymbolDBPlugin))
38 #define ANJUTA_PLUGIN_SYMBOL_DB_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), ANJUTA_TYPE_PLUGIN_SYMBOL_DB, SymbolDBPluginClass))
39 #define ANJUTA_IS_PLUGIN_SYMBOL_DB(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_PLUGIN_SYMBOL_DB))
40 #define ANJUTA_IS_PLUGIN_SYMBOL_DB_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_PLUGIN_SYMBOL_DB))
41 #define ANJUTA_PLUGIN_SYMBOL_DB_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), ANJUTA_TYPE_PLUGIN_SYMBOL_DB, SymbolDBPluginClass))
44 typedef struct _SymbolDBPlugin SymbolDBPlugin;
45 typedef struct _SymbolDBPluginClass SymbolDBPluginClass;
48 #include "symbol-db-system.h"
49 #include "symbol-db-query.h"
51 /* default value for ctags executable. User must have it installed. This is a
52 * personalized version of ctags for Anjuta.
54 #define CTAGS_PATH PACKAGE_BIN_DIR"/anjuta-tags"
57 typedef struct _PackageScanData {
58 gchar *package_name;
59 gchar *package_version;
60 gint proc_id;
61 gint files_length;
62 gint files_done;
64 } PackageScanData;
66 struct _SymbolDBPlugin {
67 AnjutaPlugin parent;
68 AnjutaUI *ui;
69 GSettings* settings;
71 /* project monitor */
72 guint root_watch_id;
74 /* ui merge */
75 GtkActionGroup *popup_action_group;
76 GtkActionGroup *menu_action_group;
77 gint merge_id;
79 /* preferences */
80 GtkBuilder *prefs_bxml;
82 /* editor monitor */
83 guint buf_update_timeout_id;
84 gboolean need_symbols_update;
85 GTimer *update_timer;
86 GPtrArray *buffer_update_files;
87 GPtrArray *buffer_update_ids;
88 gboolean buffer_update_semaphore; /* it monitors the update status of the
89 * buffer _and_ the editor switching.
90 * A new page cannot be updated with the
91 * new view-locals symbols if a scanning
92 * is in progress
94 guint editor_watch_id;
95 gchar *project_root_uri;
96 gchar *project_root_dir;
97 gchar *project_opened;
98 gboolean needs_sources_scan;
100 /* Symbol's engine connection to database. Instance for local project */
101 SymbolDBEngine *sdbe_project;
103 /* global's one */
104 SymbolDBEngine *sdbe_globals;
105 GAsyncQueue *global_scan_aqueue;
106 PackageScanData *current_pkg_scanned;
109 /* system's population object */
110 SymbolDBSystem *sdbs;
112 GtkWidget *dbv_main; /* symbol main window [gtk_box] */
113 GtkWidget *dbv_notebook; /* main notebook */
114 GtkWidget *dbv_hbox; /* hbox for notebook buttons */
116 GtkWidget *scrolled_global; */ /* symbol view scrolledwindow for global
117 symbols */
119 GtkWidget *tabber;
121 /* GtkWidget *scrolled_locals; */
122 GtkWidget *scrolled_search;
123 GtkWidget *progress_bar_project; /* symbol db progress bar - project */
124 GtkWidget *progress_bar_system; /* symbol db progress bar - system (globals) */
126 GtkTreeModel *file_model; /* File symbols model */
127 GtkWidget *search_entry; /* The search entry box */
128 GtkWidget *pref_tree_view; /* Preferences treeview */
130 /* current editor */
131 GObject *current_editor;
132 GHashTable *editor_connected;
133 GHashTable *editors;
135 /* In session loading? */
136 gboolean session_loading;
138 gint files_count_project;
139 gint files_count_project_done;
141 gint files_count_system;
142 gint files_count_system_done;
143 gchar *current_scanned_package;
145 IAnjutaSymbolQuery *search_query;
147 GTree *proc_id_tree; /* the scan processes'll receive an id from
148 * the symbol engine when scan-end happens.
149 * Track them here */
151 gboolean is_project_importing; /* refreshes or resumes after abort */
152 gboolean is_project_updating; /* makes up to date symbols of the project's files */
153 gboolean is_offline_scanning; /* detects offline changes to makefile.am */
154 gboolean is_adding_element; /* we're adding an element */
157 struct _SymbolDBPluginClass {
158 AnjutaPluginClass parent_class;
160 /* signals */
161 void (* project_import_end) (void);
162 void (* globals_import_end) (void);
168 G_END_DECLS
170 #endif