--- a/gplugin/reference/gplugin-docs.xml Thu Aug 15 20:49:42 2019 -0500
+++ b/gplugin/reference/gplugin-docs.xml Thu Aug 15 21:56:36 2019 -0500
@@ -23,7 +23,9 @@
<xi:include href="embedding.xml"/>
+ <xi:include href="lua.xml"/> <xi:include href="native-plugins.xml"/>
+ <xi:include href="python.xml"/> <part id="object-hierarchy">
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/lua.xml Thu Aug 15 21:56:36 2019 -0500
@@ -0,0 +1,56 @@
+<?xml version='1.0' encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ +<chapter id="chapter-lua"> + <title>Lua Plugins</title> + You <emphasis role="strong">MUST</emphasis> have the Lua loader + plugin installed and working as well as the gobject-introspection + package for GPlugin installed to use Lua plugins. + <title>Example Lua Plugin</title> + Like all plugins in GPlugin, Lua plugins must also implement + the <code>gplugin_query</code>, <code>gplugin_load</code>, and + <code>gplugin_unload</code> functions. + The following is a basic Lua plugin. + <informalexample><programlisting> + local lgi = require 'lgi' + local GPlugin = lgi.GPlugin + function gplugin_query() + return GPlugin.PluginInfo { + id = "gplugin-lua/basic-plugin", + abi_version = 0x01020304, + license_id = "license-id", + summary = "basic lua plugin", + description = "description of the basic lua plugin", + authors = { "Gary Kramlich <grim@reaperworld.com>" }, + website = "http://bitbucket.org/gplugin/main/" + function gplugin_load(plugin) + function gplugin_unload(plugin) + </programlisting></informalexample> --- a/gplugin/reference/meson.build Thu Aug 15 20:49:42 2019 -0500
+++ b/gplugin/reference/meson.build Thu Aug 15 21:56:36 2019 -0500
@@ -17,12 +17,6 @@
'--deprecated-guards=GPLUGIN_DISABLE_DEPRECATED',
- '--ignore-headers=' + ' '.join(ignore_hfiles),
-# Extra options to supply to gtkdoc-mkdb.
- '--ignore-files=' + ' '.join(ignore_hfiles),
gplugin_version_xml = configure_file(
@@ -31,15 +25,19 @@
configuration : version_conf)
main_xml : DOC_MODULE + '-docs.xml',
dependencies : gplugin_dep,
+ ignore_headers : ignore_hfiles,
gobject_typesfile : DOC_MODULE + '.types',
content_files : content_files,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/native-plugins.xml Thu Aug 15 21:56:36 2019 -0500
@@ -0,0 +1,79 @@
+<?xml version='1.0' encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ +<chapter id="chapter-native-plugins"> + <title>Writing Native Plugins</title> + <simplesect id="intro"> + Writing Native plugins is like most other GPlugin Plugins very simple, + but since it's C/C++ it's a bit more complicated. + There are currently no C++ bindings and no intention to write them. + <simplesect id="example"> + <informalexample><programlisting> + #include <gplugin.h> + #include <gplugin-native.h> + /* gplugin_plugin_query is called by the native loader to determine if + * the plugin is loadable. It must have this signature and should + * return a valid GPluginPluginInfo if everything is fine. If something + * went wrong, error should be set to a valid GError and NULL should be + G_MODULE_EXPORT GPluginPluginInfo * + gplugin_plugin_query(GError **error) { + /* Authors is a list of authors of the plugin. Generally these are + * in the "Name Surname <user@domain.com>" format. + const gchar * const authors[] = { + /* gplugin_plugin_info_new only requires that the id be set, and the + * rest are here for demonstration purposes. + return gplugin_plugin_info_new( + "gplugin/basic-native-plugin", + GPLUGIN_NATIVE_PLUGIN_ABI_VERSION, + "description", "description", + /* gplugin_plugin_load is called by the loader when the plugin should + * be loaded. It must have this exact signature and return TRUE if + * loading was successful, otherwise it should return FALSE with error + * set to a valid GError. + G_MODULE_EXPORT gboolean + gplugin_plugin_load(GPluginNativePlugin *plugin, GError **error) { + /* gplugin_plugin_unload is called by the loader when the plugin should + * be unloaded. It must have this exact signature and should return TRUE + * if unloading was successful, otherwise it should return FALSE with + * error set to a valid GError. + G_MODULE_EXPORT gboolean + gplugin_plugin_unload(GPluginNativePlugin *plugin, GError **error) { + </programlisting></informalexample> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/python.xml Thu Aug 15 21:56:36 2019 -0500
@@ -0,0 +1,56 @@
+<?xml version='1.0' encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ +<chapter id="chapter-python"> + <title>Python Plugins</title> + You <emphasis role="strong">MUST</emphasis> have the Python loader + plugin installed and working as well as the gobject-introspection + package for GPlugin installed to use Python plugins. + <title>Example Python Plugin</title> + Like all plugins in GPlugin, Python plugins must also implement + the <code>gplugin_query</code>, <code>gplugin_load</code>, and + <code>gplugin_unload</code> functions. + The following is a basic Python plugin. + <informalexample><programlisting> + gi.require_version('GPlugin', '0.0') + from gi.repository import GPlugin + def gplugin_plugin_query(): + return GPlugin.PluginInfo( + id='gplugin-python/basic-plugin', + abi_version=0x01020304, + description='description', + def gplugin_plugin_load(plugin): + def gplugin_plugin_unload(plugin): + </programlisting></informalexample>