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.MainWidgets
to provide access to Geany’s important GTK+ widgets.
-
geany.
signals
¶ An instance of
signalmanager.SignalManager
which 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.main
module will tell you if Geany’s main window is realized (shown).
-
geany.
locale_init
()¶ Again, from the
geany.main
module, this will initialize the gettext translation system.
-
geany.
reload_configuration
()¶ Also from the
geany.main
module, 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).