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)  

pluginprivate.h
Go to the documentation of this file.
1/*
2 * pluginprivate.h - this file is part of Geany, a fast and lightweight IDE
3 *
4 * Copyright 2009 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_PLUGIN_PRIVATE_H
23#define GEANY_PLUGIN_PRIVATE_H 1
24
25#include "plugindata.h"
26#include "ui_utils.h" /* GeanyAutoSeparator */
27#include "keybindings.h" /* GeanyKeyGroup */
28
29
30G_BEGIN_DECLS
31
32typedef struct SignalConnection
33{
34 GObject *object;
35 gulong handler_id;
36}
38
39typedef enum _LoadedFlags {
40 LOADED_OK = 0x01,
41 IS_LEGACY = 0x02,
42 LOAD_DATA = 0x04,
43}
45
46typedef struct GeanyPluginPrivate Plugin; /* shorter alias */
47
48typedef struct GeanyPluginPrivate
49{
50 gchar *filename; /* plugin filename (/path/libname.so) */
51 PluginInfo info; /* plugin name, description, etc */
52 GeanyPlugin public; /* fields the plugin can read */
53
54 GeanyPluginFuncs cbs; /* Callbacks set by geany_plugin_register() */
55 void (*configure_single) (GtkWidget *parent); /* plugin configure dialog, optional and deprecated */
56
57 /* extra stuff */
60 GeanyAutoSeparator toolbar_separator;
61 GArray *signal_ids; /* SignalConnection's to disconnect when unloading */
62 GList *sources; /* GSources to destroy when unloading */
63
64 gpointer cb_data; /* user data passed back to functions in GeanyPluginFuncs */
65 GDestroyNotify cb_data_destroy; /* called when the plugin is unloaded, for cb_data */
66 LoadedFlags flags; /* bit-or of LoadedFlags */
67
68 /* proxy plugin support */
70 Plugin *proxy; /* The proxy that handles this plugin */
71 gpointer proxy_data; /* Data passed to the proxy hooks of above proxy, so
72 * this gives the proxy a pointer to each plugin */
73 gint proxied_count; /* count of active plugins this provides a proxy for
74 * (a count because of possibly nested proxies) */
75}
77
78#define PLUGIN_LOADED_OK(p) (((p)->flags & LOADED_OK) != 0)
79#define PLUGIN_IS_LEGACY(p) (((p)->flags & IS_LEGACY) != 0)
80#define PLUGIN_HAS_LOAD_DATA(p) (((p)->flags & LOAD_DATA) != 0)
81
82void plugin_watch_object(Plugin *plugin, gpointer object);
83void plugin_make_resident(Plugin *plugin);
84gpointer plugin_get_module_symbol(Plugin *plugin, const gchar *sym);
85
86G_END_DECLS
87
88#endif /* GEANY_PLUGIN_PRIVATE_H */
Configurable keyboard shortcuts.
This file defines the plugin API, the interface between Geany and its plugins.
void plugin_watch_object(Plugin *plugin, gpointer object)
Definition: plugins.c:780
gpointer plugin_get_module_symbol(Plugin *plugin, const gchar *sym)
Definition: plugins.c:834
void plugin_make_resident(Plugin *plugin)
Definition: plugins.c:821
_LoadedFlags
Definition: pluginprivate.h:39
@ LOADED_OK
Definition: pluginprivate.h:40
@ LOAD_DATA
Definition: pluginprivate.h:42
@ IS_LEGACY
Definition: pluginprivate.h:41
struct GeanyPluginPrivate GeanyPluginPrivate
struct SignalConnection SignalConnection
enum _LoadedFlags LoadedFlags
Callback functions that need to be implemented for every plugin.
Definition: plugindata.h:296
GeanyKeyGroup * key_group
Definition: pluginprivate.h:59
void(* configure_single)(GtkWidget *parent)
Definition: pluginprivate.h:55
LoadedFlags flags
Definition: pluginprivate.h:66
GeanyPluginFuncs cbs
Definition: pluginprivate.h:54
GeanyProxyFuncs proxy_cbs
Definition: pluginprivate.h:69
PluginFields fields
Definition: pluginprivate.h:58
GeanyAutoSeparator toolbar_separator
Definition: pluginprivate.h:60
GDestroyNotify cb_data_destroy
Definition: pluginprivate.h:65
Basic information for the plugin and identification.
Definition: plugindata.h:233
Hooks that need to be implemented by every proxy.
Definition: plugindata.h:390
Basic information about a plugin available to Geany without loading the plugin.
Definition: plugindata.h:95
GObject * object
Definition: pluginprivate.h:34
User Interface general utility functions.