Top | ![]() |
![]() |
![]() |
![]() |
GPluginPluginInfo * | (*GPluginNativePluginQueryFunc) () |
gboolean | (*GPluginNativePluginLoadFunc) () |
gboolean | (*GPluginNativePluginUnloadFunc) () |
GModule * | gplugin_native_plugin_get_module () |
#define | GPLUGIN_NATIVE_PLUGIN_DECLARE() |
gpointer | load-func | Read / Write / Construct Only |
gpointer | module | Read / Write / Construct Only |
gpointer | unload-func | Read / Write / Construct Only |
GPluginPluginInfo *
(*GPluginNativePluginQueryFunc) (GError **error
);
Specifies the function signature for the query function of a plugin.
Since: 0.31.0
gboolean (*GPluginNativePluginLoadFunc) (GPluginPlugin *plugin
,GError **error
);
Specifies the function signature for the load function of a plugin.
Since: 0.31.0
gboolean (*GPluginNativePluginUnloadFunc) (GPluginPlugin *plugin
,GError **error
);
Specifies the function signature for the unload function of a plugin.
Since: 0.31.0
GModule *
gplugin_native_plugin_get_module (GPluginNativePlugin *plugin
);
Returns the GModule
associated with this plugin. This should really only
be used if you need to make your plugin resident.
[skip]
#define GPLUGIN_NATIVE_PLUGIN_DECLARE(name)
This macro expands to the proper functions that GPluginNativeLoader looks
for when querying a plugin. They will call user defined functions named
${name}_query
, ${name}_load
,
and ${name}_unload
which need to match the signatures
of GPluginNativePluginQueryFunc, GPluginNativePluginLoadFunc, and
GPluginNativePluginUnloadFunc.
This macro should be used over manually exporting the individual functions to help with updates as well as future features like static plugin loading.
1 |
GPLUGIN_NATIVE_PLUGIN_DECLARE(my_awesome_plugin) |
will expand to
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
G_MODULE_EXPORT GPluginPluginInfo *gplugin_query(GError **error); G_MODULE_EXPORT GPluginPluginInfo *gplugin_query(GError **error) { return my_awesome_plugin_query(error); } G_MODULE_EXPORT gboolean gplugin_load(GPluginPlugin *plugin, GError **error); G_MODULE_EXPORT gboolean gplugin_load(GPluginPlugin *plugin, GError **error) { return my_awesome_plugin_load(error); } G_MODULE_EXPORT gboolean gplugin_unload(GPluginPlugin *plugin, GError **error); G_MODULE_EXPORT gboolean gplugin_unload(GPluginPlugin *plugin, GError **error) { return my_awesome_plugin_unload(plugin, error); } |
Since: 0.31.0
#define GPLUGIN_TYPE_NATIVE_PLUGIN (gplugin_native_plugin_get_type())
The standard _get_type macro for GPluginNativePlugin.
“load-func”
property “load-func” gpointer
A function pointer to the load method of the plugin.
Owner: GPluginNativePlugin
Flags: Read / Write / Construct Only
“module”
property “module” gpointer
The GModule instance for this plugin.
Owner: GPluginNativePlugin
Flags: Read / Write / Construct Only