--- a/gplugin-gtk/meson.build Sat May 05 17:29:31 2018 -0500
+++ b/gplugin-gtk/meson.build Sat May 05 19:26:49 2018 -0500
@@ -25,10 +25,10 @@
GPLUGIN_GTK_PRIVATE_HEADERS = [
-GPLUGIN_GTK_BUILT_SOURCES = [
+GPLUGIN_GTK_PUBLIC_BUILT_SOURCES = [ -GPLUGIN_GTK_BUILT_HEADERS = [
+GPLUGIN_GTK_PUBLIC_BUILT_HEADERS = [ ###############################################################################
@@ -59,8 +59,8 @@
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],
@@ -68,16 +68,13 @@
-# 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], @@ -98,8 +95,7 @@
###############################################################################
gplugin_gtk_viewer = executable('gplugin-gtk-viewer',
- link_with : [gplugin_gtk],
- dependencies : [gplugin_dep, GTK3],
+ dependencies : [gplugin_dep, gplugin_gtk_dep], @@ -115,4 +111,26 @@
install_dir : join_paths(get_option('mandir'), 'man1'))
+############################################################################### +############################################################################### +# 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') +############################################################################### +############################################################################### --- a/gplugin/gplugin-loader.c Sat May 05 17:29:31 2018 -0500
+++ b/gplugin/gplugin-loader.c Sat May 05 19:26:49 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-native-loader.c Sat May 05 17:29:31 2018 -0500
+++ b/gplugin/gplugin-native-loader.c Sat May 05 19:26:49 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-plugin-info.c Sat May 05 17:29:31 2018 -0500
+++ b/gplugin/gplugin-plugin-info.c Sat May 05 19:26:49 2018 -0500
@@ -21,6 +21,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))
@@ -468,7 +476,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".
@@ -782,7 +790,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) {
@@ -799,7 +809,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) {
@@ -816,7 +829,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) {
@@ -833,7 +850,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) {
@@ -850,7 +872,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) {
@@ -867,7 +891,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) {
@@ -884,6 +910,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
@@ -902,7 +931,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) {
@@ -919,7 +950,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) {
@@ -936,7 +969,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) {
@@ -953,7 +988,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) {
@@ -970,7 +1007,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) {
@@ -987,7 +1026,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) {
@@ -1004,7 +1045,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) {
@@ -1021,8 +1064,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) {
@@ -1039,7 +1083,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) {
@@ -1056,7 +1102,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) {
@@ -1073,8 +1121,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) {
@@ -1093,9 +1143,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 Sat May 05 17:29:31 2018 -0500
+++ b/gplugin/gplugin-plugin.c Sat May 05 19:26:49 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))
@@ -309,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) {
@@ -326,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) {
@@ -343,7 +357,9 @@
* 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) {
@@ -362,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) {
@@ -405,8 +421,8 @@
* Returns a list of plugins that depend on @plugin.
- * Return value: (element-type GPlugin.Plugin) (transfer none): A #GList of
- * each plugin that depends on this 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) {
--- a/gplugin/gplugin-version.c Sat May 05 17:29:31 2018 -0500
+++ b/gplugin/gplugin-version.c Sat May 05 19:26:49 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/meson.build Sat May 05 17:29:31 2018 -0500
+++ b/gplugin/meson.build Sat May 05 19:26:49 2018 -0500
@@ -113,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('.') @@ -127,6 +131,7 @@
foreach header : ['gplugin-version.h', 'gplugin-enums.h'] # GPLUGIN_PUBLIC_BUILT_HEADERS
GPLUGIN_H_INCLUDES = '@0@\n#include <gplugin/@1@>'.format(
@@ -180,6 +185,7 @@
version : GPLUGIN_LIBRARY_VERSION,
gplugin_dep = declare_dependency(
include_directories : [toplevel_inc, include_directories('.')],
@@ -270,3 +276,7 @@
###############################################################################