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)  

pluginsymbols.c
Go to the documentation of this file.
1/*
2 * pluginsymbols.c - 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/* Note: this file is for Doxygen only. */
22
23/**
24 * @file pluginsymbols.c
25 * Symbols declared from within plugins, all of this is <b>deprecated</b>.
26 *
27 * @deprecated This is the legacy way of making plugins for Geany. Refer to @ref howto for the
28 * reworked process and @ref legacy to learn how to port your plugin to that new world.
29 * Meanwhile Geany will still load plugins programmed against this interface (even the items that
30 * are marked deprecated individually such as @ref plugin_fields).
31 *
32 * Geany looks for these symbols (arrays, pointers and functions) when initializing
33 * plugins. Some of them are optional, i.e. they can be omitted; others are required
34 * and must be defined. Some symbols should only be declared using specific macros in
35 * @link plugindata.h @endlink.
36 */
37
38/** Use the PLUGIN_VERSION_CHECK() macro instead. Required by Geany.
39 *
40 * @param abi ABI version Geany was compiled with
41 * @return The API version the plugin was compiled with, or -1 if the plugin is incompatible. */
42gint plugin_version_check(gint abi);
43
44/** Use the PLUGIN_SET_INFO() macro to define it. Required by Geany.
45 * This function is called before the plugin is initialized, so Geany
46 * can read the plugin's name.
47 * @param info The data struct which should be initialized by this function. */
48void plugin_set_info(PluginInfo *info);
49
50/** Basic information about a plugin, which is set in plugin_set_info().
51 * @deprecated Use @ref GeanyPlugin.info instead.*/
53
54/** Basic information for the plugin and identification. */
56
57/** Geany owned data pointers.
58 * Example: @c assert(geany_data->app->configdir != NULL); */
60
61/** Geany owned function pointers, split into groups.
62 * Example: @code #include "geanyfunctions.h"
63 * ...
64 * document_new_file(NULL, NULL, NULL); @endcode
65 * This is equivalent of @c geany_functions->p_document->document_new_file(NULL, NULL, NULL); */
67
68/** Plugin owned fields, including flags.
69 * @deprecated Use @ref ui_add_document_sensitive() instead.*/
71
72/** An array for connecting GeanyObject events, which should be terminated with
73 * @c {NULL, NULL, FALSE, NULL}. See @link pluginsignals.c Signal documentation @endlink.
74 * @see plugin_signal_connect(). */
76
77/** Plugins must use the PLUGIN_KEY_GROUP() macro to define it.
78 * To setup a variable number of keybindings, e.g. based on the
79 * plugin's configuration file settings, use plugin_set_key_group() instead. */
80KeyBindingGroup *plugin_key_group;
81
82
83/** Called before showing the plugin preferences dialog for multiple plugins.
84 * Can be omitted when not needed.
85 * The dialog will show all plugins that support this symbol together.
86 * @param dialog The plugin preferences dialog widget - this should only be used to
87 * connect the @c "response" signal. If settings should be read from the dialog, the
88 * response will be either @c GTK_RESPONSE_OK or @c GTK_RESPONSE_APPLY.
89 *
90 * @return @transfer{floating} A container widget holding preference widgets.
91 *
92 * @note Using @link stash.h Stash @endlink can make implementing preferences easier.
93 * @see plugin_configure_single(). */
94GtkWidget *plugin_configure(GtkDialog *dialog);
95
96/** Called when a plugin should show a preferences dialog, if plugin_configure() has not been
97 * implemented.
98 * @warning It's better to implement plugin_configure() instead, but this is simpler.
99 * This does not integrate as well with the multiple-plugin dialog.
100 * @param parent Pass this as the parent widget if showing a dialog.
101 * @see plugin_configure(). */
102void plugin_configure_single(GtkWidget *parent);
103
104/** Called after loading the plugin.
105 * @param data The same as #geany_data. */
106void plugin_init(GeanyData *data);
107
108/** Called before unloading the plugin. Required for normal plugins - it should undo
109 * everything done in plugin_init() - e.g. destroy menu items, free memory. */
110void plugin_cleanup();
111
112/** Called whenever the plugin should show its documentation (if any). This may open a dialog,
113 * a browser with a website or a local installed HTML help file (see utils_open_browser())
114 * or something else.
115 * Can be omitted when not needed. */
struct GeanyFunctionsUndefined GeanyFunctions
Definition: plugindata.h:408
gint plugin_version_check(gint abi)
Use the PLUGIN_VERSION_CHECK() macro instead.
Definition: classbuilder.c:32
PluginFields * plugin_fields
Plugin owned fields, including flags.
Definition: pluginsymbols.c:70
void plugin_set_info(PluginInfo *info)
Use the PLUGIN_SET_INFO() macro to define it.
Definition: classbuilder.c:35
KeyBindingGroup * plugin_key_group
Plugins must use the PLUGIN_KEY_GROUP() macro to define it.
Definition: pluginsymbols.c:80
void plugin_cleanup()
Called before unloading the plugin.
Definition: export.c:773
void plugin_help()
Called whenever the plugin should show its documentation (if any).
PluginCallback plugin_callbacks[]
An array for connecting GeanyObject events, which should be terminated with {NULL,...
Definition: pluginsymbols.c:75
const GeanyPlugin * geany_plugin
Basic information for the plugin and identification.
Definition: pluginsymbols.c:55
void plugin_configure_single(GtkWidget *parent)
Called when a plugin should show a preferences dialog, if plugin_configure() has not been implemented...
void plugin_init(GeanyData *data)
Called after loading the plugin.
Definition: export.c:739
const PluginInfo * plugin_info
Basic information about a plugin, which is set in plugin_set_info().
Definition: pluginsymbols.c:52
GtkWidget * plugin_configure(GtkDialog *dialog)
Called before showing the plugin preferences dialog for multiple plugins.
Definition: filebrowser.c:1259
const GeanyFunctions * geany_functions
Geany owned function pointers, split into groups.
Definition: pluginsymbols.c:66
const GeanyData * geany_data
Geany owned data pointers.
Definition: pluginsymbols.c:59
GtkWidget * dialog
This contains pointers to global variables owned by Geany for plugins to use.
Definition: plugindata.h:167
Basic information for the plugin and identification.
Definition: plugindata.h:233
Callback array entry type used with the plugin_callbacks symbol.
Definition: plugindata.h:148
Basic information about a plugin available to Geany without loading the plugin.
Definition: plugindata.h:95