API Documentation¶
GeanyPy’s API mimics quite closely Geany’s C plugin API. The following documentation is broken down by file/module:
The geany modules:
The geany package and module¶
All of GeanyPy’s bindings are inside the geany package which also
contains some stuff in it’s __init__ file, acting like a module itself.
-
geany.main_widgets¶ An instance of
mainwidgets.MainWidgetsto provide access to Geany’s important GTK+ widgets.
-
geany.signals¶ An instance of
signalmanager.SignalManagerwhich manages the connection, disconnection, and emission of Geany’s signals. You can use this as follows:geany.signals.connect('document-open', some_callback_function)
-
geany.is_realized()¶ This function, which is actually in the
geany.mainmodule will tell you if Geany’s main window is realized (shown).
-
geany.locale_init()¶ Again, from the
geany.mainmodule, this will initialize the gettext translation system.
-
geany.reload_configuration()¶ Also from the
geany.mainmodule, this function will cause Geany to reload most if it’s configuration files without restarting.Currently the following files are reloaded:
- all template files
- new file templates
- the New (with template) menus will be updated
- Snippets (snippets.conf)
- filetype extensions (filetype_extensions.conf)
- settings and build_settings sections of the filetype definition files.
Plugins may call this function if they changed any of these files (e.g. a configuration file editor plugin).