31#ifndef GEANY_PLUGIN_DATA_H
32#define GEANY_PLUGIN_DATA_H 1
47#define GEANY(symbol_name) geany->symbol_name
61#define GEANY_API_VERSION 240
66#define GEANY_ABI_SHIFT 8
72#define GEANY_ABI_VERSION (72 << GEANY_ABI_SHIFT)
83#define PLUGIN_VERSION_CHECK(api_required) \
84 gint plugin_version_check(gint abi_ver) \
86 if (abi_ver != GEANY_ABI_VERSION) \
88 return (api_required); \
117#define PLUGIN_SET_INFO(p_name, p_description, p_version, p_author) \
118 void plugin_set_info(PluginInfo *info) \
120 info->name = (p_name); \
121 info->description = (p_description); \
122 info->version = (p_version); \
123 info->author = (p_author); \
135#define PLUGIN_SET_TRANSLATABLE_INFO(localedir, package, p_name, p_description, p_version, p_author) \
136 void plugin_set_info(PluginInfo *info) \
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); \
225#define geany geany_data
310 gint min_api_version, gint abi_version);
312 gint min_api_version, gint abi_version,
313 gpointer data, GDestroyNotify free_func);
324#define GEANY_PLUGIN_REGISTER(plugin, min_api_version) \
325 geany_plugin_register((plugin), GEANY_API_VERSION, \
326 (min_api_version), GEANY_ABI_VERSION)
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))
373#define PROXY_IGNORED GEANY_PROXY_IGNORE
377#define PROXY_MATCHED GEANY_PROXY_MATCH
381#define PROXY_NOLOAD 0x100
403#ifndef GEANY_DISABLE_DEPRECATED
429#define PLUGIN_KEY_GROUP(group_name, key_count) \
432 GeanyKeyGroupInfo plugin_key_group_info[1] = \
434 {G_STRINGIFY(group_name), key_count} \
436 GeanyKeyGroup *plugin_key_group = NULL;
460#define document_reload_file document_reload_force
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
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_FOR(x)
void plugin_set_info(PluginInfo *info)
Use the PLUGIN_SET_INFO() macro to define it.
void geany_plugin_set_data(GeanyPlugin *plugin, gpointer data, GDestroyNotify free_func)
Add additional data that corresponds to the plugin.
struct GeanyData GeanyData
This contains pointers to global variables owned by Geany for plugins to use.
@ PLUGIN_IS_DOCUMENT_SENSITIVE
Whether a plugin's menu item should be disabled when there are no open documents.
gint plugin_version_check(gint abi_ver)
Use the PLUGIN_VERSION_CHECK() macro instead.
GeanyProxyProbeResults
Return values for GeanyProxyHooks::probe()
@ GEANY_PROXY_IGNORE
The proxy is not responsible at all, and Geany or other plugins are free to probe it.
@ GEANY_PROXY_RELATED
The proxy is does not directly load it, but it's still tied to the proxy.
@ GEANY_PROXY_MATCH
The proxy is responsible for this file, and creates a plugin for it.
struct PluginInfo PluginInfo
Basic information about a plugin available to Geany without loading the plugin.
struct GeanyFunctionsUndefined GeanyFunctions
struct PluginCallback PluginCallback
Callback array entry type used with the plugin_callbacks symbol.
void plugin_cleanup(void)
Called before unloading the plugin.
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.
void plugin_configure_single(GtkWidget *parent)
void plugin_init(GeanyData *data)
Called after loading the plugin.
void geany_load_module(GeanyPlugin *plugin)
Called by Geany when a plugin library is loaded.
gboolean geany_plugin_register(GeanyPlugin *plugin, gint api_version, gint min_api_version, gint abi_version)
Register a plugin to Geany.
gint geany_plugin_register_proxy(GeanyPlugin *plugin, const gchar **extensions)
Register the plugin as a proxy for other plugins.
GtkWidget * plugin_configure(GtkDialog *dialog)
Called before showing the plugin preferences dialog for multiple plugins.
gpointer geany_plugin_get_data(const GeanyPlugin *plugin)
Get the additional data that corresponds to the plugin.
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.
Important application fields.
This contains pointers to global variables owned by Geany for plugins to use.
struct GeanyTemplatePrefs * template_prefs
Template settings.
struct GeanyToolbarPrefs * toolbar_prefs
Toolbar settings.
struct GeanyEditorPrefs * editor_prefs
Editor settings.
GPtrArray * filetypes_array
Dynamic array of filetype pointers.
struct GeanyMainWidgets * main_widgets
Important widgets in the main window.
struct GeanyApp * app
Geany application data fields.
struct GeanyFilePrefs * file_prefs
File-related settings.
struct GeanyPrefs * prefs
General settings.
GPtrArray * documents_array
Dynamic array of GeanyDocument pointers.
struct GeanyToolPrefs * tool_prefs
Tool settings.
GSList * filetypes_by_title
List of filetype pointers sorted by name, but with filetypes_index(GEANY_FILETYPES_NONE) first,...
struct GeanyInterfacePrefs * interface_prefs
Interface settings.
struct GeanySearchPrefs * search_prefs
Search-related settings.
Default prefs when creating a new editor window.
const gchar * name
Group name used in the configuration file, such as "html_chars".
gsize count
The number of keybindings the group will hold.
Important widgets in the main window.
Callback functions that need to be implemented for every plugin.
gboolean(* init)(GeanyPlugin *plugin, gpointer pdata)
Called to initialize the plugin, when the user activates it (must not be NULL)
PluginCallback * callbacks
Array of plugin-provided signal handlers.
void(* help)(GeanyPlugin *plugin, gpointer pdata)
Called when the plugin should show some help, optional (can be NULL)
void(* cleanup)(GeanyPlugin *plugin, gpointer pdata)
Called when the plugin is disabled or when Geany exits (must not be NULL)
Basic information for the plugin and identification.
GeanyData * geany_data
Pointer to global GeanyData intance.
PluginInfo * info
Fields set in plugin_set_info().
GeanyProxyFuncs * proxy_funcs
Hooks implemented by the plugin if it wants to act as a proxy Must be set prior to calling geany_plug...
struct GeanyPluginPrivate * priv
GeanyPluginFuncs * funcs
Functions implemented by the plugin, set in geany_load_module()
General Preferences dialog settings.
Hooks that need to be implemented by every proxy.
void(* unload)(GeanyPlugin *proxy, GeanyPlugin *subplugin, gpointer load_data, gpointer pdata)
Called when the user initiates unloading of a plugin, e.g.
gint(* probe)(GeanyPlugin *proxy, const gchar *filename, gpointer pdata)
Called to determine whether the proxy is truly responsible for the requested plugin.
gpointer(* load)(GeanyPlugin *proxy, GeanyPlugin *subplugin, const gchar *filename, gpointer pdata)
Called after probe(), to perform the actual job of loading the plugin.
Callback array entry type used with the plugin_callbacks symbol.
gpointer user_data
The user data passed to the signal handler.
GCallback callback
A callback function which is called when the signal is emitted.
gboolean after
Set to TRUE to connect your handler with g_signal_connect_after().
const gchar * signal_name
The name of signal, must be an existing signal.
PluginFlags flags
Bitmask of PluginFlags.
GtkWidget * menu_item
Pointer to a plugin's menu item which will be automatically enabled/disabled when there are no open d...
Basic information about a plugin available to Geany without loading the plugin.
const gchar * version
The version of the plugin.
const gchar * description
The description of the plugin.
const gchar * name
The name of the plugin.
const gchar * author
The author of the plugin.
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...