Store "equal" tags into binary trees instead of lists in Symbol tree
[geany-mirror.git] / src / pluginprivate.h
blobabaa44e06d9afcf282fc8f9cb41be4d52cd1bd06
1 /*
2 * pluginprivate.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2009-2012 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
5 * Copyright 2009-2012 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
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 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.
23 #ifndef GEANY_PLUGIN_PRIVATE_H
24 #define GEANY_PLUGIN_PRIVATE_H 1
26 #include "plugindata.h"
27 #include "ui_utils.h" /* GeanyAutoSeparator */
28 #include "keybindings.h" /* GeanyKeyGroup */
30 #include "gtkcompat.h"
33 G_BEGIN_DECLS
35 typedef struct SignalConnection
37 GObject *object;
38 gulong handler_id;
40 SignalConnection;
42 typedef enum _LoadedFlags {
43 LOADED_OK = 0x01,
44 IS_LEGACY = 0x02,
45 LOAD_DATA = 0x04,
47 LoadedFlags;
49 typedef struct GeanyPluginPrivate Plugin; /* shorter alias */
51 typedef struct GeanyPluginPrivate
53 gchar *filename; /* plugin filename (/path/libname.so) */
54 PluginInfo info; /* plugin name, description, etc */
55 GeanyPlugin public; /* fields the plugin can read */
57 GeanyPluginFuncs cbs; /* Callbacks set by geany_plugin_register() */
58 void (*configure_single) (GtkWidget *parent); /* plugin configure dialog, optional and deprecated */
60 /* extra stuff */
61 PluginFields fields;
62 GeanyKeyGroup *key_group;
63 GeanyAutoSeparator toolbar_separator;
64 GArray *signal_ids; /* SignalConnection's to disconnect when unloading */
65 GList *sources; /* GSources to destroy when unloading */
67 gpointer cb_data; /* user data passed back to functions in GeanyPluginFuncs */
68 GDestroyNotify cb_data_destroy; /* called when the plugin is unloaded, for cb_data */
69 LoadedFlags flags; /* bit-or of LoadedFlags */
71 /* proxy plugin support */
72 GeanyProxyFuncs proxy_cbs;
73 Plugin *proxy; /* The proxy that handles this plugin */
74 gpointer proxy_data; /* Data passed to the proxy hooks of above proxy, so
75 * this gives the proxy a pointer to each plugin */
76 gint proxied_count; /* count of active plugins this provides a proxy for
77 * (a count because of possibly nested proxies) */
79 GeanyPluginPrivate;
81 #define PLUGIN_LOADED_OK(p) (((p)->flags & LOADED_OK) != 0)
82 #define PLUGIN_IS_LEGACY(p) (((p)->flags & IS_LEGACY) != 0)
83 #define PLUGIN_HAS_LOAD_DATA(p) (((p)->flags & LOAD_DATA) != 0)
85 void plugin_watch_object(Plugin *plugin, gpointer object);
86 void plugin_make_resident(Plugin *plugin);
87 gpointer plugin_get_module_symbol(Plugin *plugin, const gchar *sym);
89 G_END_DECLS
91 #endif /* GEANY_PLUGIN_PRIVATE_H */