Geany
1.23.1
|
This file defines the plugin API, the interface between Geany and its plugins. More...
Data Structures | |
struct | GeanyData |
This contains pointers to global variables owned by Geany for plugins to use. More... | |
struct | GeanyFunctions |
This contains pointers to functions owned by Geany for plugins to use. More... | |
struct | GeanyKeyGroupInfo |
struct | GeanyPlugin |
Basic information for the plugin and identification. More... | |
struct | PluginCallback |
Callback array entry type used with the plugin_callbacks symbol. More... | |
struct | PluginFields |
struct | PluginInfo |
Basic information about a plugin available to Geany without loading the plugin. More... | |
struct | SciFuncs |
Wrapper functions for Scintilla messages. More... | |
struct | ScintillaFuncs |
See http://scintilla.org for the full documentation. More... | |
Macros | |
#define | DOC_IDX(doc_ptr) (doc_ptr ? doc_ptr->index : -1) |
#define | geany geany_data |
Simple macro for geany_data that reduces typing. More... | |
#define | GEANY_ABI_VERSION 69 |
The Application Binary Interface (ABI) version, incremented whenever existing fields in the plugin data types have to be changed or reordered. More... | |
#define | GEANY_API_VERSION 216 |
The Application Programming Interface (API) version, incremented whenever any plugin data types are modified or appended to. More... | |
#define | PLUGIN_KEY_GROUP(group_name, key_count) |
#define | PLUGIN_SET_INFO(p_name, p_description, p_version, p_author) |
Sets the plugin name and some other basic information about a plugin. More... | |
#define | PLUGIN_SET_TRANSLATABLE_INFO(localedir, package, p_name, p_description, p_version, p_author) |
Sets the plugin name and some other basic information about a plugin. More... | |
#define | PLUGIN_VERSION_CHECK(api_required) |
Defines a function to check the plugin is safe to load. More... | |
Typedefs | |
typedef struct GeanyData | GeanyData |
This contains pointers to global variables owned by Geany for plugins to use. More... | |
typedef struct GeanyFunctions | GeanyFunctions |
This contains pointers to functions owned by Geany for plugins to use. More... | |
typedef struct GeanyKeyGroupInfo | GeanyKeyGroupInfo |
typedef struct GeanyPlugin | GeanyPlugin |
Basic information for the plugin and identification. More... | |
typedef struct PluginCallback | PluginCallback |
Callback array entry type used with the plugin_callbacks symbol. More... | |
typedef struct PluginFields | PluginFields |
typedef struct PluginInfo | PluginInfo |
Basic information about a plugin available to Geany without loading the plugin. More... | |
typedef struct SciFuncs | SciFuncs |
Wrapper functions for Scintilla messages. More... | |
typedef struct ScintillaFuncs | ScintillaFuncs |
See http://scintilla.org for the full documentation. More... | |
Enumerations | |
enum | PluginFlags { PLUGIN_IS_DOCUMENT_SENSITIVE = 1 << 0 } |
This file defines the plugin API, the interface between Geany and its plugins.
For detailed documentation of the plugin system please read the plugin API documentation.
#define DOC_IDX | ( | doc_ptr | ) | (doc_ptr ? doc_ptr->index : -1) |
NULL-safe
way to get the index of doc_ptr in the documents array.
#define geany geany_data |
Simple macro for geany_data
that reduces typing.
#define GEANY_ABI_VERSION 69 |
The Application Binary Interface (ABI) version, incremented whenever existing fields in the plugin data types have to be changed or reordered.
Changing this forces all plugins to be recompiled before Geany can load them.
#define GEANY_API_VERSION 216 |
The Application Programming Interface (API) version, incremented whenever any plugin data types are modified or appended to.
You can protect code that needs a higher API than e.g. 200 with:
GEANY_API_VERSION
was defined as an enum value, not a macro. #define PLUGIN_KEY_GROUP | ( | group_name, | |
key_count | |||
) |
Declare and initialise a keybinding group.
You must then set the plugin_key_group::keys
[] entries for the group in plugin_init(), normally using keybindings_set_item(). The plugin_key_group::label
field is set by Geany after plugin_init()
is called, to the name of the plugin.
group_name | A unique group name (without quotes) to be used in the configuration file, such as html_chars . |
key_count | The number of keybindings the group will hold. |
#define PLUGIN_SET_INFO | ( | p_name, | |
p_description, | |||
p_version, | |||
p_author | |||
) |
Sets the plugin name and some other basic information about a plugin.
Example:
#define PLUGIN_SET_TRANSLATABLE_INFO | ( | localedir, | |
package, | |||
p_name, | |||
p_description, | |||
p_version, | |||
p_author | |||
) |
Sets the plugin name and some other basic information about a plugin.
This macro is like PLUGIN_SET_INFO() but allows the passed information to be translated by setting up the translation mechanism with main_locale_init(). You therefore don't need to call it manually in plugin_init().
Example:
#define PLUGIN_VERSION_CHECK | ( | api_required | ) |
Defines a function to check the plugin is safe to load.
This performs runtime checks that try to ensure:
api_required | The minimum API number your plugin requires. Look at the source for the value of GEANY_API_VERSION to use if you want your plugin to require the current Geany version on your machine. You should update this value when using any new API features. |
This contains pointers to global variables owned by Geany for plugins to use.
Core variable pointers can be appended when needed by plugin authors, if appropriate.
typedef struct GeanyFunctions GeanyFunctions |
This contains pointers to functions owned by Geany for plugins to use.
Functions from the core can be appended when needed by plugin authors, but may require some changes.
typedef struct GeanyKeyGroupInfo GeanyKeyGroupInfo |
typedef struct GeanyPlugin GeanyPlugin |
Basic information for the plugin and identification.
typedef struct PluginCallback PluginCallback |
Callback array entry type used with the plugin_callbacks symbol.
typedef struct PluginFields PluginFields |
Fields set and owned by the plugin.
typedef struct PluginInfo PluginInfo |
Basic information about a plugin available to Geany without loading the plugin.
The fields are set in plugin_set_info(), usually with the PLUGIN_SET_INFO() macro.
Wrapper functions for Scintilla messages.
See sciwrappers.h for the list of functions.
typedef struct ScintillaFuncs ScintillaFuncs |
See http://scintilla.org for the full documentation.
enum PluginFlags |
Flags to be set by plugins in PluginFields struct.
Enumerator | |
---|---|
PLUGIN_IS_DOCUMENT_SENSITIVE |
Whether a plugin's menu item should be disabled when there are no open documents. |