Migrate to gi-docgen
gi-docgen is apparently the future and it works much faster with no extra work like updating `gplugin-docs.xml` that gtk-doc required.
However, there are a few additional python dependencies for gi-docgen, notably `python3-jinja2`, `python3-pygments`, `python3-toml`, `python3-typogrify`. I'm in the process of updating the builders right now as the docs build by default now.
Testing Done:
Ran locally and via the new convey plan.
Reviewed at https://reviews.imfreedom.org/r/905/
--- a/.hgignore Tue Aug 24 00:12:10 2021 -0500
+++ b/.hgignore Mon Aug 30 02:24:49 2021 -0500
@@ -17,3 +17,5 @@
--- a/convey.yml Tue Aug 24 00:12:10 2021 -0500
+++ b/convey.yml Mon Aug 30 02:24:49 2021 -0500
@@ -85,8 +85,8 @@
- - build-docs/gplugin/reference/html:gplugin-docs
- - build-docs/gplugin-gtk/reference/html:gplugin-gtk-docs
+ - build-docs/gplugin/reference/gplugin:gplugin-docs + - build-docs/gplugin-gtk/reference/gplugin-gtk:gplugin-gtk-docs --- a/gplugin-gtk/meson.build Tue Aug 24 00:12:10 2021 -0500
+++ b/gplugin-gtk/meson.build Mon Aug 30 02:24:49 2021 -0500
@@ -141,7 +141,7 @@
###############################################################################
###############################################################################
--- a/gplugin-gtk/reference/Dockerfile Tue Aug 24 00:12:10 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
--- a/gplugin-gtk/reference/gplugin-gtk-docs.xml Tue Aug 24 00:12:10 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
-<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
-<!ENTITY version SYSTEM "version.xml">
-<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
- <title>GPlugin Gtk Reference Manual</title>
- <title>GPluginGtk &version;</title>
- GPluginGtk is a collection of Gtk widgets to make it easier to
- integrate GPlugin into applications.
- The latest version of this documentation can be found on-line at
- <ulink role="online-location" url="https://docs.pidgin.im/gplugin-gtk/latest">https://docs.pidgin.im/gplugin-gtk/latest/</ulink>.
- <part id="object-hierarchy">
- <title>Object Hierarchy</title>
- <xi:include href="xml/tree_index.sgml"/>
- <title>API Reference</title>
- <xi:include href="xml/gplugin-gtk-plugin-info.xml"/>
- <xi:include href="xml/gplugin-gtk-store.xml"/>
- <xi:include href="xml/gplugin-gtk-view.xml"/>
- <index id="api-index-full">
- <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
- <index id="api-index-deprecated" role="deprecated">
- <title>Index of deprecated symbols</title>
- <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
- <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin-gtk/reference/gplugin-gtk.toml.in Mon Aug 30 02:24:49 2021 -0500
@@ -0,0 +1,48 @@
+version = "@GPLUGIN_VERSION@" +browse_url = "https://keep.imfreedom.org/gplugin/gplugin/" +repository_url = "https://keep.imfreedom.org/gplugin/gplugin/" +website_url = "https://keep.imfreedom.org/gplugin/gplugin/" +authors = "GPlugin Developers" +license = "LGPL-2.1-or-later" +description = "GPlugin Gtk Library" +dependencies = [ "GLib-2.0", "GObject-2.0", "GPlugin-1.0", "Gtk-3.0" ] + [dependencies."GLib-2.0"] + description = "General-purpose, portable utility library." + docs_url = "https://docs.gtk.org/glib/" + [dependencies."GObject-2.0"] + description = "The base type system library" + docs_url = "https://docs.gtk.org/gobject/" + [dependencies."GPlugin-1.0"] + description = "Plugin library" + docs_url = "https://docs.imfreedom.org/gplugin" + [dependencies."Gtk-3.0"] + description = "Gtk Widget Toolkit" + docs_url = "https://docs.gtk.org/gtk3/" +show_index_summary = true +show_class_hierarchy = true +base_url = "https://keep.imfreedom.org/gplugin/gplugin/file/default/" +# The same order will be used when generating the index +urlmap_file = "urlmap.js" --- a/gplugin-gtk/reference/meson.build Tue Aug 24 00:12:10 2021 -0500
+++ b/gplugin-gtk/reference/meson.build Mon Aug 30 02:24:49 2021 -0500
@@ -1,42 +1,31 @@
-DOC_MODULE = 'gplugin-gtk'
-# Header files or dirs to ignore when scanning. Use base file/dir names
- 'gplugin-gtk-resources.h',
-ignore_hfiles += GPLUGIN_GTK_PRIVATE_HEADERS
-# Extra options to supply to gtkdoc-scan.
- '--deprecated-guards=GPLUGIN_GTK_DISABLE_DEPRECATED',
- '--extra-dir=' + (meson.project_build_root() / 'gplugin/reference/')
+ gplugin_gtk_toml = configure_file( + input : 'gplugin-gtk.toml.in', + output : 'gplugin-gtk.toml', + configuration : version_conf, + install_dir : docs_dir / 'gplugin-gtk', -gplugin_gtk_version_xml = configure_file(
- input : 'version.xml.in',
- output : 'version.xml',
- configuration : version_conf)
-content_files += gplugin_doc
+ gplugin_gtk_doc = custom_target('gplugin-gtk-doc', + input : [ gplugin_gtk_toml, gplugin_gtk_gir[0] ], + output : 'gplugin-gtk', + '--add-include-path=@0@'.format(meson.project_build_root() / 'gplugin'), + '--output-dir=@OUTPUT@', + '--content-dir=@0@'.format(meson.current_source_dir()), + depends : [ gplugin_gir[0] ], + build_by_default : true, + install_dir : docs_dir, -gplugin_gtk_doc = gnome.gtkdoc(DOC_MODULE,
- main_xml : DOC_MODULE + '-docs.xml',
- namespace : 'gplugin_gtk',
- src_dir : gplugin_gtk_inc,
- dependencies : gplugin_gtk_dep,
- ignore_headers : ignore_hfiles,
- gobject_typesfile : DOC_MODULE + '.types',
- content_files : content_files,
- fixxref_args : fixxref_args,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin-gtk/reference/urlmap.js Mon Aug 30 02:24:49 2021 -0500
@@ -0,0 +1,11 @@
+// SPDX-FileCopyrightText: 2021 GNOME Foundation +// SPDX-License-Identifier: LGPL-2.1-or-later +// A map between namespaces and base URLs for their online documentation + [ 'GLib', 'https://docs.gtk.org/glib/' ], + [ 'GObject', 'https://docs.gtk.org/gobject/' ], + [ 'GPlugin', 'https://docs.imfreedom.org/gplugin' ], + [ 'GModule', 'https://docs.gtk.org/gmodule/' ], + [ 'Gtk3', 'https://docs.gtk.org/gtk3/' ], --- a/gplugin-gtk/reference/version.xml.in Tue Aug 24 00:12:10 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
--- a/gplugin/meson.build Tue Aug 24 00:12:10 2021 -0500
+++ b/gplugin/meson.build Mon Aug 30 02:24:49 2021 -0500
@@ -229,6 +229,6 @@
--- a/gplugin/reference/Dockerfile Tue Aug 24 00:12:10 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/embedding.md Mon Aug 30 02:24:49 2021 -0500
@@ -0,0 +1,47 @@
+Title: Embedding GPlugin +You can embed GPlugin into any language that has GObject-Introspection support, +but in this example we're going to look at embedding GPlugin into a C based +GPlugin was designed to be simple to implement and use. Initialization and +teardown examples can be found below. +During the start up of your application you need to add the following +/* Create a variable to hold the default manager instance. */ +GPluginManager *manager = NULL; +/* Initialize the GPlugin library */ +/* Get a pointer to the default GPluginManager instance. */ +manager = gplugin_manager_get_default(); +/* Tell GPlugin to look for plugins in its default paths */ +gplugin_manager_add_default_paths(manager); +/* Optionally tell GPlugin to look for plugins in application specific + * paths. This will add `$PREFIX/lib/application`. +gplugin_manager_add_app_paths(manager, PREFIX, "application"); +/* Once you're ready to find/load plugins call g_plugin_manager_refresh. */ +gplugin_manager_refresh(manager); +When your application is shutting down you need to uninitialize GPlugin by --- a/gplugin/reference/embedding.xml Tue Aug 24 00:12:10 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-<?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-embedding">
- <title>Embedding GPlugin</title>
- <simplesect id="intro">
- You can embed GPlugin into any language that has GObject-Introspection
- support, but in this example we're going to look at embedding GPlugin
- into a C based project.
- GPlugin was designed to be simple to implement and use. Initialization
- and teardown examples can be found below.
- <simplesect id="initialization">
- During the start up of your application you need to add the following
- <informalexample><programlisting>
- /* Initialize the GPlugin library */
- /* Tell GPlugin to look for plugins in its default paths */
- gplugin_manager_add_default_paths();
- /* Optionally tell GPlugin to look for plugins in application specific
- * paths. This will add `$PREFIX/lib/application`.
- gplugin_manager_add_app_paths(PREFIX, "application");
- /* Once you're ready to find/load plugins call g_plugin_manager_refresh.
- gplugin_manager_refresh();
- </programlisting></informalexample>
- <simplesect id="shutdown">
- When your application is shutting down you need to uninitialize GPlugin
- <informalexample><programlisting>
- </programlisting></informalexample>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/genie.md Mon Aug 30 02:24:49 2021 -0500
@@ -0,0 +1,54 @@
+Title: Genie Plugin Example +> You **MUST** have the Vala bindings installed on your system for this to +> work. They are built by the default GPlugin build. +### Example Genie Plugin +Like all plugins in GPlugin, Genie plugins must also implement the +`gplugin_query`, `gplugin_load`, and `gplugin_unload` functions. +Due to the way `GPlugin.PluginInfo` info works, you must subclass it and set +your values in the new constructor. +The following is a basic Genie plugin. +class BasicPluginInfo : GPlugin.PluginInfo + authors : array of string = {"author1"} + id: "gplugin/genie-basic-plugin", + abi_version: 0x01020304, + description: "description" +def gplugin_query(out error : Error) : GPlugin.PluginInfo + return new BasicPluginInfo() +def gplugin_load(plugin : GPlugin.Plugin, out error : Error) : bool +def gplugin_unload(plugin : GPlugin.Plugin, out error : Error) : bool --- a/gplugin/reference/genie.xml Tue Aug 24 00:12:10 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-<?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-genie">
- <title>Genie Plugins</title>
- You <emphasis role="strong">MUST</emphasis> have the Vala bindings
- installed on your system for this to work. They are built by the
- <title>Example Genie Plugin</title>
- Like all plugins in GPlugin, Genie plugins must also implement
- the <code>gplugin_query</code>, <code>gplugin_load</code>, and
- <code>gplugin_unload</code> functions.
- Due to the way <code>GPlugin.PluginInfo</code> info works, you must
- subclass it and set your values in the new constructor.
- The following is a basic Genie plugin.
- <informalexample><programlisting>
- class BasicPluginInfo : GPlugin.PluginInfo
- authors : array of string = {"author1"}
- id: "gplugin/genie-basic-plugin",
- abi_version: 0x01020304,
- description: "description"
- def gplugin_query(out error : Error) : GPlugin.PluginInfo
- return new BasicPluginInfo()
- def gplugin_load(plugin : GPlugin.Plugin, out error : Error) : bool
- def gplugin_unload(plugin : GPlugin.Plugin, out error : Error) : bool
- </programlisting></informalexample>
--- a/gplugin/reference/gplugin-docs.xml Tue Aug 24 00:12:10 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
-<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
-<!ENTITY version SYSTEM "version.xml">
-<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
- <title>GPlugin Reference Manual</title>
- <title>GPlugin &version;</title>
- GPlugin is a GObject based library that implements a reusable plugin
- system that supports loading plugins in other languages via loaders.
- GPlugin also implements dependencies among the plugins.
- The latest version of this documentation can be found on-line at
- <ulink role="online-location" url="https://docs.pidgin.im/gplugin/latest">https://docs.pidgin.im/gplugin/latest/</ulink>.
- <title>Tutorials</title>
- <xi:include href="embedding.xml"/>
- <xi:include href="genie.xml"/>
- <xi:include href="lua.xml"/>
- <xi:include href="native-plugins.xml"/>
- <xi:include href="perl5.xml"/>
- <xi:include href="python3.xml"/>
- <xi:include href="vala.xml"/>
- <part id="object-hierarchy">
- <title>Object Hierarchy</title>
- <xi:include href="xml/tree_index.sgml"/>
- <title>API Reference</title>
- <xi:include href="xml/gplugin-core.xml"/>
- <xi:include href="xml/gplugin-loader.xml"/>
- <xi:include href="xml/gplugin-manager.xml"/>
- <xi:include href="xml/gplugin-options.xml"/>
- <xi:include href="xml/gplugin-plugin-info.xml"/>
- <xi:include href="xml/gplugin-plugin.xml"/>
- <xi:include href="xml/gplugin-version.xml"/>
- <title>Native API Reference</title>
- <xi:include href="xml/gplugin-native-loader.xml"/>
- <xi:include href="xml/gplugin-native-plugin.xml"/>
- <index id="api-index-full">
- <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
- <index id="api-index-deprecated" role="deprecated">
- <title>Index of deprecated symbols</title>
- <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
- <index id="api-0.31.0">
- <title>Index of new symbols in 0.31.0</title>
- <xi:include href="xml/api-index-0.31.0.xml"><xi:fallback /></xi:include>
- <index id="api-0.32.0">
- <title>Index of new symbols in 0.32.0</title>
- <xi:include href="xml/api-index-0.32.0.xml"><xi:fallback /></xi:include>
- <index id="api-0.33.0">
- <title>Index of new symbols in 0.33.0</title>
- <xi:include href="xml/api-index-0.33.0.xml"><xi:fallback /></xi:include>
- <index id="api-0.34.0">
- <title>Index of new symbols in 0.34.0</title>
- <xi:include href="xml/api-index-0.34.0.xml"><xi:fallback /></xi:include>
- <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/gplugin.toml.in Mon Aug 30 02:24:49 2021 -0500
@@ -0,0 +1,50 @@
+version = "@GPLUGIN_VERSION@" +browse_url = "https://keep.imfreedom.org/gplugin/gplugin/" +repository_url = "https://keep.imfreedom.org/gplugin/gplugin/" +website_url = "https://keep.imfreedom.org/gplugin/gplugin/" +authors = "GPlugin Developers" +license = "LGPL-2.1-or-later" +description = "GPlugin Plugin Library" +dependencies = [ "GLib-2.0", "GObject-2.0", "GModule-2.0" ] + [dependencies."GLib-2.0"] + description = "General-purpose, portable utility library." + docs_url = "https://docs.gtk.org/glib/" + [dependencies."GObject-2.0"] + description = "The base type system library" + docs_url = "https://docs.gtk.org/gobject/" + [dependencies."GModule-2.0"] + description = "Portable API for dynamically loading modules" + docs_url = "https://docs.gtk.org/gmodule/" +show_index_summary = true +show_class_hierarchy = true +base_url = "https://keep.imfreedom.org/gplugin/gplugin/file/default/" +# The same order will be used when generating the index +urlmap_file = "urlmap.js" --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/lua.md Mon Aug 30 02:24:49 2021 -0500
@@ -0,0 +1,43 @@
+> You **MUST** have the Lua loader plugin installed and working as well as the +> gobject-introspection package for GPlugin instance to use Lua plugins. +Like all plugins in GPlugin, Lua plugins must also implement the +`gplugin_query`, `gplugin_load`, and `gplugin_unload` functions. +The following is a basic Lua plugin. +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 = "https://keep.imfreedom.org/gplugin/gplugin/" +function gplugin_load(plugin) +function gplugin_unload(plugin) --- a/gplugin/reference/lua.xml Tue Aug 24 00:12:10 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-<?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 = "https://keep.imfreedom.org/gplugin/gplugin/"
- function gplugin_load(plugin)
- function gplugin_unload(plugin)
- </programlisting></informalexample>
--- a/gplugin/reference/meson.build Tue Aug 24 00:12:10 2021 -0500
+++ b/gplugin/reference/meson.build Mon Aug 30 02:24:49 2021 -0500
@@ -1,46 +1,40 @@
-# Header files or dirs to ignore when scanning. Use base file/dir names
- 'gplugin-loader-tests.h',
-ignore_hfiles += GPLUGIN_PRIVATE_HEADERS
-# Extra options to supply to gtkdoc-scan.
- '--deprecated-guards=GPLUGIN_DISABLE_DEPRECATED',
+gplugin_doc_content_files = [ -gplugin_version_xml = configure_file(
- input : 'version.xml.in',
- output : 'version.xml',
- configuration : version_conf)
+ gplugin_toml = configure_file( + input : 'gplugin.toml.in', + output : 'gplugin.toml', + configuration : version_conf, + install_dir : docs_dir / 'gplugin',
+ gplugin_doc = custom_target('gplugin-doc', + input : [ gplugin_toml, gplugin_gir[0] ], + '--output-dir=@OUTPUT@', + '--content-dir=@0@'.format(meson.current_source_dir()), + depend_files : [ gplugin_doc_content_files ], + build_by_default : true, + install_dir : docs_dir, -gplugin_doc = gnome.gtkdoc(DOC_MODULE,
- 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.md Mon Aug 30 02:24:49 2021 -0500
@@ -0,0 +1,79 @@
+Writing Native plugins is pretty simple, but since it's C/C++ it's a bit more +There are currently no C++ bindings and no intention to write them, but the C +API is still usable from C++. +#include <gplugin-native.h> +/* This function is called by the native plugin loader to get information about + * the plugin. It returns a #GPluginPluginInfo instance that describes the + * plugin. If anything goes wrong during this function, @error should be set + * via g_set_error() and %NULL should be returned. It must match the + * signature of GPluginNativePluginQueryFunc, and it will be passed to + * GPLUGIN_NATIVE_PLUGIN_DECLARE which will export it properly. +static GPluginPluginInfo * +gplugin_native_basic_plugin_query(GError **error) { + /* Authors is a list of authors who worked on the plugin. Generally + * these are in the "Name Surname <user@domain.com>" format. + const gchar * const authors[] = { + "Author O <author@example.com>", + /* 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/native-basic-plugin", + GPLUGIN_NATIVE_PLUGIN_ABI_VERSION, + "description", "description", +/* This function is called by the native plugin loader when the plugin should + * be loaded. It should do any setup that the plugin requires and return %TRUE + * if everything was successful. If not, it should set @error with + * g_set_error() and return %FALSE. This function needs to match the + * signature of GPluginNativePluginLoadFunc, and it will be passed to + * GPLUGIN_NATIVE_PLUGIN_DECLARE which will export it properly. +gplugin_native_basic_plugin_load(GPluginPlugin *plugin, GError **error) { +/* This function is called by the native plugin loader when the plugin should + * be unloaded. It should do any clean up that the plugin requires and return + * %TRUE if everything was successful. If not, it should set @error with + * g_set_error() and return %FALSE. This function needs to match the signature + * of GPluginNativePluginUnloadFunc, and it will be passed to + * GPLUGIN_NATIVE_PLUGIN_DECLARE which will export it properly. +gplugin_native_basic_plugin_unload(GPluginPlugin *plugin, GError *error) { +/* This macro does the heavy lifting of making sure to export all of the + * symbols correctly as well as add some future proofing for features like + * statically linking plugins. It is highly recommended to use this macro + * instead of manually exporting the symbols yourself. +GPLUGIN_NATIVE_PLUGIN_DECLARE(gplugin_native_basic_plugin) --- a/gplugin/reference/native-plugins.xml Tue Aug 24 00:12:10 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-<?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 pretty simple, but since it's C/C++ it's a bit
- There are currently no C++ bindings and no intention to write them, but
- the C API is still usable from C++.
- <simplesect id="example">
- <informalexample><programlisting>
- #include <gplugin.h>
- #include <gplugin-native.h>
- /* This function is called by the native plugin loader to get information
- * about the plugin. It returns a #GPluginPluginInfo instance that
- * describes the plugin. If anything goes wrong during this function,
- * @error should be set via g_set_error() and %NULL should be returned.
- * It must match the signature of #GPluginNativePluginQueryFunc, and it
- * will be passed to #GPLUGIN_NATIVE_PLUGIN_DECLARE which will export it
- static GPluginPluginInfo *
- gplugin_native_basic_plugin_query(GError **error) {
- /* Authors is a list of authors who worked on the plugin. Generally
- * these are in the "Name Surname <user@domain.com>" format.
- const gchar * const authors[] = {
- "Author O <author@example.com>",
- /* 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/native-basic-plugin",
- GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
- "description", "description",
- /* This function is called by the native plugin loader when the plugin
- * should be loaded. It should do any setup that the plugin requires and
- * return %TRUE if everything was successfull. If not, it should set
- * @error with g_set_error() and return %FALSE. This function needs to
- * match the signature of #GPluginNativePluginLoadFunc, and it will be
- * passed to #GPLUGIN_NATIVE_PLUGIN_DECLARE which will export it
- gplugin_native_basic_plugin_load(GPluginPlugin *plugin, GError **error) {
- /* This function is called by the native plugin loader when the plugin
- * should be unloaded. It should do any clean up that the plugin requires
- * and return %TRUE if everything was successfull. If not, it should set
- * @error with g_set_error() and return %FALSE. This function needs to
- * match the signature of #GPluginNativePluginUnloadFunc, and it will be
- * passed to #GPLUGIN_NATIVE_PLUGIN_DECLARE which will export it
- gplugin_native_basic_plugin_unload(GPluginPlugin *plugin, GError *error) {
- /* This macro does the heavy lifting of making sure to export all of the
- * symbols correctly as well as add some future proofing for features
- * like statically plugins. It is highly recommended to use this macro
- * instead of manually exporting the symbols yourself.
- GPLUGIN_NATIVE_PLUGIN_DECLARE(gplugin_native_basic_plugin)
- </programlisting></informalexample>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/perl5.md Mon Aug 30 02:24:49 2021 -0500
@@ -0,0 +1,46 @@
+> You **MUST** have the Perl5 loader plugin installed and working as well as +> the gobject-introspection package for GPlugin installed to use Perl5 plugins. +### Example Perl5 Plugin +Like all plugins in GPlugin, Perl5 plugins must also implement the +`gplugin_query`, `gplugin_load`, and `glugin_unload` functions. +The following is a basic Perl5 plugin. +use Glib::Object::Introspection; +Glib::Object::Introspection->setup(basename => "GPlugin", version => "1.0", package=> "GPlugin"); + return GPlugin::PluginInfo->new( + id => "gplugin/perl5-basic-plugin", + abi_version => 0x01020304, + name => "basic plugin", + authors => ("author1"), + license_id => "license", + description => "description", --- a/gplugin/reference/perl5.xml Tue Aug 24 00:12:10 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-<?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-perl5">
- <title>Perl5 Plugins</title>
- You <emphasis role="strong">MUST</emphasis> have the Perl5 loader
- plugin installed and working as well as the gobject-introspection
- package for GPlugin installed to use Perl5 plugins.
- <title>Example Perl5 Plugin</title>
- Like all plugins in GPlugin, Perl5 plugins must also implement
- the <code>gplugin_query</code>, <code>gplugin_load</code>, and
- <code>gplugin_unload</code> functions.
- The following is a basic Perl5 plugin.
- <informalexample><programlisting>
- use Glib::Object::Introspection;
- Glib::Object::Introspection->setup(basename => "GPlugin", version => "1.0", package=> "GPlugin");
- return GPlugin::PluginInfo->new(
- id => "gplugin/perl5-basic-plugin",
- abi_version => 0x01020304,
- name => "basic plugin",
- authors => ("author1"),
- license_id => "license",
- description => "description",
- </programlisting></informalexample>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/python3.md Mon Aug 30 02:24:49 2021 -0500
@@ -0,0 +1,43 @@
+> You **MUST** have the Python3 loader plugin installed and working as well as +> the gobject-introspection package for GPlugin installed to use Python3 +### Example Python Plugin +Like all plugins in GPlugin, Python plugins must also implement the +`gplugin_query`, `gplugin_load`, and `gplugin_unload` functions. +The following is a basic Python plugin. +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): --- a/gplugin/reference/python3.xml Tue Aug 24 00:12:10 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-<?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>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/urlmap.js Mon Aug 30 02:24:49 2021 -0500
@@ -0,0 +1,9 @@
+// SPDX-FileCopyrightText: 2021 GNOME Foundation +// SPDX-License-Identifier: LGPL-2.1-or-later +// A map between namespaces and base URLs for their online documentation + [ 'GLib', 'https://docs.gtk.org/glib/' ], + [ 'GObject', 'https://docs.gtk.org/gobject/' ], + [ 'GModule', 'https://docs.gtk.org/gmodule/' ], --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/vala.md Mon Aug 30 02:24:49 2021 -0500
@@ -0,0 +1,59 @@
+Title: Vala Plugin Example +> You **MUST** have the Vala bindings installed on your system for this to +> work. They are built by the default GPlugin build. +Like all plugins in GPlugin, Vala plugins must also implement the +`gplugin_query`, `gplugin_load`, and `gplugin_unload` functions. +Due to the way `GPlugin.PluginInfo` info works, you must subclass it and set +your values in the new constructor. +The following is a basic Vala plugin. +public class BasicPluginInfo : GPlugin.PluginInfo { + public BasicPluginInfo() { + string[] authors = {"author1"}; + id: "gplugin/vala-basic-plugin", + abi_version: 0x01020304, + description: "description" +public GPlugin.PluginInfo gplugin_query(out Error error) { + return new BasicPluginInfo(); +public bool gplugin_load(GPlugin.Plugin plugin, out Error error) { +public bool gplugin_unload(GPlugin.Plugin plugin, out Error error) { --- a/gplugin/reference/vala.xml Tue Aug 24 00:12:10 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-<?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-vala">
- <title>Vala Plugins</title>
- You <emphasis role="strong">MUST</emphasis> have the Vala bindings
- installed on your system for this to work. They are built by
- <title>Example Vala Plugin</title>
- Like all plugins in GPlugin, Vala plugins must also implement
- the <code>gplugin_query</code>, <code>gplugin_load</code>, and
- <code>gplugin_unload</code> functions.
- Due to the way <code>GPlugin.PluginInfo</code> info works, you must
- subclass it and set your values in the new constructor.
- The following is a basic Vala plugin.
- <informalexample><programlisting>
- public class BasicPluginInfo : GPlugin.PluginInfo {
- public BasicPluginInfo() {
- string[] authors = {"author1"};
- id: "gplugin/vala-basic-plugin",
- abi_version: 0x01020304,
- description: "description"
- public GPlugin.PluginInfo gplugin_query(out Error error) {
- return new BasicPluginInfo();
- public bool gplugin_load(GPlugin.Plugin plugin, out Error error) {
- public bool gplugin_unload(GPlugin.Plugin plugin, out Error error) {
- </programlisting></informalexample>
--- a/gplugin/reference/version.xml.in Tue Aug 24 00:12:10 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
--- a/meson.build Tue Aug 24 00:12:10 2021 -0500
+++ b/meson.build Mon Aug 30 02:24:49 2021 -0500
@@ -78,7 +78,18 @@
###############################################################################
###############################################################################
-ENABLE_DOC = get_option('doc')
+if get_option('doc') and not get_option('introspection') + error('Documentation requires GObject Introspection.') +gidocgen_dep = dependency( + 'gi-docgen', version: '>= 2021.1', + fallback: ['gi-docgen', 'dummy_dep'], + required: get_option('doc') +gidocgen = find_program('gi-docgen', required : get_option('doc')) +docs_dir = get_option('prefix') / get_option('datadir') / 'doc' ###############################################################################
@@ -97,7 +108,7 @@
doc_targets = [gplugin_doc]
doc_targets += gplugin_gtk_doc
@@ -114,7 +125,7 @@
install_dir : get_option('datadir') / 'doc' / 'gplugin')
- 'gtk-doc' : get_option('doc'),
+ 'api reference' : get_option('doc'), 'gtk3 widgets' : get_option('gtk3'),
'man pages' : get_option('help2man'),
}, bool_yn : true, section : 'Miscellaneous')
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/subprojects/gi-docgen.wrap Mon Aug 30 02:24:49 2021 -0500
@@ -0,0 +1,6 @@
+url=https://gitlab.gnome.org/GNOME/gi-docgen.git +push-url=ssh://git@gitlab.gnome.org:GNOME/gi-docgen.git