gplugin/gplugin

07ba62616ebf
merge the feature/gtk-doc branch with ALL of the changes
--- a/gplugin-gtk/gplugin-gtk-plugin-info.c Mon May 07 21:00:13 2018 -0500
+++ b/gplugin-gtk/gplugin-gtk-plugin-info.c Mon May 07 21:06:33 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;
--- a/gplugin-gtk/gplugin-gtk-plugin-info.h Mon May 07 21:00:13 2018 -0500
+++ b/gplugin-gtk/gplugin-gtk-plugin-info.h Mon May 07 21:06:33 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 Mon May 07 21:00:13 2018 -0500
+++ b/gplugin-gtk/gplugin-gtk-store.c Mon May 07 21:06:33 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 Mon May 07 21:00:13 2018 -0500
+++ b/gplugin-gtk/gplugin-gtk-view.c Mon May 07 21:06:33 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/reference/gplugin-gtk-docs.xml Mon May 07 21:00:13 2018 -0500
+++ b/gplugin-gtk/reference/gplugin-gtk-docs.xml Mon May 07 21:06:33 2018 -0500
@@ -28,6 +28,9 @@
<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">
--- a/gplugin-gtk/reference/meson.build Mon May 07 21:00:13 2018 -0500
+++ b/gplugin-gtk/reference/meson.build Mon May 07 21:06:33 2018 -0500
@@ -2,6 +2,7 @@
# Header files or dirs to ignore when scanning. Use base file/dir names
ignore_hfiles = [
+ 'gplugin-gtk.h',
]
ignore_hfiles += GPLUGIN_GTK_PRIVATE_HEADERS
--- a/gplugin/reference/meson.build Mon May 07 21:00:13 2018 -0500
+++ b/gplugin/reference/meson.build Mon May 07 21:06:33 2018 -0500
@@ -2,9 +2,11 @@
# 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',
]
--- a/lua/tests/lua-plugins/basic.lua Mon May 07 21:00:13 2018 -0500
+++ b/lua/tests/lua-plugins/basic.lua Mon May 07 21:06:33 2018 -0500
@@ -41,3 +41,4 @@
return true
end
+print(gplugin_query())