Support more folding icon styles: arrows, +/- and no lines
[geany-mirror.git] / doc / pluginsymbols.c
blob2d1b36bf9c902a507a9187dbcaf834cc00593a14
1 /*
2 * pluginsymbols.c - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2008-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5 * Copyright 2008-2010 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
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 * MA 02110-1301, USA.
22 * $Id$
25 /* Note: this file is for Doxygen only. */
27 /**
28 * @file pluginsymbols.c
29 * Symbols declared from within plugins.
31 * Geany looks for these symbols (arrays, pointers and functions) when initializing
32 * plugins. Some of them are optional, i.e. they can be omitted; others are required
33 * and must be defined. Some symbols should only be declared using specific macros in
34 * @link plugindata.h @endlink.
37 /** Use the PLUGIN_VERSION_CHECK() macro instead. Required by Geany. */
38 gint plugin_version_check(gint);
40 /** Use the PLUGIN_SET_INFO() macro to define it. Required by Geany.
41 * This function is called before the plugin is initialized, so Geany
42 * can read the plugin's name.
43 * @param info The data struct which should be initialized by this function. */
44 void plugin_set_info(PluginInfo *info);
46 /** @deprecated Use @ref geany_plugin->info instead.
47 * Basic information about a plugin, which is set in plugin_set_info(). */
48 const PluginInfo *plugin_info;
50 /** Basic information for the plugin and identification. */
51 const GeanyPlugin *geany_plugin;
53 /** Geany owned data pointers.
54 * Example: @c assert(geany_data->app->configdir != NULL); */
55 const GeanyData *geany_data;
57 /** Geany owned function pointers, split into groups.
58 * Example: @code #include "geanyfunctions.h"
59 * ...
60 * document_new_file(NULL, NULL, NULL); @endcode
61 * This is equivalent of @c geany_functions->p_document->document_new_file(NULL, NULL, NULL); */
62 const GeanyFunctions *geany_functions;
64 /** @deprecated Use @ref ui_add_document_sensitive() instead.
65 * Plugin owned fields, including flags. */
66 PluginFields *plugin_fields;
68 /** An array for connecting GeanyObject events, which should be terminated with
69 * @c {NULL, NULL, FALSE, NULL}. See @link signals Signal documentation @endlink.
70 * @see plugin_signal_connect(). */
71 PluginCallback plugin_callbacks[];
73 /** Plugins must use the PLUGIN_KEY_GROUP() macro to define it.
74 * To setup a variable number of keybindings, e.g. based on the
75 * plugin's configuration file settings, use plugin_set_key_group() instead. */
76 KeyBindingGroup *plugin_key_group;
79 /** Called before showing the plugin preferences dialog for multiple plugins.
80 * Can be omitted when not needed.
81 * The dialog will show all plugins that support this symbol together.
82 * @param dialog The plugin preferences dialog widget - this should only be used to
83 * connect the @c "response" signal. If settings should be read from the dialog, the
84 * reponse will be either @c GTK_RESPONSE_OK or @c GTK_RESPONSE_APPLY.
85 * @return A container widget holding preference widgets.
86 * @see plugin_configure_single(). */
87 GtkWidget *plugin_configure(GtkDialog *dialog);
89 /** Called when a plugin should show a preferences dialog, if plugin_configure() has not been
90 * implemented.
91 * @warning It's better to implement plugin_configure() instead, but this is simpler.
92 * This does not integrate as well with the multiple-plugin dialog.
93 * @param parent Pass this as the parent widget if showing a dialog.
94 * @see plugin_configure(). */
95 void plugin_configure_single(GtkWidget *parent);
97 /** Called after loading the plugin.
98 * @param data The same as #geany_data. */
99 void plugin_init(GeanyData *data);
101 /** Called before unloading the plugin. Required for normal plugins - it should undo
102 * everything done in plugin_init() - e.g. destroy menu items, free memory. */
103 void plugin_cleanup();
105 /** Called whenever the plugin should show its documentation (if any). This may open a dialog,
106 * a browser with a website or a local installed HTML help file(see utils_start_browser())
107 * or something else.
108 * Can be omitted when not needed. */
109 void plugin_help();