~ubuntu-branches/ubuntu/raring/geany/raring-proposed

« back to all changes in this revision

Viewing changes to doc/pluginsymbols.c

  • Committer: Bazaar Package Importer
  • Author(s): Damián Viano
  • Date: 2008-10-26 19:44:46 UTC
  • mto: (1.3.1 upstream) (3.1.2 experimental)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20081026194446-kytjyn3a831y1oc8
Import upstream version 0.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *      pluginsymbols.c - this file is part of Geany, a fast and lightweight IDE
 
3
 *
 
4
 *      Copyright 2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
 
5
 *      Copyright 2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
 
6
 *
 
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.
 
11
 *
 
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.
 
16
 *
 
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.
 
21
 *
 
22
 * $Id: pluginsymbols.c 3090 2008-10-14 17:32:38Z ntrel $
 
23
 */
 
24
 
 
25
/* Note: this file is for Doxygen only. */
 
26
 
 
27
/**
 
28
 * @file pluginsymbols.c
 
29
 * Symbols declared from within plugins.
 
30
 *
 
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.
 
35
 */
 
36
 
 
37
/** Use the PLUGIN_VERSION_CHECK() macro instead. Required by Geany. */
 
38
gint plugin_version_check(gint);
 
39
 
 
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);
 
45
 
 
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;
 
49
 
 
50
/** Basic information for the plugin and identification. */
 
51
const GeanyPlugin *geany_plugin;
 
52
 
 
53
/** Geany owned data pointers.
 
54
 * Example: @c assert(geany_data->app->configdir != NULL); */
 
55
const GeanyData *geany_data;
 
56
 
 
57
/** Geany owned function pointers, split into groups.
 
58
 * Example: @c geany_functions->p_document->new_file(NULL, NULL, NULL);
 
59
 *
 
60
 * Note: Usually plugins would use the pluginmacros.h file and just call:
 
61
 * @c p_document->new_file(NULL, NULL, NULL); */
 
62
const GeanyFunctions *geany_functions;
 
63
 
 
64
/** @deprecated Use @ref ui_add_document_sensitive() instead.
 
65
 * Plugin owned fields, including flags. */
 
66
PluginFields *plugin_fields;
 
67
 
 
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
PluginCallback plugin_callbacks[];
 
71
 
 
72
/** Most plugins should use the PLUGIN_KEY_GROUP() macro to define it. However,
 
73
 * its fields are not read until after plugin_init() is called for the plugin, so it
 
74
 * is possible to setup a variable number of keybindings, e.g. based on the
 
75
 * plugin's configuration file settings.
 
76
 * - The @c name field must not be empty or match Geany's default group name.
 
77
 * - The @c label field is set by Geany after plugin_init() is called to the name of the
 
78
 * plugin.
 
79
 * @note This is a single element array for implementation reasons,
 
80
 * but you can treat it like a pointer. */
 
81
KeyBindingGroup plugin_key_group[1];
 
82
 
 
83
 
 
84
/** Called before showing the plugin preferences dialog to let the user set some basic
 
85
 * plugin configuration options. Can be omitted when not needed.
 
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
 * reponse will be either @c GTK_RESPONSE_OK or @c GTK_RESPONSE_APPLY.
 
89
 * @return A container widget holding preference widgets. */
 
90
GtkWidget* plugin_configure(GtkDialog *dialog);
 
91
 
 
92
/** Called after loading the plugin.
 
93
 * @param data The same as #geany_data. */
 
94
void plugin_init(GeanyData *data);
 
95
 
 
96
/** Called before unloading the plugin. Required for normal plugins - it should undo
 
97
 * everything done in plugin_init() - e.g. destroy menu items, free memory. */
 
98
void plugin_cleanup();
 
99