2
* plugin-symbols.c - this file is part of Geany, a fast and lightweight IDE
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>
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,
22
* $Id: plugin-symbols.c 2411 2008-03-26 17:10:18Z ntrel $
25
/* Note: this file is for Doxygen only. */
28
* @file plugin-symbols.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 version_check(gint);
40
/** Use the PLUGIN_INFO() macro to define it. Required by Geany. */
43
/** Geany owned fields and functions. */
44
GeanyData* geany_data;
46
/** Plugin owned fields, including flags. */
47
PluginFields* plugin_fields;
49
/** An array for connecting GeanyObject events, which should be terminated with
50
* @c {NULL, NULL, FALSE, NULL}. See @link signals Signal documentation @endlink. */
51
GeanyCallback geany_callbacks[];
53
/** Most plugins should use the PLUGIN_KEY_GROUP() macro to define it. However,
54
* its fields are not read until after init() is called for the plugin, so it
55
* is possible to setup a variable number of keybindings, e.g. based on the
56
* plugin's configuration file settings.
57
* - The @c name field must not be empty or match Geany's default group name.
58
* - The @c label field is set by Geany after init() is called to the name of the
60
* @note This is a single element array for implementation reasons,
61
* but you can treat it like a pointer. */
62
KeyBindingGroup plugin_key_group[1];
65
/** Called when the plugin should show a configure dialog to let the user set some basic
66
* plugin configuration. Optionally, can be omitted when not needed.
67
* @param parent The Plugin Manager dialog widget. */
68
void configure(GtkWidget *parent);
70
/** Called after loading the plugin.
71
* @param data The same as #geany_data. */
72
void init(GeanyData *data);
74
/** Called before unloading the plugin. Required for normal plugins - it should undo
75
* everything done in init() - e.g. destroy menu items, free memory. */