![]() |
![]() |
![]() |
Caja-Actions™ Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <caja-actions/na-extension.h> gboolean na_extension_startup (GTypeModule *module
); guint na_extension_get_version (void
); guint na_extension_list_types (const GType **types
); void na_extension_shutdown (void
);
Caja-Actions™ accepts extensions as dynamically loadable libraries (aka plugins).
As of today, Caja-Actions™ may be extended in the following areas:
Storing menus and actions in a specific storage subsystem . This extension is provided via the public NAIIOProvider interface; it takes care of reading and writing menus and actions to a specific storage subsystem.
Exporting menus and actions . This extension is provided via the public NAIExporter interface; it takes care of exporting menus and actions to the filesystem from the Caja-Actions™ Configuration Tool user interface.
Importing menus and actions . This extension is provided via the public NAIImporter interface; it takes care of importing menus and actions from the filesystem into the Caja-Actions™ Configuration Tool user interface.
In order to be recognized as a valid Caja-Actions™ plugin, the library must at least export the functions described in this extension API.
The suggested way of producing a dynamically loadable library is to use autoconf, automake and libtool GNU applications.
In this case, it should be enough to use the -module
option in your Makefile.am
, as in:
libna_io_desktop_la_LDFLAGS = -module -no-undefined -avoid-version
Table 1. Historic of the versions of this extension API
Caja-Actions™ version | extension API version | |
---|---|---|
since 2.30 | 1 | current version |
gboolean na_extension_startup (GTypeModule *module
);
This function is called by the Caja-Actions plugin manager when the plugin library is first loaded in memory. The library may so take advantage of this call by initializing itself, registering its internal GType types, etc.
A Caja-Actions extension must implement this function in order to be considered as a valid candidate to dynamic load.