Geany dev
|
Structure serving as an interface between plugins and Geany allowing plugins to inform Geany about what features they provide and allowing Geany to delegate its functionality to the plugins. More...
#include <pluginextension.h>
Data Fields | |
void(* | autocomplete_perform )(GeanyDocument *doc, gboolean force, gpointer data) |
Pointer to function called by Geany to inform the plugin to perform autocompletion, e.g by showing an autocompletion popup window with suggestions. More... | |
gboolean(* | autocomplete_provided )(GeanyDocument *doc, gpointer data) |
Pointer to function called by Geany to check whether the plugin implements autocompletion for the provided document. More... | |
gboolean(* | calltips_provided )(GeanyDocument *doc, gpointer data) |
Pointer to function called by Geany to check whether the plugin implements calltips containing function signatures for the provided document. More... | |
void(* | calltips_show )(GeanyDocument *doc, gboolean force, gpointer data) |
Pointer to function called by Geany to inform the plugin to show calltips. More... | |
gboolean(* | goto_perform )(GeanyDocument *doc, gint pos, gboolean definition, gpointer data) |
Pointer to function called by Geany to inform the plugin to perform symbol goto. More... | |
gboolean(* | goto_provided )(GeanyDocument *doc, gpointer data) |
Pointer to function called by Geany to check whether the plugin implements symbol definition/declaration goto functionality. More... | |
gboolean(* | symbol_highlight_provided )(GeanyDocument *doc, gpointer data) |
Pointer to function called by Geany to check whether the plugin implements additional symbol (e.g. More... | |
Structure serving as an interface between plugins and Geany allowing plugins to inform Geany about what features they provide and allowing Geany to delegate its functionality to the plugins.
Depending on the functionality they provide, plugins should assign pointers to the functions implementing this interface to the appropriate members of the structure. Not all of the functions have to be implemented by the plugin - member pointers of unimplemented functions can be left to contain the NULL
pointer.
Typically, functions from this interface come in pairs. Functions assigned to the members ending with _provided
inform Geany whether the plugin implements the given feature for the passed document. Functions assigned to the members ending with _perform
are called by Geany at appropriate moments to inform the plugin when to perform the given feature.
The extension is defined by the pointers in the PluginExtension structure and is registered in Geany using the plugin_extension_register()
function.
void(* PluginExtension::autocomplete_perform) (GeanyDocument *doc, gboolean force, gpointer data) |
Pointer to function called by Geany to inform the plugin to perform autocompletion, e.g by showing an autocompletion popup window with suggestions.
doc | The document for which autocompletion is being performed. |
force | TRUE when autocompletion was requested explicitly by the user, e.g. by pressing a keybinding requesting the autocompletion popup to appear. FALSE means autocompletion is being auto-performed as the user types, possibly allowing the plugin not to do anything if there are no meaningful suggestions. |
data | User data passed during the plugin_extension_register() call. |
gboolean(* PluginExtension::autocomplete_provided) (GeanyDocument *doc, gpointer data) |
Pointer to function called by Geany to check whether the plugin implements autocompletion for the provided document.
doc | The document for which Geany is querying whether the plugin provides autocompletion. This allows plugins to restrict their autocompletion implementation to documents of specific filetypes or other characteristics. |
data | User data passed during the plugin_extension_register() call. |
TRUE
if they impelment autocompletion for the provided document, FALSE
otherwise.gboolean(* PluginExtension::calltips_provided) (GeanyDocument *doc, gpointer data) |
Pointer to function called by Geany to check whether the plugin implements calltips containing function signatures for the provided document.
autocomplete_provided()
for more details.void(* PluginExtension::calltips_show) (GeanyDocument *doc, gboolean force, gpointer data) |
Pointer to function called by Geany to inform the plugin to show calltips.
autocomplete_perform()
for more details.gboolean(* PluginExtension::goto_perform) (GeanyDocument *doc, gint pos, gboolean definition, gpointer data) |
Pointer to function called by Geany to inform the plugin to perform symbol goto.
doc | The document for which symbol goto is being performed. |
pos | Scintilla position in the document at which the goto request was invoked (typically corresponds to the caret position or the position where the corresponding mouse event happened). |
definition | If TRUE , this is the go to definition request, if FALSE , this is the goto declaration request. |
data | User data passed during the plugin_extension_register() call. |
TRUE
if the goto was performed, FALSE
otherwise. Plugins that work asynchronously and do not know the result at the moment this function is called should return TRUE
. However, such plugins can perform some synchronous pre-check such as whether there is an identifier at the caret position and if the necessary conditions are not satisfied and the plugins know that goto cannot be performed, they should return FALSE
.gboolean(* PluginExtension::goto_provided) (GeanyDocument *doc, gpointer data) |
Pointer to function called by Geany to check whether the plugin implements symbol definition/declaration goto functionality.
autocomplete_provided()
for more details.gboolean(* PluginExtension::symbol_highlight_provided) (GeanyDocument *doc, gpointer data) |
Pointer to function called by Geany to check whether the plugin implements additional symbol (e.g.
type) highlighting in Scintilla.
autocomplete_provided()
for more details. PluginExtension
structure informing plugins to perform symbol highlighting. Plugins implementing symbol highlighting should perform it at the appropriate moments based on Scintilla and Geany events such as when the document becomes visible or when the document is modified.