--- a/.hgignore Wed Jul 18 22:33:36 2018 -0500
+++ b/.hgignore Mon Aug 20 23:29:20 2018 -0500
@@ -7,9 +7,11 @@
^packaging\/debian\/tmp\/
^packaging\/debian\/(.+\.)?(substvars|debhelper\.log)$
+^packaging\/debian\/build.*\/ ^packaging\/debian\/libgplugin0?(-.+)?\/
^packaging\/debian\/gir1.2-gplugin-0.0\/
^packaging\/debian\/files$
--- a/ChangeLog Wed Jul 18 22:33:36 2018 -0500
+++ b/ChangeLog Mon Aug 20 23:29:20 2018 -0500
@@ -1,6 +1,13 @@
* Fixed building on OSX with homebrew
+ * Changed the build system to meson. See INSTALL for instructions. + * Added gplugin_plugin_get_dependent_plugins. (fixes #8) + * Remove ability to disable unit testing. + * Bumped the glib requirement to 2.40.0 + * Added a Glade catalog for gplugin-gtk + * Added GPluginGtk-0.0.gir * Bumped the glib requirement to 2.34.0
--- a/INSTALL Wed Jul 18 22:33:36 2018 -0500
+++ b/INSTALL Mon Aug 20 23:29:20 2018 -0500
@@ -3,7 +3,7 @@
GPlugin depends on the following at a bare minimum:
gobject-introspection, libgirepository1.0-dev
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convey.yml Mon Aug 20 23:29:20 2018 -0500
@@ -0,0 +1,306 @@
+ image: rwgrim/package-cloud:latest + command: push --verbose ${REPOSITORY}/${DISTRIBUTION} artifacts/${FILES} + ############################################################################# + ############################################################################# + build-alpine-edge-amd64: + image: gplugin/builders:alpine-edge-amd64 + export-alpine-edge-amd64: + files: alpine-edge-amd64:artifacts/ + ############################################################################# + ############################################################################# + image: gplugin/builders:coverity + files: coverity:artifacts/coverity + ############################################################################# + ############################################################################# + build-debian-oldstable-amd64: + image: gplugin/builders:debian-jessie-amd64 + export-debian-oldstable-amd64: + files: debian-oldstable-amd64:artifacts/ + build-debian-stable-amd64: + image: gplugin/builders:debian-stretch-amd64 + export-debian-stable-amd64: + files: debian-stable-amd64:artifacts/ + package-cloud-debian-stable-amd64: + - REPOSITORY=pidgin/experimental + - DISTRIBUTION=debian/stretch + - FILES=debian-stable-amd64/debs/*.deb + package-cloud-debian-stable-source: + - REPOSITORY=pidgin/experimental + - DISTRIBUTION=debian/stretch + - FILES=debian-stretch-amd64/debs/*.dsc + build-debian-testing-amd64: + image: gplugin/builders:debian-buster-amd64 + export-debian-testing-amd64: + files: debian-testing-amd64:artifacts/ + package-cloud-debian-testing-amd64: + - REPOSITORY=pidgin/experimental + - DISTRIBUTION=debian/buster + - FILES=debian-testing-amd64/debs/*.deb + package-cloud-debian-testing-source: + - REPOSITORY=pidgin/experimental + - DISTRIBUTION=debian/buster + - FILES=debian-testing-amd64/debs/*.dsc + ############################################################################# + ############################################################################# + image: gplugin/builders:fedora-25-amd64 + export-fedora-25-amd64: + files: fedora-25-amd64:artifacts/ + package-cloud-fedora-25-amd64: + - REPOSITORY=pidgin/experimental + - DISTRIBUTION=fedora/25 + - FILES=fedora-25-amd64/x86_64/*.rpm + image: gplugin/builders:fedora-26-amd64 + export-fedora-26-amd64: + files: fedora-26-amd64:artifacts/ + package-cloud-fedora-26-amd64: + - REPOSITORY=pidgin/experimental + - DISTRIBUTION=fedora/26 + - FILES=fedora-26-amd64/x86_64/*.rpm + ############################################################################# + ############################################################################# + build-opensuse-tumbleweed-amd64: + image: gplugin/builders:opensuse-tumbleweed-amd64 + export-opensuse-tumbleweed-amd64: + files: opensuse-tumbleweed-amd64:artifacts/ + package-cloud-opensuse-tumbleweed-amd64: + - REPOSITORY=pidgin/experimental + - DISTRIBUTION=opensuse/tumbleweed + - FILES=opensuse-tumbleweed-amd64/x86_64/*.rpm + ############################################################################# + ############################################################################# + image: gplugin/builders:scanbuild + files: scanbuild:artifacts/ + ############################################################################# + ############################################################################# + build-ubuntu-xenial-amd64: + image: gplugin/builders:ubuntu-xenial-amd64 + export-ubuntu-xenial-amd64: + files: debian-xenial-amd64:artifacts/ + package-cloud-ubuntu-xenial-amd64: + - REPOSITORY=pidgin/experimental + - DISTRIBUTION=ubuntu/xenial + - FILES=ubuntu-xenial-amd64/debs/*.deb + package-cloud-ubuntu-xenial-source: + - REPOSITORY=pidgin/experimental + - DISTRIBUTION=ubuntu/xenial + - FILES=ubuntu-xenial-amd64/debs/*.dsc + build-ubuntu-zesty-amd64: + image: gplugin/builders:ubuntu-zesty-amd64 + export-ubuntu-zesty-amd64: + files: debian-zesty-amd64:artifacts/ + package-cloud-ubuntu-zesty-amd64: + - REPOSITORY=pidgin/experimental + - DISTRIBUTION=ubuntu/zesty + - FILES=ubuntu-zesty-amd64/debs/*.deb + package-cloud-ubuntu-zesty-source: + - REPOSITORY=pidgin/experimental + - DISTRIBUTION=ubuntu/zesty + - FILES=ubuntu-zesty-amd64/debs/*.dsc + - build-alpine-edge-amd64 + - export-alpine-edge-amd64 + debian-oldstable-amd64: + - build-debian-oldstable-amd64 + - export-debian-oldstable-amd64 + - build-debian-stable-amd64 + - export-debian-stable-amd64 + - build-debian-testing-amd64 + - export-debian-testing-amd64 + - name: import packages + tasks: import-artifacts + - name: upload packages + - package-cloud-debian-stable-amd64 + - package-cloud-debian-stable-source + - package-cloud-debian-testing-amd64 + - package-cloud-debian-testing-source + - build-fedora-25-amd64 + - export-fedora-25-amd64 + - build-fedora-26-amd64 + - export-fedora-26-amd64 + - name: import packages + tasks: import-artifacts + - name: upload packages + - package-cloud-fedora-25-amd64 + - package-cloud-fedora-26-amd64 + opensuse-tumbleweed-amd64: + - build-opensuse-tumbleweed-amd64 + - export-opensuse-tumbleweed-amd64 + opensuse-package-cloud: + - name: import packages + tasks: import-artifacts + - name: upload packages + - package-cloud-opensuse-tumbleweed-amd64 + - build-ubuntu-xenial-amd64 + - export-ubuntu-xenial-amd64 + - build-ubuntu-zesty-amd64 + - export-ubuntu-zesty-amd64 + # old stable has a bunch of issues with + # old meson that need to be sorted out. + # - debian-oldstable-amd64 --- a/gplugin-gtk/gplugin-gtk-plugin-info.c Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin-gtk/gplugin-gtk-plugin-info.c Mon Aug 20 23:29:20 2018 -0500
@@ -19,6 +19,15 @@
#include <gplugin/gplugin.h>
+ * SECTION:gplugin-gtk-plugin-info + * @Title: Plugin Info Gtk+ Widgets + * @Short_description: Gtk+ Widgets for plugins + * #GPluginGtkPluginInfo is a Gtk+ widget that shows information about plugins. #define GPLUGIN_GTK_PLUGIN_INFO_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), GPLUGIN_GTK_TYPE_PLUGIN_INFO, GPluginGtkPluginInfoPrivate))
@@ -280,6 +289,15 @@
/******************************************************************************
*****************************************************************************/
+ * gplugin_gtk_plugin_info_new: + * Create a new GPluginGtkView which can be used to display info about a + * Returns: (transfer full): The new #GPluginGtkView widget. gplugin_gtk_plugin_info_new(void) {
@@ -314,7 +332,7 @@
g_object_unref(G_OBJECT(priv->plugin));
if(GPLUGIN_IS_PLUGIN(plugin))
- priv->plugin = g_object_ref(G_OBJECT(plugin));
+ priv->plugin = GPLUGIN_PLUGIN(g_object_ref(G_OBJECT(plugin))); @@ -338,6 +356,6 @@
priv = GPLUGIN_GTK_PLUGIN_INFO_GET_PRIVATE(info);
- return (priv->plugin) ? g_object_ref(G_OBJECT(priv->plugin)) : NULL;
+ return (priv->plugin) ? GPLUGIN_PLUGIN(g_object_ref(G_OBJECT(priv->plugin))) : NULL; --- a/gplugin-gtk/gplugin-gtk-plugin-info.h Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin-gtk/gplugin-gtk-plugin-info.h Mon Aug 20 23:29:20 2018 -0500
@@ -31,8 +31,8 @@
#define GPLUGIN_GTK_IS_PLUGIN_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GPLUGIN_GTK_TYPE_PLUGIN_INFO))
#define GPLUING_GTK_PLUGIN_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GPLUGIN_GTK_TYPE_PLUGIN_INFO, GPluginGtkPluginInfoClass))
-typedef struct _GPluginGtkPluginInfo GPluginGtkPluginInfo;
-typedef struct _GPluginGtkPluginInfoClass GPluginGtkPluginInfoClass;
+typedef struct _GPluginGtkPluginInfo GPluginGtkPluginInfo; +typedef struct _GPluginGtkPluginInfoClass GPluginGtkPluginInfoClass; @@ -43,11 +43,6 @@
struct _GPluginGtkPluginInfo {
- void (*_gplugin_reserved1)(void);
- void (*_gplugin_reserved2)(void);
- void (*_gplugin_reserved3)(void);
- void (*_gplugin_reserved4)(void);
struct _GPluginGtkPluginInfoClass {
--- a/gplugin-gtk/gplugin-gtk-store.c Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin-gtk/gplugin-gtk-store.c Mon Aug 20 23:29:20 2018 -0500
@@ -19,6 +19,14 @@
#include <gplugin-gtk/gplugin-gtk-store.h>
+ * SECTION:gplugin-gtk-store + * @Title: GtkTreeModelStore for gplugins + * @Short_description: A store for plugins + * #GPluginGtkStore is a GtkTreeModel populated with gplugins. #define GPLUGIN_GTK_STORE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), GPLUGIN_GTK_TYPE_STORE, GPluginGtkStorePrivate))
@@ -134,11 +142,28 @@
/******************************************************************************
*****************************************************************************/
+ * gplugin_gtk_store_new: + * Create a new GPluginGtkStore which is a prepopulated #GtkTreeStore. + * Returns: (transfer full): A new GtkTreeModel prepopulated with all of the gplugin_gtk_store_new(void) {
return GPLUGIN_GTK_STORE(g_object_new(GPLUGIN_GTK_TYPE_STORE, NULL));
+ * gplugin_gtk_get_store_column_types: + * Returns the columns that #GPluginGtkStore's will use. + * Returns: (transfer none): A list of #GTypes for the columes that the store gplugin_gtk_get_store_column_types(void) {
--- a/gplugin-gtk/gplugin-gtk-view.c Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin-gtk/gplugin-gtk-view.c Mon Aug 20 23:29:20 2018 -0500
@@ -18,6 +18,14 @@
#include <gplugin-gtk/gplugin-gtk-view.h>
#include <gplugin-gtk/gplugin-gtk-store.h>
+ * SECTION:gplugin-gtk-view + * @Title: Gtk+ View for gplugins + * @Short_description: A view for plugins + * #GPluginGtkView is a display widget for a list of GPlugins. #define GPLUGIN_GTK_VIEW_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), GPLUGIN_GTK_TYPE_VIEW, GPluginGtkViewPrivate))
@@ -153,6 +161,14 @@
/******************************************************************************
*****************************************************************************/
+ * gplugin_gtk_view_new: + * Creates a new GPluginGtkView. + * Returns: (transfer full): The new view. gplugin_gtk_view_new(void) {
@@ -165,6 +181,14 @@
+ * gplugin_gtk_view_set_show_internal: + * @view: The #GPluginGtkView instance + * @show_internal: Whether or not to show internal plugins. + * This function will toggle whether or not the widget will show internal gplugin_gtk_view_set_show_internal(GPluginGtkView *view,
@@ -180,6 +204,12 @@
g_object_notify(G_OBJECT(view), "show-internal");
+ * gplugin_gtk_view_get_show_internal: + * @view: The #GPluginGtkView instance + * Returns whether or not @view is showing internal plugins. gplugin_gtk_view_get_show_internal(const GPluginGtkView *view) {
GPluginGtkViewPrivate *priv = NULL;
--- a/gplugin-gtk/gplugin-gtk-viewer.c Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin-gtk/gplugin-gtk-viewer.c Mon Aug 20 23:29:20 2018 -0500
@@ -166,10 +166,6 @@
GOptionContext *ctx = NULL;
GtkWidget *window = NULL;
- gtk_init(&argc, &argv);
ctx = g_option_context_new("");
g_option_context_add_main_entries(ctx, entries, NULL);
g_option_context_add_group(ctx, gtk_get_option_group(TRUE));
@@ -190,6 +186,10 @@
+ gtk_init(&argc, &argv); gplugin_manager_add_default_paths();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin-gtk/gplugin-gtk.xml.in Mon Aug 20 23:29:20 2018 -0500
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?> +<glade-catalog name="gplugin-gtk" + version="@GPLUGIN_VERSION@" + name="GPluginGtkPluginInfo" + generic-name="plugininfo" + get-type-function="gplugin_gtk_plugin_info_get_type"> + generic-name="pluginview" + get-type-function="gplugin_gtk_view_get_type"> + </glade-widget-classes> + <glade-widget-group name="gplugin-gtk" title="GPlugin Gtk+ Widgets"> + <glade-widget-class-ref name="GPluginGtkPluginInfo"/> + <glade-widget-class-ref name="GPluginGtkView"/> --- a/gplugin-gtk/meson.build Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin-gtk/meson.build Mon Aug 20 23:29:20 2018 -0500
@@ -5,13 +5,9 @@
###############################################################################
GTK3 = dependency('gtk+-3.0', version : '>=3.0.0')
-GPLUGIN_GTK_LD_CURRENT = 0
-GPLUGIN_GTK_LD_REVISION = 1
-GPLUGIN_GTK_LD_VERSION = '@0@.@1@.@2@'.format(
- GPLUGIN_GTK_LD_CURRENT,
- GPLUGIN_GTK_LD_REVISION,
+GLADEUI = dependency('gladeui-2.0', version: '>=3.0.0') +GPLUGIN_GTK_LIBRARY_VERSION = '0.1.0' 'gplugin-gtk-plugin-info.c',
@@ -31,10 +27,10 @@
GPLUGIN_GTK_PRIVATE_HEADERS = [
-GPLUGIN_GTK_BUILT_SOURCES = [
+GPLUGIN_GTK_PUBLIC_BUILT_SOURCES = [ -GPLUGIN_GTK_BUILT_HEADERS = [
+GPLUGIN_GTK_PUBLIC_BUILT_HEADERS = [ ###############################################################################
@@ -57,6 +53,14 @@
install_dir : join_paths(get_option('includedir'), 'gplugin-1.0'))
+gplugin_gtk_xml = configure_file( + input : 'gplugin-gtk.xml.in', + output: 'gplugin-gtk.xml', + configuration : version_conf, + install_dir : GLADEUI.get_pkgconfig_variable('catalogdir'), ###############################################################################
###############################################################################
@@ -65,26 +69,22 @@
GPLUGIN_GTK_PRIVATE_SOURCES,
GPLUGIN_GTK_PRIVATE_HEADERS,
- GPLUGIN_GTK_BUILT_SOURCES,
- GPLUGIN_GTK_BUILT_HEADERS,
+ GPLUGIN_GTK_PUBLIC_BUILT_SOURCES, + GPLUGIN_GTK_PUBLIC_BUILT_HEADERS, c_args : ['-DGPLUGIN_GTK_COMPILATION', '-DG_LOG_DOMAIN="GPluginGtk"'],
include_directories : toplevel_inc,
dependencies : [gplugin_dep, GTK3],
- soversion : GPLUGIN_GTK_LD_CURRENT,
- version : GPLUGIN_GTK_LD_VERSION,
+ version : GPLUGIN_GTK_LIBRARY_VERSION, -# install the normal includes into the gplugin-gtk subdirectory
- subdir : 'gplugin-1.0/gplugin-gtk'
+gplugin_gtk_inc = include_directories('.') -# install the GtkBuilder files
- 'gplugin-gtk-plugin-info.ui',
- install_dir : join_paths(get_option('datadir'), 'gplugin', 'gplugin-gtk')
+gplugin_gtk_dep = declare_dependency( + include_directories: [toplevel_inc, gplugin_gtk_inc], + link_with : [gplugin, gplugin_gtk], + sources : GPLUGIN_GTK_PUBLIC_BUILT_HEADERS, # Ensure they're built before use. + dependencies : [GLIB, GOBJECT, GTK3], @@ -105,8 +105,7 @@
###############################################################################
gplugin_gtk_viewer = executable('gplugin-gtk-viewer',
- link_with : [gplugin_gtk],
- dependencies : [gplugin_dep, GTK3],
+ dependencies : [gplugin_dep, gplugin_gtk_dep], @@ -122,4 +121,42 @@
install_dir : join_paths(get_option('mandir'), 'man1'))
+############################################################################### +############################################################################### +if get_option('gobject-introspection') + gplugin_gtk_gir = gnome.generate_gir( + sources : GPLUGIN_GTK_SOURCES + GPLUGIN_GTK_HEADERS + + GPLUGIN_GTK_PUBLIC_BUILT_SOURCES + + GPLUGIN_GTK_PUBLIC_BUILT_HEADERS, + includes : [gplugin_gir[0], 'Gtk-3.0'], + namespace : 'GPluginGtk', + symbol_prefix : 'gplugin_gtk', + nsversion : '@0@.0'.format(GPLUGIN_MAJOR_VERSION), +############################################################################### +############################################################################### +# install the normal includes into the gplugin-gtk subdirectory + subdir : 'gplugin-1.0/gplugin-gtk' +# install the GtkBuilder files + 'gplugin-gtk-plugin-info.ui', + install_dir : join_paths(get_option('datadir'), 'gplugin', 'gplugin-gtk') +############################################################################### +############################################################################### --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin-gtk/reference/gplugin-gtk-docs.xml Mon Aug 20 23:29:20 2018 -0500
@@ -0,0 +1,50 @@
+<!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>GPlugin Gtk+ &version;</title> + GPlugin Gtk+ 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. + <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> +<!-- <index id="api-index-2.11.0" role="2.11.0"> + <title>Index of new symbols in 2.11.0</title> + <xi:include href="xml/api-index-2.11.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-gtk/reference/meson.build Mon Aug 20 23:29:20 2018 -0500
@@ -0,0 +1,39 @@
+DOC_MODULE = 'gplugin-gtk' +# Header files or dirs to ignore when scanning. Use base file/dir names +ignore_hfiles += GPLUGIN_GTK_PRIVATE_HEADERS +# Extra options to supply to gtkdoc-scan. + '--deprecated-guards=GPLUGIN_GTK_DISABLE_DEPRECATED', + '--ignore-headers=' + ' '.join(ignore_hfiles), +# Extra options to supply to gtkdoc-mkdb. + '--ignore-files=' + ' '.join(ignore_hfiles), +gplugin_gtk_version_xml = configure_file( + input : 'version.xml.in', + output : 'version.xml', + configuration : version_conf) +gnome.gtkdoc(DOC_MODULE, + main_xml : DOC_MODULE + '-docs.xml', + src_dir : gplugin_gtk_inc, + dependencies : gplugin_gtk_dep, + gobject_typesfile : DOC_MODULE + '.types', + content_files : content_files, --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin-gtk/reference/version.xml.in Mon Aug 20 23:29:20 2018 -0500
@@ -0,0 +1,1 @@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin.sublime-project Mon Aug 20 23:29:20 2018 -0500
@@ -0,0 +1,8 @@
--- a/gplugin/gplugin-core.c Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin/gplugin-core.c Mon Aug 20 23:29:20 2018 -0500
@@ -23,9 +23,32 @@
#include <gplugin/gplugin-private.h>
#include <gplugin/gplugin-plugin.h>
+ * @Short_description: the core api + * This section contains the core api of gplugin, which includes #gplugin_init /******************************************************************************
*****************************************************************************/
+ * GPLUGIN_DOMAIN: (skip) + * The #GError domain used internally by GPlugin + * GPLUGIN_GLOBAL_HEADER_INSIDE: (skip) + * This define is used to determine if we're inside the gplugin global header --- a/gplugin/gplugin-enums.c.tmpl Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin/gplugin-enums.c.tmpl Mon Aug 20 23:29:20 2018 -0500
@@ -22,6 +22,14 @@
/*** END file-header ***/
+ * SECTION:gplugin-enums + * @Short_description: common enumerations + * The enums defined here are used throughout %GPlugin. /*** BEGIN file-production ***/
/* enumerations from "@filename@" */
--- a/gplugin/gplugin-loader.c Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin/gplugin-loader.c Mon Aug 20 23:29:20 2018 -0500
@@ -19,6 +19,15 @@
#include <gplugin/gplugin-core.h>
+ * SECTION:gplugin-loader + * @Title: Plugin Loader Interface + * @Short_description: interface for loading plugins + * A PluginLoader has to implement the interface described here for GPlugin to + * be able to use it to load plugins. /******************************************************************************
*****************************************************************************/
@@ -48,7 +57,10 @@
* gplugin_loader_query_plugin:
* @loader: #GPluginLoader instance performing the query
* @filename: filename to query
- * error: return location for a GError, or NULL
+ * @error: return location for a GError, or NULL + * This function is called by the plugin manager to ask a loader to query the + * given file and determine if it's a usable plugin. * Return value: (transfer full): A #GPluginPlugin instance or NULL on failure
@@ -75,7 +87,10 @@
* gplugin_loader_load_plugin:
* @loader: #GPluginLoader instance performing the load
* @plugin: #GPluginPlugin instance to load
- * error: return location for a GError, or NULL
+ * @error: return location for a GError, or NULL + * This function is called by the plugin manager to ask a loader to load the * Return value: TRUE if @plugin was loaded successfully, FALSE otherwise
@@ -110,6 +125,9 @@
* @plugin: #GPluginPlugin instance to unload
* @error: return location for a GError, or NULL
+ * This function is called by the plugin manager to ask a loader to unload the * Return value: TRUE if @plugin was unloaded successfully, FALSE otherwise
--- a/gplugin/gplugin-manager.c Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin/gplugin-manager.c Mon Aug 20 23:29:20 2018 -0500
@@ -31,6 +31,15 @@
#include <gplugin/gplugin-file-tree.h>
+ * SECTION:gplugin-manager + * @Short_description: API for managing plugins + * The manager is used to manager all plugins in %GPlugin. This includes + * loading, unloading, querying, checking for new plugins, and so on. /******************************************************************************
*****************************************************************************/
@@ -298,9 +307,7 @@
for(l = los; l; l = l->next) {
GPluginLoader *lo = GPLUGIN_LOADER(l->data);
- if(!GPLUGIN_IS_LOADER(lo))
+ /* check if this is not the loader we're looking for */ if(G_OBJECT_TYPE(lo) != type)
@@ -593,7 +600,8 @@
-gplugin_manager_load_dependencies(const GPluginPluginInfo *info,
+gplugin_manager_load_dependencies(GPluginPlugin *plugin, + const GPluginPluginInfo *info, const gchar * const *dependencies = NULL;
@@ -638,7 +646,7 @@
for(m = matches; m; m = m->next) {
- GPluginPlugin *dplugin = g_object_ref(G_OBJECT(m->data));
+ GPluginPlugin *dplugin = GPLUGIN_PLUGIN(g_object_ref(G_OBJECT(m->data))); @@ -680,6 +688,8 @@
ret = gplugin_manager_load_plugin(dplugin, error);
+ gplugin_plugin_add_dependent_plugin(dplugin, plugin); g_object_unref(G_OBJECT(dplugin));
@@ -734,7 +744,7 @@
- if(!gplugin_manager_load_dependencies(info, error)) {
+ if(!gplugin_manager_load_dependencies(plugin, info, error)) { g_object_unref(G_OBJECT(info));
@@ -749,7 +759,7 @@
*error = g_error_new(GPLUGIN_DOMAIN, 0,
_("The loader for %s is not a loader. This "
- "should not happend!"),
+ "should not happened!"), gplugin_plugin_get_filename(plugin));
@@ -1319,7 +1329,7 @@
- plugin = g_object_ref(G_OBJECT(plugins_list->data));
+ plugin = GPLUGIN_PLUGIN(g_object_ref(G_OBJECT(plugins_list->data))); gplugin_manager_free_plugin_list(plugins_list);
--- a/gplugin/gplugin-native-loader.c Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin/gplugin-native-loader.c Mon Aug 20 23:29:20 2018 -0500
@@ -30,6 +30,14 @@
#define GPLUGIN_LOAD_SYMBOL "gplugin_load"
#define GPLUGIN_UNLOAD_SYMBOL "gplugin_unload"
+ * SECTION:gplugin-native-loader + * @Title: Native Loader API + * @Short_description: API for the native plugin loader + * Basic API for the native plugin loader. /******************************************************************************
*****************************************************************************/
@@ -289,6 +297,14 @@
/******************************************************************************
*****************************************************************************/
+ * GPLUGIN_NATIVE_PLUGIN_ABI_VERSION: + * The ABI version of the #GPluginNativeLoader. Your plugin should use this + * as the value for %abi_version when call #gplugin_plugin_info_new. gplugin_native_loader_get_type(void) {
static volatile gsize type_volatile = 0;
--- a/gplugin/gplugin-native-plugin.c Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin/gplugin-native-plugin.c Mon Aug 20 23:29:20 2018 -0500
@@ -26,6 +26,15 @@
+ * SECTION:gplugin-native-plugin + * @Title: Native Plugin API + * @Short_description: API for native plugins + * API for use by native plugins. That is plugins written in a compiled #define GPLUGIN_NATIVE_PLUGIN_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), GPLUGIN_TYPE_NATIVE_PLUGIN, GPluginNativePluginPrivate))
--- a/gplugin/gplugin-options.c Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin/gplugin-options.c Mon Aug 20 23:29:20 2018 -0500
@@ -23,6 +23,16 @@
#include <gplugin/gplugin-manager.h>
+ * SECTION:gplugin-options + * @Title: Command line option support + * @Short_description: command line option support + * This section contains #gplugin_get_option_group that makes it easy to + * initialize %GPlugin from your application when it is added to a /******************************************************************************
*****************************************************************************/
--- a/gplugin/gplugin-plugin-info.c Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin/gplugin-plugin-info.c Mon Aug 20 23:29:20 2018 -0500
@@ -23,6 +23,14 @@
#include <gplugin/gplugin-enums.h>
#include <gplugin/gplugin-private.h>
+ * SECTION:gplugin-plugin-info + * @Title: Plugin Info Objects + * @Short_description: information about plugins + * #GPluginPluginInfo holds metadata for plugins. #define GPLUGIN_PLUGIN_INFO_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), GPLUGIN_TYPE_PLUGIN_INFO, GPluginPluginInfoPrivate))
@@ -470,7 +478,7 @@
* While not required, the recommended convention is to use the following
- * format: <application or library>/<name of the plugin>.
+ * format: <application or library>/<name of the plugin>. * For example, the python loader in GPlugin has an id of
* "gplugin/python-plugin-loader".
@@ -897,7 +905,9 @@
* gplugin_plugin_info_get_id:
* @info: #GPluginPluginInfo instance
- * Return value: The id from @info.
+ * Returns the id that the plugin identifies itself as. + * Returns: The id from @info. gplugin_plugin_info_get_id(const GPluginPluginInfo *info) {
@@ -914,7 +924,10 @@
* gplugin_plugin_info_get_abi_version:
* @info: #GPluginPluginInfo instance
- * Return value: The abi_version from @info.
+ * Returns the ABI or Application Binary Interface version that the plugin + * is supposed to work against. + * Returns: The abi_version from @info. gplugin_plugin_info_get_abi_version(const GPluginPluginInfo *info) {
@@ -931,7 +944,11 @@
* gplugin_plugin_info_get_internal:
* @info: #GPluginPluginInfo instance
- * Return value: Whether or not this plugin is considered an internal plugin
+ * Returns where or not this plugin is is considered an internal plugin. An + * internal plugin would be something like a plugin loader or another plugin + * that should not be shown to users. + * Returns: TRUE if the plugin is internal, FALSE otherwise. gplugin_plugin_info_get_internal(const GPluginPluginInfo *info) {
@@ -948,7 +965,12 @@
* gplugin_plugin_info_get_load_on_query:
* @info: #GPluginPluginInfo instance
- * Return value: Whether or not this plugin should be loaded when queried
+ * Returns whether or not this plugin should be loaded when queried. This is + * useful for internal plugins that are adding functionality and should always + * be turned on. The plugin loaders use this to make sure all plugins can + * Returns: TRUE if the plugin should be loaded on query, FALSE otherwise. gplugin_plugin_info_get_load_on_query(const GPluginPluginInfo *info) {
@@ -965,7 +987,9 @@
* gplugin_plugin_info_get_name:
* @info: #GPluginPluginInfo instance
- * Return value: The name from @info.
+ * Returns the name of the plugin as specified in @info. + * Returns: The name from @info. gplugin_plugin_info_get_name(const GPluginPluginInfo *info) {
@@ -982,7 +1006,9 @@
* gplugin_plugin_info_get_version:
* @info: #GPluginPluginInfo instance
- * Return value: The version from @info.
+ * Returns the version of the plugin as specified in @info. + * Returns: The version from @info. gplugin_plugin_info_get_version(const GPluginPluginInfo *info) {
@@ -999,6 +1025,9 @@
* gplugin_plugin_info_get_version_func: (skip)
* @info: #GPluginPluginInfo instance
+ * Returns the #GPluginVersionCompareFunc used to compare versions of the * Returns: The #GPluginVersionCompareFunc that can compare versions of this
@@ -1017,7 +1046,9 @@
* gplugin_plugin_info_get_license_id:
* @info: #GPluginPluginInfo instance
- * Return value: The license-id from @info.
+ * Returns the liences id for the plugin as specified in @info. + * Returns: The license-id from @info. gplugin_plugin_info_get_license_id(const GPluginPluginInfo *info) {
@@ -1034,7 +1065,9 @@
* gplugin_plugin_info_get_license_text:
* @info: #GPluginPluginInfo instance
- * Return value: The text of the license from @info.
+ * Returns the license text for the plugin as specified in @info. + * Returns: The text of the license from @info. gplugin_plugin_info_get_license_text(const GPluginPluginInfo *info) {
@@ -1051,7 +1084,9 @@
* gplugin_plugin_info_get_license_url:
* @info: #GPluginPluginInfo instance
- * Return value: The url of the license from @info.
+ * Returns the url of the license for the plugin as specified in @info + * Returns: The url of the license from @info. gplugin_plugin_info_get_license_url(const GPluginPluginInfo *info) {
@@ -1068,7 +1103,9 @@
* gplugin_plugin_info_get_icon:
* @info: #GPluginPluginInfo instance
- * Return value: The icon from @info.
+ * Returns the name of the icon for the plugin as specified in @info. + * Returns: The icon from @info. gplugin_plugin_info_get_icon(const GPluginPluginInfo *info) {
@@ -1085,7 +1122,9 @@
* gplugin_plugin_info_get_summary:
* @info: #GPluginPluginInfo instance
- * Return value: The summary from @info.
+ * Returns the summery for the plugin as specified in @info. + * Returns: The summary from @info. gplugin_plugin_info_get_summary(const GPluginPluginInfo *info) {
@@ -1102,7 +1141,9 @@
* gplugin_plugin_info_get_description:
* @info: #GPluginPluginInfo instance
- * Return value: The description from @info.
+ * Returns the description for the plugin as specified in @info. + * Returns: The description from @info. gplugin_plugin_info_get_description(const GPluginPluginInfo *info) {
@@ -1119,7 +1160,9 @@
* gplugin_plugin_info_get_category:
* @info: #GPluginPluginInfo instance
- * Return value: The category from @info.
+ * Returns the category of the plugin as specified in @info. + * Returns: The category from @info. gplugin_plugin_info_get_category(const GPluginPluginInfo *info) {
@@ -1136,8 +1179,9 @@
* gplugin_plugin_info_get_authors:
* @info: #GPluginPluginInfo instance
- * Return value: (array zero-terminated=1) (transfer none): The authors from
+ * Returns the authors of the plugin as specified in @info. + * Returns: (array zero-terminated=1) (transfer none): The authors from @info. gplugin_plugin_info_get_authors(const GPluginPluginInfo *info) {
@@ -1154,7 +1198,9 @@
* gplugin_plugin_info_get_help:
* @info: #GPluginPluginInfo instance
- * Return value: The help from @info.
+ * Returns the help text for the plugin as specified in @info. + * Returns: The help from @info. gplugin_plugin_info_get_help(const GPluginPluginInfo *info) {
@@ -1171,7 +1217,9 @@
* gplugin_plugin_info_get_website:
* @info: #GPluginPluginInfo instance
- * Return value: The website from @info.
+ * Returns the website for the plugin as specified in @info. + * Returns: The website from @info. gplugin_plugin_info_get_website(const GPluginPluginInfo *info) {
@@ -1188,8 +1236,10 @@
* gplugin_plugin_info_get_dependencies:
* @info: #GPluginPluginInfo instance
- * Return value: (array zero-terminated=1) (transfer none): The list of
- * dependencies from @info.
+ * Returns the dependencies of the plugins as specified in @info. + * Returns: (array zero-terminated=1) (transfer none): The list of + * dependencies from @info. gplugin_plugin_info_get_dependencies(const GPluginPluginInfo *info) {
@@ -1208,9 +1258,8 @@
* This function is only used by the native plugin loader.
- * Return value: TRUE if the plugin has requested to be loaded with it's
- * symbols bound locally, FALSE if they should bind be bound
+ * Returns: TRUE if the plugin has requested to be loaded with it's symbols + * bound locally, FALSE if they should bind be bound globally. gplugin_plugin_info_get_bind_local(const GPluginPluginInfo *info) {
--- a/gplugin/gplugin-plugin.c Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin/gplugin-plugin.c Mon Aug 20 23:29:20 2018 -0500
@@ -21,6 +21,16 @@
#include <gplugin/gplugin-marshallers.h>
#include <gplugin/gplugin-private.h>
+ * SECTION:gplugin-plugin + * @Title: Plugin Objects + * @Short_description: abstract plugin implementation + * #GPluginPlugin is an abstract class that tracks the state of a plugin. It + * is subclassed by each loader for them to add additional data for their #define GPLUGIN_PLUGIN_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), GPLUGIN_TYPE_PLUGIN, GPluginPluginPrivate))
@@ -47,6 +57,8 @@
GPluginPluginState state;
/******************************************************************************
@@ -94,7 +106,7 @@
g_object_unref(G_OBJECT(priv->loader));
if(GPLUGIN_IS_LOADER(loader))
- priv->loader = g_object_ref(G_OBJECT(loader));
+ priv->loader = GPLUGIN_LOADER(g_object_ref(G_OBJECT(loader))); @@ -103,10 +115,14 @@
gplugin_plugin_set_info(GPluginPlugin *plugin, GPluginPluginInfo *info) {
GPluginPluginPrivate *priv = GPLUGIN_PLUGIN_GET_PRIVATE(plugin);
g_object_unref(G_OBJECT(priv->info));
- priv->info = (info) ? g_object_ref(G_OBJECT(info)) : NULL;
+ priv->info = GPLUGIN_PLUGIN_INFO(g_object_ref(G_OBJECT(info))); @@ -116,6 +132,15 @@
+gplugin_plugin_add_dependent_plugin(GPluginPlugin *plugin, + GPluginPlugin *dependent) + GPluginPluginPrivate *priv = GPLUGIN_PLUGIN_GET_PRIVATE(plugin); + priv->dependents = g_list_append(priv->dependents, g_object_ref(dependent)); /******************************************************************************
*****************************************************************************/
@@ -172,6 +197,7 @@
gplugin_plugin_finalize(GObject *obj) {
GPluginPluginPrivate *priv = GPLUGIN_PLUGIN_GET_PRIVATE(obj);
g_object_unref(priv->loader);
@@ -179,6 +205,10 @@
g_object_unref(G_OBJECT(priv->info));
+ for(l = priv->dependents; l; l = l->next) { + g_object_unref(G_OBJECT(l->data)); G_OBJECT_CLASS(parent_class)->finalize(obj);
@@ -289,7 +319,9 @@
* gplugin_plugin_get_filename:
* @plugin: #GPluginPlugin instance
- * Return value: The filename of @plugin
+ * Returns the filename that @plugin was loaded from. + * Returns: The filename of @plugin gplugin_plugin_get_filename(const GPluginPlugin *plugin) {
@@ -306,7 +338,9 @@
* gplugin_plugin_get_loader:
* @plugin: #GPluginPlugin instance
- * Return Value: (transfer full): The #GPluginLoader that loaded @plugin
+ * Returns the #GPluginLoader that loaded @plugin. + * Returns: (transfer full): The #GPluginLoader that loaded @plugin gplugin_plugin_get_loader(const GPluginPlugin *plugin) {
@@ -316,14 +350,16 @@
priv = GPLUGIN_PLUGIN_GET_PRIVATE(plugin);
- return (priv->info) ? g_object_ref(G_OBJECT(priv->loader)) : NULL;
+ return (priv->info) ? GPLUGIN_LOADER(g_object_ref(G_OBJECT(priv->loader))) : NULL; * gplugin_plugin_get_info:
* @plugin: #GPluginPlugin instance
- * Return value: (transfer full): The #GPluginPluginInfo instance for @plugin
+ * Returns the #GPluginPluginInfo for @plugin. + * Returns: (transfer full): The #GPluginPluginInfo instance for @plugin gplugin_plugin_get_info(const GPluginPlugin *plugin) {
@@ -333,7 +369,7 @@
priv = GPLUGIN_PLUGIN_GET_PRIVATE(plugin);
- return (priv->info) ? g_object_ref(G_OBJECT(priv->info)) : NULL;
+ return (priv->info) ? GPLUGIN_PLUGIN_INFO(g_object_ref(G_OBJECT(priv->info))) : NULL; @@ -342,7 +378,7 @@
* Gets the current state of @plugin
- * Return value: (transfer full): The current state of @plugin
+ * Returns: (transfer full): The current state of @plugin gplugin_plugin_get_state(const GPluginPlugin *plugin) {
@@ -379,3 +415,22 @@
+ * gplugin_plugin_get_dependent_plugins: + * @plugin: #GPluginPlugin instance + * Returns a list of plugins that depend on @plugin. + * Returns: (element-type GPlugin.Plugin) (transfer none): A #GList of each + * plugin that depends on this plugin. +gplugin_plugin_get_dependent_plugins(const GPluginPlugin *plugin) { + GPluginPluginPrivate *priv = NULL; + g_return_val_if_fail(GPLUGIN_IS_PLUGIN(plugin), NULL); + priv = GPLUGIN_PLUGIN_GET_PRIVATE(plugin); + return priv->dependents; --- a/gplugin/gplugin-plugin.h Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin/gplugin-plugin.h Mon Aug 20 23:29:20 2018 -0500
@@ -41,6 +41,8 @@
GPLUGIN_PLUGIN_STATE_REQUERY,
GPLUGIN_PLUGIN_STATE_LOADED,
GPLUGIN_PLUGIN_STATE_LOAD_FAILED,
GPLUGIN_PLUGIN_STATES, /*< skip >*/
@@ -75,6 +77,7 @@
GPluginPluginState gplugin_plugin_get_state(const GPluginPlugin *plugin);
void gplugin_plugin_set_state(GPluginPlugin *plugin, GPluginPluginState state);
+GList *gplugin_plugin_get_dependent_plugins(const GPluginPlugin *plugin); --- a/gplugin/gplugin-private.h Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin/gplugin-private.h Mon Aug 20 23:29:20 2018 -0500
@@ -40,6 +40,7 @@
gboolean gplugin_boolean_accumulator(GSignalInvocationHint *hint, GValue *return_accu, const GValue *handler_return, gpointer data);
gboolean gplugin_plugin_info_get_bind_local(const GPluginPluginInfo *info);
+void gplugin_plugin_add_dependent_plugin(GPluginPlugin *plugin, GPluginPlugin *dependent); --- a/gplugin/gplugin-version.c Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin/gplugin-version.c Mon Aug 20 23:29:20 2018 -0500
@@ -15,6 +15,16 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ * SECTION:gplugin-version + * @Title: Version Information + * @Short_description: variables and functions to check the GPlugin version + * GPlugin provides version information, primarily useful in configure + * checks for builds that have a configure script. Applications will + * not typically use the features described here. #include <gplugin/gplugin-core.h>
#include <gplugin/gplugin-version.h>
@@ -105,6 +115,50 @@
/******************************************************************************
*****************************************************************************/
+ * GPLUGIN_MAJOR_VERSION: + * This is the major version number of GPlugin that was compiled against. + * GPLUGIN_MINOR_VERSION: + * This is the minor version number of GPlugin that was compiled against. + * GPLUGIN_MICRO_VERSION: + * This is the micro version number of GPlugin that was compiled against. + * GPLUGIN_EXTRA_VERSION: + * This is the extra version string of GPlugin that was compiled against. + * This is the string version number of GPlugin that was compiled against. + * GPLUGIN_VERSION_CHECK: + * @major: the major version to check for + * @minor: the minor version to check for + * @micro: the micro version to check for + * Checks the version of the GPlugin library that is being compiled + * against. See gplugin_check_version() for a runtime check. + * Returns: %TRUE if the version of the GPlugin header files + * is the same as or newer than the passed-in version. * GPluginVersionCompareFunc:
* @v1: The first version to compare
--- a/gplugin/gplugin-version.h.in Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin/gplugin-version.h.in Mon Aug 20 23:29:20 2018 -0500
@@ -30,10 +30,10 @@
#define GPLUGIN_VERSION "@GPLUGIN_VERSION@"
-#define GPLUGIN_VERSION_CHECK(x,y,z) \
- ((x) == GPLUGIN_MAJOR_VERSION && \
- ((y) < GPLUGIN_MINOR_VERSION || \
- ((y) == GPLUGIN_MINOR_VERSION && (z) <= GPLUGIN_MICRO_VERSION)))
+#define GPLUGIN_VERSION_CHECK(major,minor,micro) \ + ((major) == GPLUGIN_MAJOR_VERSION && \ + ((minor) < GPLUGIN_MINOR_VERSION || \ + ((minor) == GPLUGIN_MINOR_VERSION && (micro) <= GPLUGIN_MICRO_VERSION))) --- a/gplugin/meson.build Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin/meson.build Mon Aug 20 23:29:20 2018 -0500
@@ -2,13 +2,7 @@
###############################################################################
-GPLUGIN_LD_VERSION = '@0@.@1@.@2@'.format(
+GPLUGIN_LIBRARY_VERSION = '0.1.0' @@ -119,12 +113,16 @@
output : 'gplugin-version.h',
configuration : version_conf,
- install_dir : join_paths(get_option('includedir'), 'gplugin-1.0', 'gplugin'))
+ install_dir : join_paths(get_option('includedir'), 'gplugin-1.0', 'gplugin') GPLUGIN_PUBLIC_BUILT_HEADERS += [
+gplugin_inc = include_directories('.') @@ -133,6 +131,7 @@
foreach header : ['gplugin-version.h', 'gplugin-enums.h'] # GPLUGIN_PUBLIC_BUILT_HEADERS
GPLUGIN_H_INCLUDES = '@0@\n#include <gplugin/@1@>'.format(
@@ -183,10 +182,10 @@
c_args : ['-DGPLUGIN_COMPILATION', '-DG_LOG_DOMAIN="GPlugin"'],
include_directories : toplevel_inc,
dependencies : [GLIB, GOBJECT, GMODULE],
- soversion : GPLUGIN_LD_CURRENT,
- version : GPLUGIN_LD_VERSION,
+ version : GPLUGIN_LIBRARY_VERSION, gplugin_dep = declare_dependency(
include_directories : [toplevel_inc, include_directories('.')],
@@ -276,6 +275,8 @@
###############################################################################
###############################################################################
-if get_option('testing')
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/gplugin-docs.xml Mon Aug 20 23:29:20 2018 -0500
@@ -0,0 +1,65 @@
+<!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. + <part id="object-hierarchy"> + <title>Object Hierarchy</title> + <xi:include href="xml/tree_index.sgml"/> + <title>API Reference</title> + <title>Core API</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"/> + <chapter id="nativeapi"> + <title>Native API</title> + <xi:include href="xml/gplugin-native.xml"/> + <xi:include href="xml/gplugin-native-plugin.xml"/> + <xi:include href="xml/gplugin-native-loader.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-index-2.11.0" role="2.11.0"> + <title>Index of new symbols in 2.11.0</title> + <xi:include href="xml/api-index-2.11.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/meson.build Mon Aug 20 23:29:20 2018 -0500
@@ -0,0 +1,45 @@
+# Header files or dirs to ignore when scanning. Use base file/dir names + 'gplugin-loader-tests.h', + 'gplugin-marshallers.h', + 'gplugin-native-private.h', +ignore_hfiles += GPLUGIN_PRIVATE_HEADERS +# Extra options to supply to gtkdoc-scan. + '--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( + input : 'version.xml.in', + output : 'version.xml', + configuration : version_conf) +gnome.gtkdoc(DOC_MODULE, + main_xml : DOC_MODULE + '-docs.xml', + dependencies : gplugin_dep, + gobject_typesfile : DOC_MODULE + '.types', + content_files : content_files, --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/version.xml.in Mon Aug 20 23:29:20 2018 -0500
@@ -0,0 +1,1 @@
--- a/gplugin/tests/meson.build Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin/tests/meson.build Mon Aug 20 23:29:20 2018 -0500
@@ -137,4 +137,4 @@
meson.current_build_dir()),
dependencies : [gplugin_dep, GLIB, GOBJECT])
-test('Unresolved Symbol', e)
+# test('Unresolved Symbol', e) --- a/gplugin/tests/test-versioned-dependencies.c Wed Jul 18 22:33:36 2018 -0500
+++ b/gplugin/tests/test-versioned-dependencies.c Mon Aug 20 23:29:20 2018 -0500
@@ -23,9 +23,33 @@
/******************************************************************************
+ *****************************************************************************/ +_test_plugin_load_and_has_dependent(GPluginPlugin *dependent, + GPluginPlugin *plugin = NULL; + gboolean found = FALSE; + plugin = gplugin_manager_find_plugin("gplugin/test-no-version"); + g_assert_cmpint(gplugin_plugin_get_state(plugin), ==, + GPLUGIN_PLUGIN_STATE_LOADED); + for(l = gplugin_plugin_get_dependent_plugins(plugin); l; l = l->next) { + if(l->data == dependent) + g_object_unref(G_OBJECT(plugin)); +/****************************************************************************** *****************************************************************************/
test_load_with_dependencies(void) {
GPluginPlugin *plugin = NULL;
@@ -47,55 +71,16 @@
g_object_unref(G_OBJECT(plugin));
/* now make sure each dependent plugin that's available was loaded */
- plugin = gplugin_manager_find_plugin("gplugin/test-no-version");
- g_assert_cmpint(gplugin_plugin_get_state(plugin), ==,
- GPLUGIN_PLUGIN_STATE_LOADED);
- g_object_unref(G_OBJECT(plugin));
- plugin = gplugin_manager_find_plugin("gplugin/test-exact1");
- g_assert_cmpint(gplugin_plugin_get_state(plugin), ==,
- GPLUGIN_PLUGIN_STATE_LOADED);
- g_object_unref(G_OBJECT(plugin));
- plugin = gplugin_manager_find_plugin("gplugin/test-exact2");
- g_assert_cmpint(gplugin_plugin_get_state(plugin), ==,
- GPLUGIN_PLUGIN_STATE_LOADED);
- g_object_unref(G_OBJECT(plugin));
- plugin = gplugin_manager_find_plugin("gplugin/test-greater");
- g_assert_cmpint(gplugin_plugin_get_state(plugin), ==,
- GPLUGIN_PLUGIN_STATE_LOADED);
- g_object_unref(G_OBJECT(plugin));
- plugin = gplugin_manager_find_plugin("gplugin/test-greater-equal");
- g_assert_cmpint(gplugin_plugin_get_state(plugin), ==,
- GPLUGIN_PLUGIN_STATE_LOADED);
- g_object_unref(G_OBJECT(plugin));
- plugin = gplugin_manager_find_plugin("gplugin/test-less");
- g_assert_cmpint(gplugin_plugin_get_state(plugin), ==,
- GPLUGIN_PLUGIN_STATE_LOADED);
- g_object_unref(G_OBJECT(plugin));
- plugin = gplugin_manager_find_plugin("gplugin/test-less-equal");
- g_assert_cmpint(gplugin_plugin_get_state(plugin), ==,
- GPLUGIN_PLUGIN_STATE_LOADED);
- g_object_unref(G_OBJECT(plugin));
- plugin = gplugin_manager_find_plugin("gplugin/bar");
- g_assert_cmpint(gplugin_plugin_get_state(plugin), ==,
- GPLUGIN_PLUGIN_STATE_LOADED);
- g_object_unref(G_OBJECT(plugin));
- plugin = gplugin_manager_find_plugin("gplugin/baz");
- g_assert_cmpint(gplugin_plugin_get_state(plugin), ==,
- GPLUGIN_PLUGIN_STATE_LOADED);
- g_object_unref(G_OBJECT(plugin));
- plugin = gplugin_manager_find_plugin("gplugin/fez");
- g_assert_cmpint(gplugin_plugin_get_state(plugin), ==,
- GPLUGIN_PLUGIN_STATE_LOADED);
- g_object_unref(G_OBJECT(plugin));
+ _test_plugin_load_and_has_dependent(plugin, "gplugin/test-no-version"); + _test_plugin_load_and_has_dependent(plugin, "gplugin/test-exact1"); + _test_plugin_load_and_has_dependent(plugin, "gplugin/test-exact2"); + _test_plugin_load_and_has_dependent(plugin, "gplugin/test-greater"); + _test_plugin_load_and_has_dependent(plugin, "gplugin/test-greater-equal"); + _test_plugin_load_and_has_dependent(plugin, "gplugin/test-less"); + _test_plugin_load_and_has_dependent(plugin, "gplugin/test-less-equal"); + _test_plugin_load_and_has_dependent(plugin, "gplugin/bar"); + _test_plugin_load_and_has_dependent(plugin, "gplugin/baz"); + _test_plugin_load_and_has_dependent(plugin, "gplugin/fez"); /******************************************************************************
--- a/lua/meson.build Wed Jul 18 22:33:36 2018 -0500
+++ b/lua/meson.build Mon Aug 20 23:29:20 2018 -0500
@@ -49,6 +49,4 @@
-if get_option('testing')
--- a/lua/tests/lua-plugins/basic.lua Wed Jul 18 22:33:36 2018 -0500
+++ b/lua/tests/lua-plugins/basic.lua Mon Aug 20 23:29:20 2018 -0500
@@ -41,3 +41,4 @@
--- a/meson.build Wed Jul 18 22:33:36 2018 -0500
+++ b/meson.build Mon Aug 20 23:29:20 2018 -0500
@@ -1,8 +1,8 @@
###############################################################################
###############################################################################
-project('gplugin', 'c', version : '0.28.0-dev',
- meson_version : '>0.36.0',
+project('gplugin', 'c', version : '0.28.0dev', + meson_version : '>=0.41.0', default_options : ['c_std=c99'])
parts = meson.project_version().split('-')
@@ -23,7 +23,7 @@
version_conf.set('GPLUGIN_VERSION', meson.project_version())
LOCALE_DIR = join_paths(get_option('prefix'), get_option('localedir'))
-add_global_arguments('-DLOCALEDIR="@0@"'.format(LOCALE_DIR), language : 'c')
+add_project_arguments('-DLOCALEDIR="@0@"'.format(LOCALE_DIR), language : 'c') ###############################################################################
@@ -35,23 +35,18 @@
help2man = find_program('help2man')
-GLIB = dependency('glib-2.0', version : '>=2.34.0')
+GLIB = dependency('glib-2.0', version : '>=2.40.0') GOBJECT = dependency('gobject-2.0')
# we separate gmodule out so our test aren't linked to it
GMODULE = dependency('gmodule-2.0')
-if get_option('testing')
- GTESTER = find_program('gtester')
- XSLTPROC = find_program('xsltproc')
###############################################################################
###############################################################################
GETTEXT_PACKAGE = 'gplugin'
-add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format(GETTEXT_PACKAGE),
+add_project_arguments('-DGETTEXT_PACKAGE="@0@"'.format(GETTEXT_PACKAGE), @@ -63,17 +58,17 @@
###############################################################################
compiler = meson.get_compiler('c')
'-DPREFIX="@0@"'.format(get_option('prefix')),
'-DLIBDIR="@0@"'.format(get_option('libdir')),
- '-DGPLUGIN_WEBSITE="http://bitbucket.org/gplugin/main"',
+ '-DGPLUGIN_WEBSITE="https://bitbucket.org/gplugin/main"', if compiler.has_argument('-Wformat')
- add_global_arguments('-Wformat', language : 'c')
+ add_project_arguments('-Wformat', language : 'c') if compiler.has_multi_arguments(['-Wformat', '-Werror=format-security'])
- add_global_arguments('-Werror=format-security', language : 'c')
+ add_project_arguments('-Werror=format-security', language : 'c') @@ -84,13 +79,13 @@
# check if we're using gcc
if compiler.get_id() == 'gcc' or host_machine.platform() == 'darwin'
'-DGPLUGIN_UNUSED=__attribute__((unused))',
@@ -98,6 +93,20 @@
toplevel_inc = include_directories('.')
+############################################################################### +############################################################################### +ENABLE_DOC = get_option('doc') + if meson.version().version_compare('<0.41.2') + error('Meson 0.41.2 or newer is required to build documentation.') ###############################################################################
###############################################################################
--- a/meson_options.txt Wed Jul 18 22:33:36 2018 -0500
+++ b/meson_options.txt Mon Aug 20 23:29:20 2018 -0500
@@ -14,21 +14,21 @@
- type : 'boolean', value : true,
- description : 'Whether or not to run unit tests while compiling'
type : 'boolean', value : true,
description : 'Whether or not to build man pages from --help output'
type : 'boolean', value : true,
- description : 'Whether or not to build the gtk3 library'
+ description : 'build documentation with gtk-doc' + type : 'boolean', value : true, + description : 'Whether or not to build the gtk3 library' --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/packaging/debian/clean Mon Aug 20 23:29:20 2018 -0500
@@ -0,0 +1,1 @@
--- a/packaging/debian/control Wed Jul 18 22:33:36 2018 -0500
+++ b/packaging/debian/control Mon Aug 20 23:29:20 2018 -0500
@@ -2,8 +2,8 @@
Maintainer: Gary Kramlich <grim@reaperworld.com>
-Build-Depends: debhelper (>=9), dh-exec,
- cmake, libglib2.0-dev, libgtk-3-dev,
+Build-Depends: debhelper (>=9), + meson, libglib2.0-dev, libgtk-3-dev, xsltproc, gettext, help2man,
gobject-introspection, libgirepository1.0-dev,
liblua5.1-0-dev, lua-lgi,
@@ -11,7 +11,7 @@
Homepage: https://bitbucket.org/gplugin/main
Vcs-Browser: https://bitbucket.org/gplugin/main/src
Vcs-Hg: https://bitbucket.org/gplugin/main
-Standards-Version: 3.9.6
+Standards-Version: 3.9.8 @@ -24,6 +24,17 @@
This package contains the main library.
+Package: libgplugin0-bin +Depends: ${misc:Depends}, ${shlibs:Depends}, libgplugin0 (= ${binary:Version}), libglib2.0-0 (>=2.20.0) +Description: GObject based plugin library utilities + GPlugin is a GObject based library that implements a reusable plugin system + which supports loading plugins in other languages via loaders. It relies + heavily on GObjectIntrospection to expose its API to the other languages. + This package contains utilities for the library. @@ -81,7 +92,7 @@
Package: gir1.2-gplugin-0.0
-Depends: ${misc:Depends}, libgplugin0
+Depends: ${gir:Depends}, ${misc:Depends}, libgplugin0 Description: typelibe for libgplugin
GPlugin is a GObject based library that implements a reusable plugin system
--- a/packaging/debian/copyright Wed Jul 18 22:33:36 2018 -0500
+++ b/packaging/debian/copyright Mon Aug 20 23:29:20 2018 -0500
@@ -1,4 +1,4 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: grim@reaperworld.com
Source: https://bitbucket.org/gplugin/main
--- a/packaging/debian/gir1.2-gplugin-0.0.install Wed Jul 18 22:33:36 2018 -0500
+++ b/packaging/debian/gir1.2-gplugin-0.0.install Mon Aug 20 23:29:20 2018 -0500
@@ -1,3 +1,2 @@
-usr/lib/${DEB_HOST_MULTIARCH}/girepository-1.0/
+debian/tmp/usr/lib/*/girepository-1.0/ +debian/tmp/usr/share/gir-1.0/ --- a/packaging/debian/libgplugin-dev.install Wed Jul 18 22:33:36 2018 -0500
+++ b/packaging/debian/libgplugin-dev.install Mon Aug 20 23:29:20 2018 -0500
@@ -1,6 +1,5 @@
-usr/include/gplugin-1.0/gplugin
-usr/include/gplugin-1.0/gplugin.h
-usr/include/gplugin-1.0/gplugin-native.h
-usr/lib/${DEB_HOST_MULTIARCH}/libgplugin.so
-usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/gplugin.pc
+debian/tmp/usr/include/gplugin-1.0/gplugin +debian/tmp/usr/include/gplugin-1.0/gplugin.h +debian/tmp/usr/include/gplugin-1.0/gplugin-native.h +debian/tmp/usr/lib/*/libgplugin.so +debian/tmp/usr/lib/*/pkgconfig/gplugin.pc --- a/packaging/debian/libgplugin-gtk-bin.install Wed Jul 18 22:33:36 2018 -0500
+++ b/packaging/debian/libgplugin-gtk-bin.install Mon Aug 20 23:29:20 2018 -0500
@@ -1,2 +1,2 @@
-usr/bin/gplugin-gtk-viewer
-usr/share/man/man1/gplugin-gtk-viewer.1
+debian/tmp/usr/bin/gplugin-gtk-viewer +debian/tmp/usr/share/man/man1/gplugin-gtk-viewer.1 --- a/packaging/debian/libgplugin-gtk-dev.install Wed Jul 18 22:33:36 2018 -0500
+++ b/packaging/debian/libgplugin-gtk-dev.install Mon Aug 20 23:29:20 2018 -0500
@@ -1,5 +1,4 @@
usr/include/gplugin-1.0/gplugin-gtk
usr/include/gplugin-1.0/gplugin-gtk.h
-usr/lib/${DEB_HOST_MULTIARCH}/libgplugin-gtk.so
-usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/gplugin-gtk.pc
+debian/tmp/usr/lib/*/libgplugin-gtk.so +debian/tmp/usr/lib/*/pkgconfig/gplugin-gtk.pc --- a/packaging/debian/libgplugin-gtk0.install Wed Jul 18 22:33:36 2018 -0500
+++ b/packaging/debian/libgplugin-gtk0.install Mon Aug 20 23:29:20 2018 -0500
@@ -1,2 +1,1 @@
-usr/lib/${DEB_HOST_MULTIARCH}/libgplugin-gtk.so.*
+debian/tmp/usr/lib/*/libgplugin-gtk.so.* --- a/packaging/debian/libgplugin-gtk0.postinst Wed Jul 18 22:33:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-if [ "$1" = "configure" ]; then
--- a/packaging/debian/libgplugin-gtk0.postrm Wed Jul 18 22:33:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-if [ "$1" = "remove" ] ; then
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/packaging/debian/libgplugin-gtk0.triggers Mon Aug 20 23:29:20 2018 -0500
@@ -0,0 +1,1 @@
+activate-noawait ldconfig --- a/packaging/debian/libgplugin-lua.install Wed Jul 18 22:33:36 2018 -0500
+++ b/packaging/debian/libgplugin-lua.install Mon Aug 20 23:29:20 2018 -0500
@@ -1,2 +1,1 @@
-usr/lib/${DEB_HOST_MULTIARCH}/gplugin/gplugin-lua.so
+debian/tmp/usr/lib/*/gplugin/gplugin-lua.so --- a/packaging/debian/libgplugin-python.install Wed Jul 18 22:33:36 2018 -0500
+++ b/packaging/debian/libgplugin-python.install Mon Aug 20 23:29:20 2018 -0500
@@ -1,2 +1,1 @@
-usr/lib/${DEB_HOST_MULTIARCH}/gplugin/gplugin-python.so
+debian/tmp/usr/lib/*/gplugin/gplugin-python.so --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/packaging/debian/libgplugin0-bin.install Mon Aug 20 23:29:20 2018 -0500
@@ -0,0 +1,2 @@
+debian/tmp/usr/bin/gplugin-query +debian/tmp/usr/share/man/man1/gplugin-query.1 --- a/packaging/debian/libgplugin0.install Wed Jul 18 22:33:36 2018 -0500
+++ b/packaging/debian/libgplugin0.install Mon Aug 20 23:29:20 2018 -0500
@@ -1,4 +1,1 @@
-usr/lib/${DEB_HOST_MULTIARCH}/libgplugin.so.*
-usr/share/man/man1/gplugin-query.1
+debian/tmp/usr/lib/*/libgplugin.so.* --- a/packaging/debian/libgplugin0.postinst Wed Jul 18 22:33:36 2018 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/packaging/debian/libgplugin0.triggers Mon Aug 20 23:29:20 2018 -0500
@@ -0,0 +1,1 @@
+activate-noawait ldconfig --- a/packaging/debian/rules Wed Jul 18 22:33:36 2018 -0500
+++ b/packaging/debian/rules Mon Aug 20 23:29:20 2018 -0500
@@ -1,5 +1,24 @@
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all +BUILD_DIR := debian/build
+override_dh_auto_configure: + meson --prefix /usr --warnlevel 3 $(BUILD_DIR) + ninja -v -C $(BUILD_DIR) + ninja -v -C $(BUILD_DIR) test +override_dh_auto_install: + DESTDIR=$(CURDIR)/debian/tmp ninja -v -C $(BUILD_DIR) install --- a/packaging/gplugin.spec.in Wed Jul 18 22:33:36 2018 -0500
+++ b/packaging/gplugin.spec.in Mon Aug 20 23:29:20 2018 -0500
@@ -143,7 +143,6 @@
CFLAGS="%{optflags}" meson \
@@ -155,7 +154,7 @@
-ninja install DESTDIR=%{buildroot}
+DESTDIR=%{buildroot} ninja install rm -rf %{buildroot}%{_datadir}/doc/gplugin/
--- a/python/gplugin-python-loader.c Wed Jul 18 22:33:36 2018 -0500
+++ b/python/gplugin-python-loader.c Mon Aug 20 23:29:20 2018 -0500
@@ -325,11 +325,14 @@
len = mbstowcs(argv[0], program, len + 1);
g_warning("Could not convert program name to wchar_t string.");
/* setup sys.path according to
- * http://docs.python.org/3/c-api/init.html#PySys_SetArgvEx
+ * https://docs.python.org/3/c-api/init.html#PySys_SetArgvEx #if PY_VERSION_HEX < 0x03010300
--- a/python/meson.build Wed Jul 18 22:33:36 2018 -0500
+++ b/python/meson.build Mon Aug 20 23:29:20 2018 -0500
@@ -54,6 +54,4 @@
-if get_option('testing')
--- a/tcc/meson.build Wed Jul 18 22:33:36 2018 -0500
+++ b/tcc/meson.build Mon Aug 20 23:29:20 2018 -0500
@@ -25,6 +25,4 @@
-if get_option('testing')