gplugin/gplugin

pulling in develop
feature/ruby-loader
2018-08-20, Gary Kramlich
3166e87ee56d
pulling in develop
  • +2 -0
    .hgignore
  • +7 -0
    ChangeLog
  • +1 -1
    INSTALL
  • +306 -0
    convey.yml
  • +20 -2
    gplugin-gtk/gplugin-gtk-plugin-info.c
  • +2 -7
    gplugin-gtk/gplugin-gtk-plugin-info.h
  • +25 -0
    gplugin-gtk/gplugin-gtk-store.c
  • +30 -0
    gplugin-gtk/gplugin-gtk-view.c
  • +4 -4
    gplugin-gtk/gplugin-gtk-viewer.c
  • +27 -0
    gplugin-gtk/gplugin-gtk.xml.in
  • +61 -24
    gplugin-gtk/meson.build
  • +50 -0
    gplugin-gtk/reference/gplugin-gtk-docs.xml
  • +39 -0
    gplugin-gtk/reference/meson.build
  • +1 -0
    gplugin-gtk/reference/version.xml.in
  • +8 -0
    gplugin.sublime-project
  • +23 -0
    gplugin/gplugin-core.c
  • +8 -0
    gplugin/gplugin-enums.c.tmpl
  • +20 -2
    gplugin/gplugin-loader.c
  • +18 -8
    gplugin/gplugin-manager.c
  • +16 -0
    gplugin/gplugin-native-loader.c
  • +9 -0
    gplugin/gplugin-native-plugin.c
  • +10 -0
    gplugin/gplugin-options.c
  • +72 -23
    gplugin/gplugin-plugin-info.c
  • +64 -9
    gplugin/gplugin-plugin.c
  • +3 -0
    gplugin/gplugin-plugin.h
  • +1 -0
    gplugin/gplugin-private.h
  • +54 -0
    gplugin/gplugin-version.c
  • +4 -4
    gplugin/gplugin-version.h.in
  • +13 -12
    gplugin/meson.build
  • +65 -0
    gplugin/reference/gplugin-docs.xml
  • +45 -0
    gplugin/reference/meson.build
  • +1 -0
    gplugin/reference/version.xml.in
  • +1 -1
    gplugin/tests/meson.build
  • +35 -50
    gplugin/tests/test-versioned-dependencies.c
  • +1 -3
    lua/meson.build
  • +1 -0
    lua/tests/lua-plugins/basic.lua
  • +25 -16
    meson.build
  • +8 -8
    meson_options.txt
  • +1 -0
    packaging/debian/clean
  • +15 -4
    packaging/debian/control
  • +1 -1
    packaging/debian/copyright
  • +2 -3
    packaging/debian/gir1.2-gplugin-0.0.install
  • +5 -6
    packaging/debian/libgplugin-dev.install
  • +2 -2
    packaging/debian/libgplugin-gtk-bin.install
  • +2 -3
    packaging/debian/libgplugin-gtk-dev.install
  • +1 -2
    packaging/debian/libgplugin-gtk0.install
  • +0 -11
    packaging/debian/libgplugin-gtk0.postinst
  • +0 -11
    packaging/debian/libgplugin-gtk0.postrm
  • +1 -0
    packaging/debian/libgplugin-gtk0.triggers
  • +1 -2
    packaging/debian/libgplugin-lua.install
  • +1 -2
    packaging/debian/libgplugin-python.install
  • +2 -0
    packaging/debian/libgplugin0-bin.install
  • +1 -4
    packaging/debian/libgplugin0.install
  • +0 -7
    packaging/debian/libgplugin0.postinst
  • +1 -0
    packaging/debian/libgplugin0.triggers
  • +20 -1
    packaging/debian/rules
  • +1 -2
    packaging/gplugin.spec.in
  • +4 -1
    python/gplugin-python-loader.c
  • +1 -3
    python/meson.build
  • +1 -3
    tcc/meson.build
  • --- a/.hgignore Wed Jul 18 22:33:36 2018 -0500
    +++ b/.hgignore Mon Aug 20 23:29:20 2018 -0500
    @@ -7,9 +7,11 @@
    *.pyc
    syntax: regexp
    +^artifacts\/
    ^build.*\/
    ^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 @@
    0.28.0:
    * Fixed building on OSX with homebrew
    * Added an RPM spec file
    + * 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 gtk-doc
    + * Added a Glade catalog for gplugin-gtk
    + * Added GPluginGtk-0.0.gir
    0.27.0: 2016/04/18
    * 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:
    glib-2.0 >= 2.34.0
    gobject-introspection, libgirepository1.0-dev
    - meson >= 0.36.0
    + meson >= 0.37.0
    gettext
    help2man
    a C compiler
    --- /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 @@
    +tasks:
    + import:
    + type: import
    + files:
    + - .
    + import-artifacts:
    + type: import
    + files: artifacts
    +
    + package-cloud:
    + image: rwgrim/package-cloud:latest
    + command: push --verbose ${REPOSITORY}/${DISTRIBUTION} artifacts/${FILES}
    + workdir: /workspace
    +
    + #############################################################################
    + # Alpine
    + #############################################################################
    + build-alpine-edge-amd64:
    + image: gplugin/builders:alpine-edge-amd64
    + export-alpine-edge-amd64:
    + type: export
    + files: alpine-edge-amd64:artifacts/
    +
    + #############################################################################
    + # Coverity
    + #############################################################################
    + build-coverity:
    + image: gplugin/builders:coverity
    + export-coverity:
    + type: export
    + files: coverity:artifacts/coverity
    +
    + #############################################################################
    + # Debian
    + #############################################################################
    + build-debian-oldstable-amd64:
    + image: gplugin/builders:debian-jessie-amd64
    + export-debian-oldstable-amd64:
    + type: export
    + files: debian-oldstable-amd64:artifacts/
    + build-debian-stable-amd64:
    + image: gplugin/builders:debian-stretch-amd64
    + export-debian-stable-amd64:
    + type: export
    + files: debian-stable-amd64:artifacts/
    + package-cloud-debian-stable-amd64:
    + type: extend
    + task: package-cloud
    + environment:
    + - PACKAGECLOUD_TOKEN
    + - REPOSITORY=pidgin/experimental
    + - DISTRIBUTION=debian/stretch
    + - FILES=debian-stable-amd64/debs/*.deb
    + package-cloud-debian-stable-source:
    + type: extend
    + task: package-cloud
    + environment:
    + - PACKAGECLOUD_TOKEN
    + - 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:
    + type: export
    + files: debian-testing-amd64:artifacts/
    + package-cloud-debian-testing-amd64:
    + type: extend
    + task: package-cloud
    + environment:
    + - PACKAGECLOUD_TOKEN
    + - REPOSITORY=pidgin/experimental
    + - DISTRIBUTION=debian/buster
    + - FILES=debian-testing-amd64/debs/*.deb
    + package-cloud-debian-testing-source:
    + type: extend
    + task: package-cloud
    + environment:
    + - PACKAGECLOUD_TOKEN
    + - REPOSITORY=pidgin/experimental
    + - DISTRIBUTION=debian/buster
    + - FILES=debian-testing-amd64/debs/*.dsc
    +
    + #############################################################################
    + # Fedora
    + #############################################################################
    + build-fedora-25-amd64:
    + image: gplugin/builders:fedora-25-amd64
    + export-fedora-25-amd64:
    + type: export
    + files: fedora-25-amd64:artifacts/
    + package-cloud-fedora-25-amd64:
    + type: extend
    + task: package-cloud
    + environment:
    + - PACKAGECLOUD_TOKEN
    + - REPOSITORY=pidgin/experimental
    + - DISTRIBUTION=fedora/25
    + - FILES=fedora-25-amd64/x86_64/*.rpm
    + build-fedora-26-amd64:
    + image: gplugin/builders:fedora-26-amd64
    + export-fedora-26-amd64:
    + type: export
    + files: fedora-26-amd64:artifacts/
    + package-cloud-fedora-26-amd64:
    + type: extend
    + task: package-cloud
    + environment:
    + - PACKAGECLOUD_TOKEN
    + - REPOSITORY=pidgin/experimental
    + - DISTRIBUTION=fedora/26
    + - FILES=fedora-26-amd64/x86_64/*.rpm
    +
    + #############################################################################
    + # OpenSUSE
    + #############################################################################
    + build-opensuse-tumbleweed-amd64:
    + image: gplugin/builders:opensuse-tumbleweed-amd64
    + export-opensuse-tumbleweed-amd64:
    + type: export
    + files: opensuse-tumbleweed-amd64:artifacts/
    + package-cloud-opensuse-tumbleweed-amd64:
    + type: extend
    + task: package-cloud
    + environment:
    + - PACKAGECLOUD_TOKEN
    + - REPOSITORY=pidgin/experimental
    + - DISTRIBUTION=opensuse/tumbleweed
    + - FILES=opensuse-tumbleweed-amd64/x86_64/*.rpm
    +
    + #############################################################################
    + # scanbuild
    + #############################################################################
    + build-scanbuild:
    + image: gplugin/builders:scanbuild
    + export-scanbuild:
    + type: export
    + files: scanbuild:artifacts/
    +
    + #############################################################################
    + # Ubuntu
    + #############################################################################
    + build-ubuntu-xenial-amd64:
    + image: gplugin/builders:ubuntu-xenial-amd64
    + export-ubuntu-xenial-amd64:
    + type: export
    + files: debian-xenial-amd64:artifacts/
    + package-cloud-ubuntu-xenial-amd64:
    + type: extend
    + task: package-cloud
    + environment:
    + - PACKAGECLOUD_TOKEN
    + - REPOSITORY=pidgin/experimental
    + - DISTRIBUTION=ubuntu/xenial
    + - FILES=ubuntu-xenial-amd64/debs/*.deb
    + package-cloud-ubuntu-xenial-source:
    + type: extend
    + task: package-cloud
    + environment:
    + - PACKAGECLOUD_TOKEN
    + - 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:
    + type: export
    + files: debian-zesty-amd64:artifacts/
    + package-cloud-ubuntu-zesty-amd64:
    + type: extend
    + task: package-cloud
    + environment:
    + - PACKAGECLOUD_TOKEN
    + - REPOSITORY=pidgin/experimental
    + - DISTRIBUTION=ubuntu/zesty
    + - FILES=ubuntu-zesty-amd64/debs/*.deb
    + package-cloud-ubuntu-zesty-source:
    + type: extend
    + task: package-cloud
    + environment:
    + - PACKAGECLOUD_TOKEN
    + - REPOSITORY=pidgin/experimental
    + - DISTRIBUTION=ubuntu/zesty
    + - FILES=ubuntu-zesty-amd64/debs/*.dsc
    +
    +plans:
    + alpine-edge-amd64:
    + stages:
    + - tasks:
    + - import
    + - build-alpine-edge-amd64
    + - export-alpine-edge-amd64
    + debian-oldstable-amd64:
    + stages:
    + - tasks:
    + - import
    + - build-debian-oldstable-amd64
    + - export-debian-oldstable-amd64
    + debian-stable-amd64:
    + stages:
    + - tasks:
    + - import
    + - build-debian-stable-amd64
    + - export-debian-stable-amd64
    + debian-testing-amd64:
    + stages:
    + - tasks:
    + - import
    + - build-debian-testing-amd64
    + - export-debian-testing-amd64
    + debian-package-cloud:
    + stages:
    + - name: import packages
    + tasks: import-artifacts
    + - name: upload packages
    + concurrent: true
    + tasks:
    + - package-cloud-debian-stable-amd64
    + - package-cloud-debian-stable-source
    + - package-cloud-debian-testing-amd64
    + - package-cloud-debian-testing-source
    +
    + fedora-25-amd64:
    + stages:
    + - tasks:
    + - import
    + - build-fedora-25-amd64
    + - export-fedora-25-amd64
    + fedora-26-amd64:
    + stages:
    + - tasks:
    + - import
    + - build-fedora-26-amd64
    + - export-fedora-26-amd64
    + fedora-package-cloud:
    + stages:
    + - name: import packages
    + tasks: import-artifacts
    + - name: upload packages
    + concurrent: true
    + tasks:
    + - package-cloud-fedora-25-amd64
    + - package-cloud-fedora-26-amd64
    +
    + coverity:
    + stages:
    + - tasks:
    + - import
    + - build-coverity
    + - export-coverity
    +
    + opensuse-tumbleweed-amd64:
    + stages:
    + - tasks:
    + - import
    + - build-opensuse-tumbleweed-amd64
    + - export-opensuse-tumbleweed-amd64
    + opensuse-package-cloud:
    + stages:
    + - name: import packages
    + tasks: import-artifacts
    + - name: upload packages
    + concurrent: true
    + tasks:
    + - package-cloud-opensuse-tumbleweed-amd64
    +
    + scanbuild:
    + stages:
    + - tasks:
    + - import
    + - build-scanbuild
    + - export-scanbuild
    +
    + ubuntu-xenial-amd64:
    + stages:
    + - tasks:
    + - import
    + - build-ubuntu-xenial-amd64
    + - export-ubuntu-xenial-amd64
    + ubuntu-zesty-amd64:
    + stages:
    + - tasks:
    + - import
    + - build-ubuntu-zesty-amd64
    + - export-ubuntu-zesty-amd64
    +
    +meta-plans:
    + alpine:
    + plans:
    + - alpine-edge-amd64
    + debian:
    + plans:
    + # old stable has a bunch of issues with
    + # old meson that need to be sorted out.
    + # - debian-oldstable-amd64
    + - debian-stable-amd64
    + - debian-testing-amd64
    + fedora:
    + plans:
    + - fedora-25-amd64
    + - fedora-26-amd64
    + ubuntu:
    + plans:
    + - ubuntu-xenial-amd64
    + - ubuntu-zesty-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 @@
    /******************************************************************************
    * API
    *****************************************************************************/
    +
    +/**
    + * gplugin_gtk_plugin_info_new:
    + *
    + * Create a new GPluginGtkView which can be used to display info about a
    + * #GPluginPlugin.
    + *
    + * Returns: (transfer full): The new #GPluginGtkView widget.
    + */
    GtkWidget *
    gplugin_gtk_plugin_info_new(void) {
    GObject *ret = NULL;
    @@ -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)));
    else
    priv->plugin = NULL;
    @@ -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;
    #include <glib.h>
    #include <glib-object.h>
    @@ -43,11 +43,6 @@
    struct _GPluginGtkPluginInfo {
    GtkFrame parent;
    -
    - 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 @@
    /******************************************************************************
    * API
    *****************************************************************************/
    +
    +/**
    + * gplugin_gtk_store_new:
    + *
    + * Create a new GPluginGtkStore which is a prepopulated #GtkTreeStore.
    + *
    + * Returns: (transfer full): A new GtkTreeModel prepopulated with all of the
    + * gplugins.
    + */
    GPluginGtkStore *
    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
    + * will use.
    + */
    const GType *
    gplugin_gtk_get_store_column_types(void) {
    return column_types;
    --- 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 @@
    /******************************************************************************
    * API
    *****************************************************************************/
    +
    +/**
    + * gplugin_gtk_view_new:
    + *
    + * Creates a new GPluginGtkView.
    + *
    + * Returns: (transfer full): The new view.
    + */
    GtkWidget *
    gplugin_gtk_view_new(void) {
    GObject *ret = NULL;
    @@ -165,6 +181,14 @@
    return GTK_WIDGET(ret);
    }
    +/**
    + * 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
    + * plugins.
    + */
    void
    gplugin_gtk_view_set_show_internal(GPluginGtkView *view,
    gboolean show_internal)
    @@ -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.
    + */
    gboolean
    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);
    -
    - gplugin_init();
    -
    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 @@
    return 0;
    }
    + gtk_init(&argc, &argv);
    +
    + gplugin_init();
    +
    if(add_default_paths)
    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@"
    + library="gplugin-gtk"
    + domain="gplugin"
    + depends="gtk+"
    + book="GPlugin">
    + <glade-widget-classes>
    + <glade-widget-class
    + name="GPluginGtkPluginInfo"
    + generic-name="plugininfo"
    + title="Plugin Info"
    + get-type-function="gplugin_gtk_plugin_info_get_type">
    + </glade-widget-class>
    + <glade-widget-class
    + name="GPluginGtkView"
    + generic-name="pluginview"
    + title="Plugin View"
    + get-type-function="gplugin_gtk_view_get_type">
    + </glade-widget-class>
    + </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"/>
    + </glade-widget-group>
    +</glade-catalog>
    --- 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_AGE = 0
    -GPLUGIN_GTK_LD_VERSION = '@0@.@1@.@2@'.format(
    - GPLUGIN_GTK_LD_CURRENT,
    - GPLUGIN_GTK_LD_REVISION,
    - GPLUGIN_GTK_LD_AGE)
    +GLADEUI = dependency('gladeui-2.0', version: '>=3.0.0')
    +
    +GPLUGIN_GTK_LIBRARY_VERSION = '0.1.0'
    GPLUGIN_GTK_SOURCES = [
    '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 : true,
    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: true,
    + install_dir : GLADEUI.get_pkgconfig_variable('catalogdir'),
    +)
    +
    ###############################################################################
    # Library Target
    ###############################################################################
    @@ -65,26 +69,22 @@
    GPLUGIN_GTK_HEADERS,
    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 : true
    )
    -# install the normal includes into the gplugin-gtk subdirectory
    -install_headers(
    - GPLUGIN_GTK_HEADERS,
    - subdir : 'gplugin-1.0/gplugin-gtk'
    -)
    +gplugin_gtk_inc = include_directories('.')
    -# install the GtkBuilder files
    -install_data(
    - '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],
    )
    pkgconfig.generate(
    @@ -105,8 +105,7 @@
    ###############################################################################
    gplugin_gtk_viewer = executable('gplugin-gtk-viewer',
    'gplugin-gtk-viewer.c',
    - link_with : [gplugin_gtk],
    - dependencies : [gplugin_dep, GTK3],
    + dependencies : [gplugin_dep, gplugin_gtk_dep],
    install : true
    )
    @@ -122,4 +121,42 @@
    install_dir : join_paths(get_option('mandir'), 'man1'))
    endif
    +###############################################################################
    +# GObject Introspection
    +###############################################################################
    +if get_option('gobject-introspection')
    + gplugin_gtk_gir = gnome.generate_gir(
    + gplugin_gtk,
    + 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 : true)
    +endif
    +
    +###############################################################################
    +# Install Stuff
    +###############################################################################
    +# install the normal includes into the gplugin-gtk subdirectory
    +install_headers(
    + GPLUGIN_GTK_HEADERS,
    + subdir : 'gplugin-1.0/gplugin-gtk'
    +)
    +
    +# install the GtkBuilder files
    +install_data(
    + 'gplugin-gtk-plugin-info.ui',
    + install_dir : join_paths(get_option('datadir'), 'gplugin', 'gplugin-gtk')
    +)
    +
    +###############################################################################
    +# subdirectories
    +###############################################################################
    +if ENABLE_DOC
    + subdir('reference')
    +endif
    +
    endif # gtk3
    --- /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 @@
    +<?xml version="1.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">
    + <bookinfo>
    + <title>GPlugin Gtk+ Reference Manual</title>
    + <abstract>
    + <title>GPlugin Gtk+ &version;</title>
    + <para>
    + 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.
    + </para>
    + </abstract>
    + </bookinfo>
    +
    + <part id="object-hierarchy">
    + <title>Object Hierarchy</title>
    +
    + <xi:include href="xml/tree_index.sgml"/>
    + </part>
    +
    + <part id="API">
    + <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"/>
    + </part>
    +
    + <index id="api-index-full">
    + <title>Index</title>
    + <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
    + </index>
    + <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>
    +<!-- <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>
    + </index>
    + -->
    + <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
    +</book>
    --- /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.h',
    +]
    +ignore_hfiles += GPLUGIN_GTK_PRIVATE_HEADERS
    +
    +# Extra options to supply to gtkdoc-scan.
    +scan_args = [
    + '--deprecated-guards=GPLUGIN_GTK_DISABLE_DEPRECATED',
    + '--rebuild-types',
    + '--rebuild-sections',
    + '--ignore-headers=' + ' '.join(ignore_hfiles),
    +]
    +
    +# Extra options to supply to gtkdoc-mkdb.
    +mkdb_args = [
    + '--ignore-files=' + ' '.join(ignore_hfiles),
    +]
    +
    +gplugin_gtk_version_xml = configure_file(
    + input : 'version.xml.in',
    + output : 'version.xml',
    + configuration : version_conf)
    +
    +content_files = [
    +]
    +
    +gnome.gtkdoc(DOC_MODULE,
    + main_xml : DOC_MODULE + '-docs.xml',
    + src_dir : gplugin_gtk_inc,
    + dependencies : gplugin_gtk_dep,
    + install : true,
    + scan_args : scan_args,
    + mkdb_args : mkdb_args,
    + 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 @@
    +@GPLUGIN_VERSION@
    --- /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 @@
    +{
    + "folders":
    + [
    + {
    + "path": "."
    + }
    + ]
    +}
    --- 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>
    +/**
    + * SECTION:gplugin-core
    + * @Title: Core API
    + * @Short_description: the core api
    + *
    + * This section contains the core api of gplugin, which includes #gplugin_init
    + * and #gplugin_uninit.
    + */
    +
    /******************************************************************************
    * API
    *****************************************************************************/
    +
    +/**
    + * 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
    + * file or not.
    + */
    +
    /**
    * gplugin_init:
    *
    --- 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
    + * @Title: Enumerations
    + * @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.
    + */
    +
    /******************************************************************************
    * API
    *****************************************************************************/
    @@ -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
    + * given plugin.
    *
    * 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
    + * given plugin.
    + *
    * Return value: TRUE if @plugin was unloaded successfully, FALSE otherwise
    */
    gboolean
    --- 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
    + * @Title: Manager API
    + * @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.
    + */
    +
    /******************************************************************************
    * Enums
    *****************************************************************************/
    @@ -298,9 +307,7 @@
    for(l = los; l; l = l->next) {
    GPluginLoader *lo = GPLUGIN_LOADER(l->data);
    - if(!GPLUGIN_IS_LOADER(lo))
    - continue;
    -
    + /* check if this is not the loader we're looking for */
    if(G_OBJECT_TYPE(lo) != type)
    continue;
    @@ -593,7 +600,8 @@
    }
    static gboolean
    -gplugin_manager_load_dependencies(const GPluginPluginInfo *info,
    +gplugin_manager_load_dependencies(GPluginPlugin *plugin,
    + const GPluginPluginInfo *info,
    GError **error)
    {
    const gchar * const *dependencies = NULL;
    @@ -638,7 +646,7 @@
    * version.
    */
    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)));
    gboolean ret = FALSE;
    if(oop && over) {
    @@ -680,6 +688,8 @@
    ret = gplugin_manager_load_plugin(dplugin, error);
    + gplugin_plugin_add_dependent_plugin(dplugin, plugin);
    +
    g_object_unref(G_OBJECT(dplugin));
    if(ret) {
    @@ -734,7 +744,7 @@
    return FALSE;
    }
    - if(!gplugin_manager_load_dependencies(info, error)) {
    + if(!gplugin_manager_load_dependencies(plugin, info, error)) {
    g_object_unref(G_OBJECT(info));
    return FALSE;
    @@ -749,7 +759,7 @@
    if(error) {
    *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 @@
    if(plugins_list == NULL)
    return NULL;
    - 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.
    + */
    +
    /******************************************************************************
    * Helpers
    *****************************************************************************/
    @@ -289,6 +297,14 @@
    /******************************************************************************
    * API
    *****************************************************************************/
    +
    +/**
    + * 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.
    + */
    +
    GType
    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 @@
    #include <glib/gi18n.h>
    +/**
    + * 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
    + * language.
    + */
    +
    #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
    + * #GOptionContext.
    + */
    +
    /******************************************************************************
    * Options
    *****************************************************************************/
    --- 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 @@
    * The id of the plugin.
    *
    * While not required, the recommended convention is to use the following
    - * format: <application or library>/<name of the plugin>.
    + * format: &lt;application or library&gt;/&lt;name of the plugin&gt;.
    *
    * 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.
    */
    const gchar *
    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.
    */
    guint32
    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.
    */
    gboolean
    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
    + * always be loaded.
    + *
    + * Returns: TRUE if the plugin should be loaded on query, FALSE otherwise.
    */
    gboolean
    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.
    */
    const gchar *
    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.
    */
    const gchar *
    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
    + * plugin.
    + *
    * Returns: The #GPluginVersionCompareFunc that can compare versions of this
    * plugins.
    */
    @@ -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.
    */
    const gchar *
    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.
    */
    const gchar *
    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.
    */
    const gchar *
    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.
    */
    const gchar *
    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.
    */
    const gchar *
    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.
    */
    const gchar *
    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.
    */
    const gchar *
    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
    - * @info.
    + * Returns the authors of the plugin as specified in @info.
    + *
    + * Returns: (array zero-terminated=1) (transfer none): The authors from @info.
    */
    const gchar * const *
    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.
    */
    const gchar *
    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.
    */
    const gchar *
    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.
    */
    const gchar * const *
    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
    - * globally.
    + * Returns: TRUE if the plugin has requested to be loaded with it's symbols
    + * bound locally, FALSE if they should bind be bound globally.
    */
    gboolean
    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
    + * implementation.
    + */
    +
    #define GPLUGIN_PLUGIN_GET_PRIVATE(obj) \
    (G_TYPE_INSTANCE_GET_PRIVATE((obj), GPLUGIN_TYPE_PLUGIN, GPluginPluginPrivate))
    @@ -47,6 +57,8 @@
    GPluginPluginInfo *info;
    GPluginPluginState state;
    +
    + GList *dependents;
    } GPluginPluginPrivate;
    /******************************************************************************
    @@ -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)));
    else
    priv->loader = NULL;
    }
    @@ -103,10 +115,14 @@
    gplugin_plugin_set_info(GPluginPlugin *plugin, GPluginPluginInfo *info) {
    GPluginPluginPrivate *priv = GPLUGIN_PLUGIN_GET_PRIVATE(plugin);
    - if(priv->info)
    + if(priv->info) {
    g_object_unref(G_OBJECT(priv->info));
    + priv->info = NULL;
    + }
    - priv->info = (info) ? g_object_ref(G_OBJECT(info)) : NULL;
    + if(info) {
    + priv->info = GPLUGIN_PLUGIN_INFO(g_object_ref(G_OBJECT(info)));
    + }
    }
    gchar *
    @@ -116,6 +132,15 @@
    return priv->filename;
    }
    +void
    +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));
    +}
    +
    /******************************************************************************
    * Object Stuff
    *****************************************************************************/
    @@ -172,6 +197,7 @@
    static void
    gplugin_plugin_finalize(GObject *obj) {
    GPluginPluginPrivate *priv = GPLUGIN_PLUGIN_GET_PRIVATE(obj);
    + GList *l = NULL;
    g_free(priv->filename);
    g_object_unref(priv->loader);
    @@ -179,6 +205,10 @@
    if(priv->info)
    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
    */
    const gchar *
    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
    */
    GPluginLoader *
    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
    */
    GPluginPluginInfo *
    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
    */
    GPluginPluginState
    gplugin_plugin_get_state(const GPluginPlugin *plugin) {
    @@ -379,3 +415,22 @@
    oldstate, priv->state);
    }
    +/**
    + * 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.
    + */
    +GList *
    +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,
    +
    + /*< private >*/
    GPLUGIN_PLUGIN_STATES, /*< skip >*/
    } GPluginPluginState;
    @@ -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);
    G_END_DECLS
    --- 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);
    G_END_DECLS
    --- 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 @@
    /******************************************************************************
    * GPluginVersion API
    *****************************************************************************/
    +
    +/**
    + * 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.
    + */
    +
    +/**
    + * GPLUGIN_VERSION:
    + *
    + * 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)))
    #include <glib.h>
    --- 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 @@
    # Library
    ###############################################################################
    -GPLUGIN_LD_CURRENT = 0
    -GPLUGIN_LD_REVISION = 1
    -GPLUGIN_LD_AGE = 0
    -GPLUGIN_LD_VERSION = '@0@.@1@.@2@'.format(
    - GPLUGIN_LD_CURRENT,
    - GPLUGIN_LD_REVISION,
    - GPLUGIN_LD_AGE)
    +GPLUGIN_LIBRARY_VERSION = '0.1.0'
    GPLUGIN_HEADERS = [
    'gplugin-core.h',
    @@ -119,12 +113,16 @@
    output : 'gplugin-version.h',
    configuration : version_conf,
    install : true,
    - 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_version_h
    ]
    +gplugin_inc = include_directories('.')
    +
    # Build gplugin.h
    GPLUGIN_H_INCLUDES = ''
    @@ -133,6 +131,7 @@
    GPLUGIN_H_INCLUDES,
    header)
    endforeach
    +
    foreach header : ['gplugin-version.h', 'gplugin-enums.h'] # GPLUGIN_PUBLIC_BUILT_HEADERS
    GPLUGIN_H_INCLUDES = '@0@\n#include <gplugin/@1@>'.format(
    GPLUGIN_H_INCLUDES,
    @@ -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,
    install : true
    )
    +
    gplugin_dep = declare_dependency(
    include_directories : [toplevel_inc, include_directories('.')],
    link_with : gplugin,
    @@ -276,6 +275,8 @@
    ###############################################################################
    # subdirectories
    ###############################################################################
    -if get_option('testing')
    - subdir('tests')
    +subdir('tests')
    +
    +if ENABLE_DOC
    + subdir('reference')
    endif
    --- /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 @@
    +<?xml version="1.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">
    + <bookinfo>
    + <title>GPlugin Reference Manual</title>
    + <abstract>
    + <title>GPlugin &version;</title>
    + <para>
    + 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.
    + </para>
    + </abstract>
    + </bookinfo>
    +
    + <part id="object-hierarchy">
    + <title>Object Hierarchy</title>
    +
    + <xi:include href="xml/tree_index.sgml"/>
    + </part>
    +
    + <part id="API">
    + <title>API Reference</title>
    +
    + <chapter id="coreapi">
    + <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>
    +
    + <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"/>
    + </chapter>
    + </part>
    +
    + <index id="api-index-full">
    + <title>Index</title>
    + <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
    + </index>
    + <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>
    +<!-- <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>
    + </index>
    + -->
    + <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
    +</book>
    --- /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 @@
    +DOC_MODULE = 'gplugin'
    +
    +# Header files or dirs to ignore when scanning. Use base file/dir names
    +ignore_hfiles = [
    + 'gplugin.h',
    + 'gplugin-private.h',
    + 'gplugin-loader-tests.h',
    + 'gplugin-marshallers.h',
    + 'gplugin-native.h',
    + 'gplugin-native-private.h',
    + 'dynamic-test.h',
    +]
    +ignore_hfiles += GPLUGIN_PRIVATE_HEADERS
    +
    +# Extra options to supply to gtkdoc-scan.
    +scan_args = [
    + '--deprecated-guards=GPLUGIN_DISABLE_DEPRECATED',
    + '--rebuild-types',
    + '--rebuild-sections',
    + '--ignore-headers=' + ' '.join(ignore_hfiles),
    +]
    +
    +# Extra options to supply to gtkdoc-mkdb.
    +mkdb_args = [
    + '--ignore-files=' + ' '.join(ignore_hfiles),
    +]
    +
    +gplugin_version_xml = configure_file(
    + input : 'version.xml.in',
    + output : 'version.xml',
    + configuration : version_conf)
    +
    +content_files = [
    +]
    +
    +gnome.gtkdoc(DOC_MODULE,
    + main_xml : DOC_MODULE + '-docs.xml',
    + src_dir : gplugin_inc,
    + dependencies : gplugin_dep,
    + install : true,
    + scan_args : scan_args,
    + mkdb_args : mkdb_args,
    + 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 @@
    +@GPLUGIN_VERSION@
    --- 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 @@
    #include <glib.h>
    /******************************************************************************
    + * Helpers
    + *****************************************************************************/
    +static void
    +_test_plugin_load_and_has_dependent(GPluginPlugin *dependent,
    + const gchar *id)
    +{
    + GPluginPlugin *plugin = NULL;
    + GList *l = 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)
    + found = TRUE;
    + }
    +
    + g_assert(found);
    +
    + g_object_unref(G_OBJECT(plugin));
    +}
    +
    +/******************************************************************************
    * Tests
    *****************************************************************************/
    -/* load on query */
    static void
    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 @@
    )
    endif # lua
    -if get_option('testing')
    - subdir('tests')
    -endif
    +subdir('tests')
    --- 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 @@
    return true
    end
    +print(gplugin_query())
    --- 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 Info
    ###############################################################################
    -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')
    ###############################################################################
    # Dependencies
    @@ -35,23 +35,18 @@
    help2man = find_program('help2man')
    endif
    -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')
    -endif
    -
    ###############################################################################
    # NLS
    ###############################################################################
    GETTEXT_PACKAGE = 'gplugin'
    -add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format(GETTEXT_PACKAGE),
    +add_project_arguments('-DGETTEXT_PACKAGE="@0@"'.format(GETTEXT_PACKAGE),
    language : 'c')
    if get_option('nls')
    @@ -63,17 +58,17 @@
    ###############################################################################
    compiler = meson.get_compiler('c')
    -add_global_arguments(
    +add_project_arguments(
    '-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"',
    language : 'c'
    )
    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')
    endif
    endif
    @@ -84,13 +79,13 @@
    # check if we're using gcc
    if compiler.get_id() == 'gcc' or host_machine.platform() == 'darwin'
    - add_global_arguments(
    + add_project_arguments(
    '-DGPLUGIN_UNUSED=__attribute__((unused))',
    '-ggdb',
    language : 'c'
    )
    else
    - add_global_arguments(
    + add_project_arguments(
    '-DGPLUGIN_UNUSED=',
    language : 'c'
    )
    @@ -98,6 +93,20 @@
    toplevel_inc = include_directories('.')
    +
    +###############################################################################
    +# gtk-doc
    +###############################################################################
    +ENABLE_DOC = get_option('doc')
    +if ENABLE_DOC
    + if meson.version().version_compare('<0.41.2')
    + if force_deps
    + error('Meson 0.41.2 or newer is required to build documentation.')
    + endif
    + ENABLE_DOC = false
    + endif
    +endif
    +
    ###############################################################################
    # Subdirectories
    ###############################################################################
    --- 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 @@
    )
    option(
    - 'testing',
    - type : 'boolean', value : true,
    - description : 'Whether or not to run unit tests while compiling'
    -)
    -
    -option(
    'help2man',
    type : 'boolean', value : true,
    description : 'Whether or not to build man pages from --help output'
    )
    option(
    - 'gtk3',
    + 'doc',
    type : 'boolean', value : true,
    - description : 'Whether or not to build the gtk3 library'
    + description : 'build documentation with gtk-doc'
    +)
    +
    +option(
    + 'gtk3',
    + type : 'boolean', value : true,
    + description : 'Whether or not to build the gtk3 library'
    )
    option(
    --- /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 @@
    +build
    --- 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 @@
    Section: libs
    Priority: optional
    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
    Package: libgplugin0
    Architecture: any
    @@ -24,6 +24,17 @@
    .
    This package contains the main library.
    +Package: libgplugin0-bin
    +Architecture: any
    +Section: utils
    +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.
    +
    Package: libgplugin-dev
    Architecture: any
    Section: libdevel
    @@ -81,7 +92,7 @@
    Package: gir1.2-gplugin-0.0
    Architecture: any
    -Depends: ${misc:Depends}, libgplugin0
    +Depends: ${gir:Depends}, ${misc:Depends}, libgplugin0
    Section: introspection
    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-Name: gplugin
    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/bin/dh-exec
    -usr/lib/${DEB_HOST_MULTIARCH}/girepository-1.0/
    -usr/share/gir-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/bin/dh-exec
    -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/bin/dh-exec
    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/bin/dh-exec
    -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 @@
    -#!/bin/sh
    -
    -set -e
    -
    -if [ "$1" = "configure" ]; then
    - ldconfig
    -fi
    -
    -#DEBHELPER#
    -
    -exit 0
    --- 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 @@
    -#!/bin/sh
    -
    -set -e
    -
    -if [ "$1" = "remove" ] ; then
    - ldconfig
    -fi
    -
    -#DEBHELPER#
    -
    -exit 0
    --- /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/bin/dh-exec
    -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/bin/dh-exec
    -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/bin/dh-exec
    -usr/lib/${DEB_HOST_MULTIARCH}/libgplugin.so.*
    -usr/bin/gplugin-query
    -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 @@
    -#/bin/sh
    -
    -set -e
    -
    -#DEBHELPER#
    -
    -exit 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 @@
    #!/usr/bin/make -f
    +export DH_VERBOSE = 1
    +export DEB_BUILD_MAINT_OPTIONS = hardening=+all
    +
    +BUILD_DIR := debian/build
    +
    %:
    - dh $@
    + dh $@ --with gir
    +
    +override_dh_auto_clean:
    + rm -rf $(BUILD_DIR)
    +
    +override_dh_auto_configure:
    + meson --prefix /usr --warnlevel 3 $(BUILD_DIR)
    +override_dh_auto_build:
    + ninja -v -C $(BUILD_DIR)
    +
    +override_dh_auto_test:
    + 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 @@
    pushd build
    CFLAGS="%{optflags}" meson \
    - -Wno-dev \
    --prefix=%{_prefix} \
    -Dlua=true \
    -Dpython=true \
    @@ -155,7 +154,7 @@
    %install
    pushd build
    -ninja install DESTDIR=%{buildroot}
    +DESTDIR=%{buildroot} ninja install
    # Unneeded files
    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);
    if(len == (size_t)-1) {
    g_warning("Could not convert program name to wchar_t string.");
    +
    + g_free(argv[0]);
    +
    return FALSE;
    }
    /* 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
    PySys_SetArgv(1, argv);
    --- 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 @@
    )
    endif # python
    -if get_option('testing')
    - subdir('tests')
    -endif
    +subdir('tests')
    --- 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 @@
    )
    endif # tcc
    -if get_option('testing')
    - subdir('tests')
    -endif
    +subdir('tests')