na-extension

na-extension

Synopsis

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);

Description

Details

na_extension_startup ()

gboolean            na_extension_startup                (GTypeModule *module);

This function is called by the Nautilus-Actions plugin manager when the library is first loaded in memory. The library may so take advantage of this call by initializing itself, registering its internal GType types, etc.

module :

the GTypeModule of the library being loaded.

Returns :

TRUE if the initialization is successfull, FALSE else. In this later case, the library is unloaded and no more considered. A Nautilus-Actions extension must implement this function in order to be considered as a valid candidate to dynamic load.

na_extension_get_version ()

guint               na_extension_get_version            (void);

Returns :

the version of this API supported by the module. If this function is not exported by the library, or returns zero, the plugin manager considers that the library only implements the version 1 of this API.

na_extension_list_types ()

guint               na_extension_list_types             (const GType **types);

Returned GType types must already have been registered in the GType system (e.g. at #na_extension_startup() time), and may implement one or more of the interfaces defined in Nautilus-Actions API.

The Nautilus-Actions plugin manager will instantiate one GTypeInstance- derived object for each returned GType type, and associate these objects to this library.

types :

the address where to store the zero-terminated array of instantiable GType types this library implements.

Returns :

the number of GType types returned in the types array, not counting the terminating zero item. A Nautilus-Actions extension must implement this function in order to be considered as a valid candidate to dynamic load. If this function is not exported by the library, or returns zero, the plugin manager considers that the library doesn't implement any Nautilus-Action interface. In this case, the library is unloaded and no more considered.

na_extension_shutdown ()

void                na_extension_shutdown               (void);

This function is called by Nautilus-Actions when it is about to shutdown itself.

The dynamicaly loaded library may take advantage of this call to release any resource it may have previously allocated.