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)  

plugindata.h
Go to the documentation of this file.
1/*
2 * plugindata.h - this file is part of Geany, a fast and lightweight IDE
3 *
4 * Copyright 2007 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/**
22 * @file plugindata.h
23 * This file defines the plugin API, the interface between Geany and its plugins.
24 * For detailed documentation of the plugin system please read the plugin
25 * API documentation.
26 **/
27/* Note: Remember to increment GEANY_API_VERSION (and GEANY_ABI_VERSION if necessary)
28 * when making changes (see 'Keeping the plugin ABI stable' in the HACKING file). */
29
30
31#ifndef GEANY_PLUGIN_DATA_H
32#define GEANY_PLUGIN_DATA_H 1
33
34#include "geany.h" /* for GEANY_DEPRECATED */
35#include "build.h" /* GeanyBuildGroup, GeanyBuildSource, GeanyBuildCmdEntries enums */
36#include "document.h" /* GeanyDocument */
37#include "editor.h" /* GeanyEditor, GeanyIndentType */
38#include "filetypes.h" /* GeanyFiletype */
39
40#include "gtkcompat.h"
41
42G_BEGIN_DECLS
43
44/* Compatibility for sharing macros between API and core.
45 * First include geany.h, then plugindata.h, then other API headers. */
46#undef GEANY
47#define GEANY(symbol_name) geany->symbol_name
48
49
50/** The Application Programming Interface (API) version, incremented
51 * whenever any plugin data types are modified or appended to.
52 *
53 * You can protect code that needs a higher API than e.g. 200 with:
54 * @code #if GEANY_API_VERSION >= 200
55 * some_newer_function();
56 * #endif @endcode
57 *
58 * @warning You should not test for values below 200 as previously
59 * @c GEANY_API_VERSION was defined as an enum value, not a macro.
60 */
61#define GEANY_API_VERSION 240
62
63/* hack to have a different ABI when built with different GTK major versions
64 * because loading plugins linked to a different one leads to crashes.
65 * Only GTK3 is currently supported. */
66#define GEANY_ABI_SHIFT 8
67/** The Application Binary Interface (ABI) version, incremented whenever
68 * existing fields in the plugin data types have to be changed or reordered.
69 * Changing this forces all plugins to be recompiled before Geany can load them. */
70/* This should usually stay the same if fields are only appended, assuming only pointers to
71 * structs and not structs themselves are declared by plugins. */
72#define GEANY_ABI_VERSION (72 << GEANY_ABI_SHIFT)
73
74
75/** Defines a function to check the plugin is safe to load.
76 * This performs runtime checks that try to ensure:
77 * - Geany ABI data types are compatible with this plugin.
78 * - Geany sources provide the required API for this plugin.
79 * @param api_required The minimum API number your plugin requires.
80 * Look at the source for the value of @c GEANY_API_VERSION to use if you
81 * want your plugin to require the current Geany version on your machine.
82 * You should update this value when using any new API features. */
83#define PLUGIN_VERSION_CHECK(api_required) \
84 gint plugin_version_check(gint abi_ver) \
85 { \
86 if (abi_ver != GEANY_ABI_VERSION) \
87 return -1; \
88 return (api_required); \
89 }
90
91
92/** Basic information about a plugin available to Geany without loading the plugin.
93 * The fields are set in plugin_set_info(), usually with the PLUGIN_SET_INFO() macro. */
94typedef struct PluginInfo
95{
96 /** The name of the plugin. */
97 const gchar *name;
98 /** The description of the plugin. */
99 const gchar *description;
100 /** The version of the plugin. */
101 const gchar *version;
102 /** The author of the plugin. */
103 const gchar *author;
104}
106
107
108/** Sets the plugin name and some other basic information about a plugin.
109 *
110 * @note If you want some of the arguments to be translated, see @ref PLUGIN_SET_TRANSLATABLE_INFO()
111 *
112 * Example:
113 * @code PLUGIN_SET_INFO("Cool Feature", "Adds cool feature support.", "0.1", "Joe Author") @endcode */
114/* plugin_set_info() could be written manually for plugins if we want to add any
115 * extra PluginInfo features (such as an icon), so we don't need to break API
116 * compatibility. Alternatively just add a new macro, PLUGIN_SET_INFO_FULL(). -ntrel */
117#define PLUGIN_SET_INFO(p_name, p_description, p_version, p_author) \
118 void plugin_set_info(PluginInfo *info) \
119 { \
120 info->name = (p_name); \
121 info->description = (p_description); \
122 info->version = (p_version); \
123 info->author = (p_author); \
124 }
125
126/** Sets the plugin name and some other basic information about a plugin.
127 * This macro is like @ref PLUGIN_SET_INFO() but allows the passed information to be translated
128 * by setting up the translation mechanism with @ref main_locale_init().
129 * You therefore don't need to call it manually in plugin_init().
130 *
131 * Example:
132 * @code PLUGIN_SET_TRANSLATABLE_INFO(LOCALEDIR, GETTEXT_PACKAGE, _("Cool Feature"), _("Adds a cool feature."), "0.1", "John Doe") @endcode
133 *
134 * @since 0.19 */
135#define PLUGIN_SET_TRANSLATABLE_INFO(localedir, package, p_name, p_description, p_version, p_author) \
136 void plugin_set_info(PluginInfo *info) \
137 { \
138 main_locale_init((localedir), (package)); \
139 info->name = (p_name); \
140 info->description = (p_description); \
141 info->version = (p_version); \
142 info->author = (p_author); \
143 }
144
145
146/** Callback array entry type used with the @ref plugin_callbacks symbol. */
147typedef struct PluginCallback
148{
149 /** The name of signal, must be an existing signal. For a list of available signals,
150 * please see the @link pluginsignals.c Signal documentation @endlink. */
151 const gchar *signal_name;
152 /** A callback function which is called when the signal is emitted. */
153 GCallback callback;
154 /** Set to TRUE to connect your handler with g_signal_connect_after(). */
155 gboolean after;
156 /** The user data passed to the signal handler. If set to NULL then the signal
157 * handler will receive the data set with geany_plugin_register_full() or
158 * geany_plugin_set_data() */
159 gpointer user_data;
160}
162
163
164/** This contains pointers to global variables owned by Geany for plugins to use.
165 * Core variable pointers can be appended when needed by plugin authors, if appropriate. */
166typedef struct GeanyData
167{
168 struct GeanyApp *app; /**< Geany application data fields */
169 struct GeanyMainWidgets *main_widgets; /**< Important widgets in the main window */
170 /** Dynamic array of GeanyDocument pointers.
171 * Once a pointer is added to this, it is never freed. This means the same document pointer
172 * can represent a different document later on, or it may have been closed and become invalid.
173 * For this reason, you should use document_find_by_id() instead of storing
174 * document pointers over time if there is a chance the user can close the
175 * document.
176 *
177 * @warning You must check @c GeanyDocument::is_valid when iterating over this array.
178 * This is done automatically if you use the foreach_document() macro.
179 *
180 * @note
181 * Never assume that the order of document pointers is the same as the order of notebook tabs.
182 * One reason is that notebook tabs can be reordered.
183 * Use @c document_get_from_page() to lookup a document from a notebook tab number.
184 *
185 * @see documents.
186 *
187 * @elementtype{GeanyDocument}
188 */
189 GPtrArray *documents_array;
190 /** Dynamic array of filetype pointers
191 *
192 * List the list is dynamically expanded for custom filetypes filetypes so don't expect
193 * the list of known filetypes to be a constant.
194 *
195 * @elementtype{GeanyFiletype}
196 */
197 GPtrArray *filetypes_array;
198 struct GeanyPrefs *prefs; /**< General settings */
199 struct GeanyInterfacePrefs *interface_prefs; /**< Interface settings */
200 struct GeanyToolbarPrefs *toolbar_prefs; /**< Toolbar settings */
201 struct GeanyEditorPrefs *editor_prefs; /**< Editor settings */
202 struct GeanyFilePrefs *file_prefs; /**< File-related settings */
203 struct GeanySearchPrefs *search_prefs; /**< Search-related settings */
204 struct GeanyToolPrefs *tool_prefs; /**< Tool settings */
205 struct GeanyTemplatePrefs *template_prefs; /**< Template settings */
206 gpointer *_compat; /* Remove field on next ABI break (abi-todo) */
207 /** List of filetype pointers sorted by name, but with @c filetypes_index(GEANY_FILETYPES_NONE)
208 * first, as this is usually treated specially.
209 * The list does not change (after filetypes have been initialized), so you can use
210 * @code g_slist_nth_data(filetypes_by_title, n) @endcode and expect the same result at different times.
211 * @see filetypes_get_sorted_by_name().
212 *
213 * @elementtype{GeanyFiletype}
214 */
216 /** @gironly
217 * Global object signalling events via signals
218 *
219 * This is mostly for language bindings. Otherwise prefer to use
220 * plugin_signal_connect() instead this which adds automatic cleanup. */
221 GObject *object;
222}
224
225#define geany geany_data /**< Simple macro for @c geany_data that reduces typing. */
226
229
230/** Basic information for the plugin and identification.
231 * @see geany_plugin. */
232typedef struct GeanyPlugin
233{
234 PluginInfo *info; /**< Fields set in plugin_set_info(). */
235 GeanyData *geany_data; /**< Pointer to global GeanyData intance */
236 GeanyPluginFuncs *funcs; /**< Functions implemented by the plugin, set in geany_load_module() */
237 GeanyProxyFuncs *proxy_funcs; /**< Hooks implemented by the plugin if it wants to act as a proxy
238 Must be set prior to calling geany_plugin_register_proxy() */
239 struct GeanyPluginPrivate *priv; /* private */
240}
242
243#ifndef GEANY_PRIVATE
244
245/* Prototypes for building plugins with -Wmissing-prototypes
246 * Also allows the compiler to check if the signature of the plugin's
247 * symbol properly matches what we expect. */
248gint plugin_version_check(gint abi_ver);
250
251void plugin_init(GeanyData *data);
252GtkWidget *plugin_configure(GtkDialog *dialog);
253void plugin_configure_single(GtkWidget *parent);
254void plugin_help(void);
255void plugin_cleanup(void);
256
257/** Called by Geany when a plugin library is loaded.
258 *
259 * This is the original entry point. Implement and export this function to be loadable at all.
260 * Then fill in GeanyPlugin::info and GeanyPlugin::funcs of the passed @p plugin. Finally
261 * GEANY_PLUGIN_REGISTER() and specify a minimum supported API version.
262 *
263 * For all glory details please read @ref howto.
264 *
265 * Because the plugin is not yet enabled by the user you may not call plugin API functions inside
266 * this function, except for the API functions below which are required for proper registration.
267 *
268 * API functions which are allowed to be called within this function:
269 * - main_locale_init()
270 * - geany_plugin_register() (and GEANY_PLUGIN_REGISTER())
271 * - geany_plugin_register_full() (and GEANY_PLUGIN_REGISTER_FULL())
272 * - plugin_module_make_resident()
273 *
274 * @param plugin The unique plugin handle to your plugin. You must set some fields here.
275 *
276 * @since 1.26 (API 225)
277 * @see @ref howto
278 */
279void geany_load_module(GeanyPlugin *plugin);
280
281#endif
282
283/** Callback functions that need to be implemented for every plugin.
284 *
285 * These callbacks should be registered by the plugin within Geany's call to
286 * geany_load_module() by calling geany_plugin_register() with an instance of this type.
287 *
288 * Geany will then call the callbacks at appropriate times. Each gets passed the
289 * plugin-defined data pointer as well as the corresponding GeanyPlugin instance
290 * pointer.
291 *
292 * @since 1.26 (API 225)
293 * @see @ref howto
294 **/
296{
297 /** Array of plugin-provided signal handlers @see PluginCallback */
299 /** Called to initialize the plugin, when the user activates it (must not be @c NULL) */
300 gboolean (*init) (GeanyPlugin *plugin, gpointer pdata);
301 /** plugins configure dialog, optional (can be @c NULL) */
302 GtkWidget* (*configure) (GeanyPlugin *plugin, GtkDialog *dialog, gpointer pdata);
303 /** Called when the plugin should show some help, optional (can be @c NULL) */
304 void (*help) (GeanyPlugin *plugin, gpointer pdata);
305 /** Called when the plugin is disabled or when Geany exits (must not be @c NULL) */
306 void (*cleanup) (GeanyPlugin *plugin, gpointer pdata);
307};
308
309gboolean geany_plugin_register(GeanyPlugin *plugin, gint api_version,
310 gint min_api_version, gint abi_version);
311gboolean geany_plugin_register_full(GeanyPlugin *plugin, gint api_version,
312 gint min_api_version, gint abi_version,
313 gpointer data, GDestroyNotify free_func);
314gpointer geany_plugin_get_data(const GeanyPlugin *plugin);
315void geany_plugin_set_data(GeanyPlugin *plugin, gpointer data, GDestroyNotify free_func);
316
317/** Convenience macro to register a plugin.
318 *
319 * It simply calls geany_plugin_register() with GEANY_API_VERSION and GEANY_ABI_VERSION.
320 *
321 * @since 1.26 (API 225)
322 * @see @ref howto
323 **/
324#define GEANY_PLUGIN_REGISTER(plugin, min_api_version) \
325 geany_plugin_register((plugin), GEANY_API_VERSION, \
326 (min_api_version), GEANY_ABI_VERSION)
327
328/** Convenience macro to register a plugin with data.
329 *
330 * It simply calls geany_plugin_register_full() with GEANY_API_VERSION and GEANY_ABI_VERSION.
331 *
332 * @since 1.26 (API 225)
333 * @see @ref howto
334 **/
335#define GEANY_PLUGIN_REGISTER_FULL(plugin, min_api_version, pdata, free_func) \
336 geany_plugin_register_full((plugin), GEANY_API_VERSION, \
337 (min_api_version), GEANY_ABI_VERSION, (pdata), (free_func))
338
339/** Return values for GeanyProxyHooks::probe()
340 *
341 * @see geany_plugin_register_proxy() for a full description of the proxy plugin mechanisms.
342 */
343typedef enum
344{
345 /** The proxy is not responsible at all, and Geany or other plugins are free
346 * to probe it.
347 *
348 * @since 1.29 (API 229)
349 **/
351 /** The proxy is responsible for this file, and creates a plugin for it.
352 *
353 * @since 1.29 (API 229)
354 */
356 /** The proxy is does not directly load it, but it's still tied to the proxy.
357 *
358 * This is for plugins that come in multiple files where only one of these
359 * files is relevant for the plugin creation (for the PM dialog). The other
360 * files should be ignored by Geany and other proxies. Example: libpeas has
361 * a .plugin and a .so per plugin. Geany should not process the .so file
362 * if there is a corresponding .plugin.
363 *
364 * @since 1.29 (API 229)
365 */
369
370/** @deprecated Use GEANY_PROXY_IGNORE instead.
371 * @since 1.26 (API 226)
372 */
373#define PROXY_IGNORED GEANY_PROXY_IGNORE
374/** @deprecated Use GEANY_PROXY_MATCH instead.
375 * @since 1.26 (API 226)
376 */
377#define PROXY_MATCHED GEANY_PROXY_MATCH
378/** @deprecated Use GEANY_PROXY_RELATED instead.
379 * @since 1.26 (API 226)
380 */
381#define PROXY_NOLOAD 0x100
382
383/** Hooks that need to be implemented by every proxy
384 *
385 * @see geany_plugin_register_proxy() for a full description of the proxy mechanism.
386 *
387 * @since 1.26 (API 226)
388 **/
390{
391 /** Called to determine whether the proxy is truly responsible for the requested plugin.
392 * A NULL pointer assumes the probe() function would always return @ref GEANY_PROXY_MATCH */
393 gint (*probe) (GeanyPlugin *proxy, const gchar *filename, gpointer pdata);
394 /** Called after probe(), to perform the actual job of loading the plugin */
395 gpointer (*load) (GeanyPlugin *proxy, GeanyPlugin *subplugin, const gchar *filename, gpointer pdata);
396 /** Called when the user initiates unloading of a plugin, e.g. on Geany exit */
397 void (*unload) (GeanyPlugin *proxy, GeanyPlugin *subplugin, gpointer load_data, gpointer pdata);
398};
399
400gint geany_plugin_register_proxy(GeanyPlugin *plugin, const gchar **extensions);
401
402/* Deprecated aliases */
403#ifndef GEANY_DISABLE_DEPRECATED
404
405/* This remains so that older plugins that contain a `GeanyFunctions *geany_functions;`
406 * variable in their plugin - as was previously required - will still compile
407 * without changes. */
408typedef struct GeanyFunctionsUndefined GeanyFunctions GEANY_DEPRECATED;
409
410/** @deprecated - use plugin_set_key_group() instead.
411 * @see PLUGIN_KEY_GROUP() macro. */
412typedef struct GeanyKeyGroupInfo
413{
414 const gchar *name; /**< Group name used in the configuration file, such as @c "html_chars" */
415 gsize count; /**< The number of keybindings the group will hold */
416}
418
419/** @deprecated - use plugin_set_key_group() instead.
420 * Declare and initialise a keybinding group.
421 * @code GeanyKeyGroup *plugin_key_group; @endcode
422 * You must then set the @c plugin_key_group::keys[] entries for the group in plugin_init(),
423 * normally using keybindings_set_item().
424 * The @c plugin_key_group::label field is set by Geany after @c plugin_init()
425 * is called, to the name of the plugin.
426 * @param group_name A unique group name (without quotes) to be used in the
427 * configuration file, such as @c html_chars.
428 * @param key_count The number of keybindings the group will hold. */
429#define PLUGIN_KEY_GROUP(group_name, key_count) \
430 /* We have to declare this as a single element array.
431 * Declaring as a pointer to a struct doesn't work with g_module_symbol(). */ \
432 GeanyKeyGroupInfo plugin_key_group_info[1] = \
433 { \
434 {G_STRINGIFY(group_name), key_count} \
435 };\
436 GeanyKeyGroup *plugin_key_group = NULL;
437
438/** @deprecated Use @ref ui_add_document_sensitive() instead.
439 * Flags to be set by plugins in PluginFields struct. */
440typedef enum
441{
442 /** Whether a plugin's menu item should be disabled when there are no open documents */
444}
446
447/** @deprecated Use @ref ui_add_document_sensitive() instead.
448 * Fields set and owned by the plugin. */
449typedef struct PluginFields
450{
451 /** Bitmask of @c PluginFlags. */
453 /** Pointer to a plugin's menu item which will be automatically enabled/disabled when there
454 * are no open documents and @c PLUGIN_IS_DOCUMENT_SENSITIVE is set.
455 * This is required if using @c PLUGIN_IS_DOCUMENT_SENSITIVE, ignored otherwise */
456 GtkWidget *menu_item;
460#define document_reload_file document_reload_force
461
462/** @deprecated - copy into your plugin code if needed.
463 * @c NULL-safe way to get the index of @a doc_ptr in the documents array. */
464#define DOC_IDX(doc_ptr) \
465 (doc_ptr ? doc_ptr->index : -1)
466#define DOC_IDX_VALID(doc_idx) \
467 ((doc_idx) >= 0 && (guint)(doc_idx) < documents_array->len && documents[doc_idx]->is_valid)
469#define GEANY_WINDOW_MINIMAL_WIDTH 550
470#define GEANY_WINDOW_MINIMAL_HEIGHT GEANY_DEFAULT_DIALOG_HEIGHT
471
472#endif /* GEANY_DISABLE_DEPRECATED */
473
474G_END_DECLS
475
476#endif /* GEANY_PLUGIN_DATA_H */
Interface to the Build menu functionality.
Document related actions: new, save, open, etc.
Editor-related functions for GeanyEditor.
Filetype detection, file extensions and filetype menu items.
#define GEANY_DEPRECATED
Definition: geany.h:62
#define GEANY_DEPRECATED_FOR(x)
Definition: geany.h:63
void plugin_set_info(PluginInfo *info)
Use the PLUGIN_SET_INFO() macro to define it.
Definition: classbuilder.c:35
void geany_plugin_set_data(GeanyPlugin *plugin, gpointer data, GDestroyNotify free_func)
Add additional data that corresponds to the plugin.
Definition: pluginutils.c:613
struct GeanyData GeanyData
This contains pointers to global variables owned by Geany for plugins to use.
PluginFlags
Definition: plugindata.h:440
@ PLUGIN_IS_DOCUMENT_SENSITIVE
Whether a plugin's menu item should be disabled when there are no open documents.
Definition: plugindata.h:442
gint plugin_version_check(gint abi_ver)
Use the PLUGIN_VERSION_CHECK() macro instead.
Definition: classbuilder.c:32
GeanyProxyProbeResults
Return values for GeanyProxyHooks::probe()
Definition: plugindata.h:344
@ GEANY_PROXY_IGNORE
The proxy is not responsible at all, and Geany or other plugins are free to probe it.
Definition: plugindata.h:350
@ GEANY_PROXY_RELATED
The proxy is does not directly load it, but it's still tied to the proxy.
Definition: plugindata.h:366
@ GEANY_PROXY_MATCH
The proxy is responsible for this file, and creates a plugin for it.
Definition: plugindata.h:355
struct PluginInfo PluginInfo
Basic information about a plugin available to Geany without loading the plugin.
struct GeanyFunctionsUndefined GeanyFunctions
Definition: plugindata.h:408
struct PluginCallback PluginCallback
Callback array entry type used with the plugin_callbacks symbol.
void plugin_cleanup(void)
Called before unloading the plugin.
Definition: export.c:773
struct GeanyPlugin GeanyPlugin
Basic information for the plugin and identification.
gboolean geany_plugin_register_full(GeanyPlugin *plugin, gint api_version, gint min_api_version, gint abi_version, gpointer data, GDestroyNotify free_func)
Register a plugin to Geany, with plugin-defined data.
Definition: plugins.c:422
void plugin_help(void)
void plugin_configure_single(GtkWidget *parent)
void plugin_init(GeanyData *data)
Called after loading the plugin.
Definition: export.c:739
void geany_load_module(GeanyPlugin *plugin)
Called by Geany when a plugin library is loaded.
Definition: demoplugin.c:216
gboolean geany_plugin_register(GeanyPlugin *plugin, gint api_version, gint min_api_version, gint abi_version)
Register a plugin to Geany.
Definition: plugins.c:353
gint geany_plugin_register_proxy(GeanyPlugin *plugin, const gchar **extensions)
Register the plugin as a proxy for other plugins.
Definition: plugins.c:2042
GtkWidget * plugin_configure(GtkDialog *dialog)
Called before showing the plugin preferences dialog for multiple plugins.
Definition: filebrowser.c:1259
gpointer geany_plugin_get_data(const GeanyPlugin *plugin)
Get the additional data that corresponds to the plugin.
Definition: pluginutils.c:581
GeanyKeyGroup * plugin_set_key_group(GeanyPlugin *plugin, const gchar *section_name, gsize count, GeanyKeyGroupCallback callback)
<simplesect kind="geany:skip"></simplesect> Sets up or resizes a keybinding group for the plugin.
Definition: pluginutils.c:331
const gchar filename[]
Definition: stash-example.c:4
GtkWidget * dialog
Important application fields.
Definition: app.h:38
This contains pointers to global variables owned by Geany for plugins to use.
Definition: plugindata.h:167
struct GeanyTemplatePrefs * template_prefs
Template settings.
Definition: plugindata.h:205
struct GeanyToolbarPrefs * toolbar_prefs
Toolbar settings.
Definition: plugindata.h:200
struct GeanyEditorPrefs * editor_prefs
Editor settings.
Definition: plugindata.h:201
GObject * object
Definition: plugindata.h:221
GPtrArray * filetypes_array
Dynamic array of filetype pointers.
Definition: plugindata.h:197
struct GeanyMainWidgets * main_widgets
Important widgets in the main window.
Definition: plugindata.h:169
struct GeanyApp * app
Geany application data fields.
Definition: plugindata.h:168
gpointer * _compat
Definition: plugindata.h:206
struct GeanyFilePrefs * file_prefs
File-related settings.
Definition: plugindata.h:202
struct GeanyPrefs * prefs
General settings.
Definition: plugindata.h:198
GPtrArray * documents_array
Dynamic array of GeanyDocument pointers.
Definition: plugindata.h:189
struct GeanyToolPrefs * tool_prefs
Tool settings.
Definition: plugindata.h:204
GSList * filetypes_by_title
List of filetype pointers sorted by name, but with filetypes_index(GEANY_FILETYPES_NONE) first,...
Definition: plugindata.h:215
struct GeanyInterfacePrefs * interface_prefs
Interface settings.
Definition: plugindata.h:199
struct GeanySearchPrefs * search_prefs
Search-related settings.
Definition: plugindata.h:203
Default prefs when creating a new editor window.
Definition: editor.h:99
File Prefs.
Definition: document.h:47
Interface preferences.
Definition: ui_utils.h:46
const gchar * name
Group name used in the configuration file, such as "html_chars".
Definition: plugindata.h:414
gsize count
The number of keybindings the group will hold.
Definition: plugindata.h:415
Important widgets in the main window.
Definition: ui_utils.h:79
Callback functions that need to be implemented for every plugin.
Definition: plugindata.h:296
gboolean(* init)(GeanyPlugin *plugin, gpointer pdata)
Called to initialize the plugin, when the user activates it (must not be NULL)
Definition: plugindata.h:300
PluginCallback * callbacks
Array of plugin-provided signal handlers.
Definition: plugindata.h:298
void(* help)(GeanyPlugin *plugin, gpointer pdata)
Called when the plugin should show some help, optional (can be NULL)
Definition: plugindata.h:304
void(* cleanup)(GeanyPlugin *plugin, gpointer pdata)
Called when the plugin is disabled or when Geany exits (must not be NULL)
Definition: plugindata.h:306
Basic information for the plugin and identification.
Definition: plugindata.h:233
GeanyData * geany_data
Pointer to global GeanyData intance.
Definition: plugindata.h:235
PluginInfo * info
Fields set in plugin_set_info().
Definition: plugindata.h:234
GeanyProxyFuncs * proxy_funcs
Hooks implemented by the plugin if it wants to act as a proxy Must be set prior to calling geany_plug...
Definition: plugindata.h:237
struct GeanyPluginPrivate * priv
Definition: plugindata.h:239
GeanyPluginFuncs * funcs
Functions implemented by the plugin, set in geany_load_module()
Definition: plugindata.h:236
General Preferences dialog settings.
Definition: prefs.h:30
Hooks that need to be implemented by every proxy.
Definition: plugindata.h:390
void(* unload)(GeanyPlugin *proxy, GeanyPlugin *subplugin, gpointer load_data, gpointer pdata)
Called when the user initiates unloading of a plugin, e.g.
Definition: plugindata.h:397
gint(* probe)(GeanyPlugin *proxy, const gchar *filename, gpointer pdata)
Called to determine whether the proxy is truly responsible for the requested plugin.
Definition: plugindata.h:393
gpointer(* load)(GeanyPlugin *proxy, GeanyPlugin *subplugin, const gchar *filename, gpointer pdata)
Called after probe(), to perform the actual job of loading the plugin.
Definition: plugindata.h:395
Search preferences.
Definition: search.h:57
Template preferences.
Definition: templates.h:39
Tools preferences.
Definition: prefs.h:50
Toolbar settings.
Definition: toolbar.h:30
Callback array entry type used with the plugin_callbacks symbol.
Definition: plugindata.h:148
gpointer user_data
The user data passed to the signal handler.
Definition: plugindata.h:159
GCallback callback
A callback function which is called when the signal is emitted.
Definition: plugindata.h:153
gboolean after
Set to TRUE to connect your handler with g_signal_connect_after().
Definition: plugindata.h:155
const gchar * signal_name
The name of signal, must be an existing signal.
Definition: plugindata.h:151
PluginFlags flags
Bitmask of PluginFlags.
Definition: plugindata.h:451
GtkWidget * menu_item
Pointer to a plugin's menu item which will be automatically enabled/disabled when there are no open d...
Definition: plugindata.h:455
Basic information about a plugin available to Geany without loading the plugin.
Definition: plugindata.h:95
const gchar * version
The version of the plugin.
Definition: plugindata.h:101
const gchar * description
The description of the plugin.
Definition: plugindata.h:99
const gchar * name
The name of the plugin.
Definition: plugindata.h:97
const gchar * author
The author of the plugin.
Definition: plugindata.h:103
void ui_add_document_sensitive(GtkWidget *widget)
Adds a widget to the list of widgets that should be set sensitive/insensitive when some documents are...
Definition: ui_utils.c:976