Update Erlang ctags test.
[geany-mirror.git] / doc / pluginsymbols.c
blob3251c868040bcf089dee2cf9655afe49c400b3fc
1 /*
2 * pluginsymbols.c - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2008-2012 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5 * Copyright 2008-2012 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
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.
22 /* Note: this file is for Doxygen only. */
24 /**
25 * @file pluginsymbols.c
26 * Symbols declared from within plugins.
28 * Geany looks for these symbols (arrays, pointers and functions) when initializing
29 * plugins. Some of them are optional, i.e. they can be omitted; others are required
30 * and must be defined. Some symbols should only be declared using specific macros in
31 * @link plugindata.h @endlink.
34 /** Use the PLUGIN_VERSION_CHECK() macro instead. Required by Geany.
35 * @return . */
36 gint plugin_version_check(gint);
38 /** Use the PLUGIN_SET_INFO() macro to define it. Required by Geany.
39 * This function is called before the plugin is initialized, so Geany
40 * can read the plugin's name.
41 * @param info The data struct which should be initialized by this function. */
42 void plugin_set_info(PluginInfo *info);
44 /** @deprecated Use @ref GeanyPlugin.info instead.
45 * Basic information about a plugin, which is set in plugin_set_info(). */
46 const PluginInfo *plugin_info;
48 /** Basic information for the plugin and identification. */
49 const GeanyPlugin *geany_plugin;
51 /** Geany owned data pointers.
52 * Example: @c assert(geany_data->app->configdir != NULL); */
53 const GeanyData *geany_data;
55 /** Geany owned function pointers, split into groups.
56 * Example: @code #include "geanyfunctions.h"
57 * ...
58 * document_new_file(NULL, NULL, NULL); @endcode
59 * This is equivalent of @c geany_functions->p_document->document_new_file(NULL, NULL, NULL); */
60 const GeanyFunctions *geany_functions;
62 /** @deprecated Use @ref ui_add_document_sensitive() instead.
63 * Plugin owned fields, including flags. */
64 PluginFields *plugin_fields;
66 /** An array for connecting GeanyObject events, which should be terminated with
67 * @c {NULL, NULL, FALSE, NULL}. See @link pluginsignals.c Signal documentation @endlink.
68 * @see plugin_signal_connect(). */
69 PluginCallback plugin_callbacks[];
71 /** Plugins must use the PLUGIN_KEY_GROUP() macro to define it.
72 * To setup a variable number of keybindings, e.g. based on the
73 * plugin's configuration file settings, use plugin_set_key_group() instead. */
74 KeyBindingGroup *plugin_key_group;
77 /** Called before showing the plugin preferences dialog for multiple plugins.
78 * Can be omitted when not needed.
79 * The dialog will show all plugins that support this symbol together.
80 * @param dialog The plugin preferences dialog widget - this should only be used to
81 * connect the @c "response" signal. If settings should be read from the dialog, the
82 * reponse will be either @c GTK_RESPONSE_OK or @c GTK_RESPONSE_APPLY.
83 * @return A container widget holding preference widgets.
84 * @note Using @link stash.h Stash @endlink can make implementing preferences easier.
85 * @see plugin_configure_single(). */
86 GtkWidget *plugin_configure(GtkDialog *dialog);
88 /** Called when a plugin should show a preferences dialog, if plugin_configure() has not been
89 * implemented.
90 * @warning It's better to implement plugin_configure() instead, but this is simpler.
91 * This does not integrate as well with the multiple-plugin dialog.
92 * @param parent Pass this as the parent widget if showing a dialog.
93 * @see plugin_configure(). */
94 void plugin_configure_single(GtkWidget *parent);
96 /** Called after loading the plugin.
97 * @param data The same as #geany_data. */
98 void plugin_init(GeanyData *data);
100 /** Called before unloading the plugin. Required for normal plugins - it should undo
101 * everything done in plugin_init() - e.g. destroy menu items, free memory. */
102 void plugin_cleanup();
104 /** Called whenever the plugin should show its documentation (if any). This may open a dialog,
105 * a browser with a website or a local installed HTML help file(see utils_open_browser())
106 * or something else.
107 * Can be omitted when not needed. */
108 void plugin_help();