[Xfce4-commits] [apps/xfdashboard] 01/01: Add annotation for API documentation of XfdashboardPluginsManager
noreply at xfce.org
noreply at xfce.org
Mon Jun 27 12:28:07 CEST 2016
This is an automated email from the git hooks/post-receive script.
nomad pushed a commit to branch master
in repository apps/xfdashboard.
commit e55140615fc4de5472bf6697eccd116b3a8a3978
Author: Stephan Haller <nomad at froevel.de>
Date: Mon Jun 27 12:27:49 2016 +0200
Add annotation for API documentation of XfdashboardPluginsManager
---
libxfdashboard/plugins-manager.c | 40 ++++++++++++++++++++++++++++++++++++++--
libxfdashboard/plugins-manager.h | 12 ++++++++++++
2 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/libxfdashboard/plugins-manager.c b/libxfdashboard/plugins-manager.c
index d2b7403..2ab759e 100644
--- a/libxfdashboard/plugins-manager.c
+++ b/libxfdashboard/plugins-manager.c
@@ -21,6 +21,21 @@
*
*/
+/**
+ * SECTION:plugins-manager
+ * @short_description: The plugin manager class
+ * @include: xfdashboard/plugins-manager.h
+ *
+ * #XfdashboardPluginsManager is a single instance object. It is managing all
+ * plugins by loading and enabling or disabling them.
+ *
+ * The plugin manager will look up each plugin at the following paths and order:
+ *
+ * - Path specified in evironment variable XFDASHBOARD_PLUGINS_PATH
+ * - $XDG_DATA_HOME/xfdashboard/plugins
+ * - (install prefix)/lib/xfdashboard/plugins
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -567,7 +582,14 @@ static void xfdashboard_plugins_manager_init(XfdashboardPluginsManager *self)
/* IMPLEMENTATION: Public API */
-/* Get single instance of manager */
+/**
+ * xfdashboard_plugins_manager_get_default:
+ *
+ * Retrieves the singleton instance of #XfdashboardPluginsManager.
+ *
+ * Return value: (transfer full): The instance of #XfdashboardPluginsManager.
+ * Use g_object_unref() when done.
+ */
XfdashboardPluginsManager* xfdashboard_plugins_manager_get_default(void)
{
if(G_UNLIKELY(_xfdashboard_plugins_manager==NULL))
@@ -579,7 +601,21 @@ XfdashboardPluginsManager* xfdashboard_plugins_manager_get_default(void)
return(_xfdashboard_plugins_manager);
}
-/* Initialize plugin manager */
+/**
+ * xfdashboard_plugins_manager_setup:
+ * @self: A #XfdashboardPluginsManager
+ *
+ * Initializes the plugin manager at @self by loading all enabled plugins. This
+ * function can only be called once and is initialized by the application at
+ * start-up. So you usually do not have to call this function or it does anything
+ * as the plugin manager is already setup.
+ *
+ * The plugin manager will continue initializing successfully even if a plugin
+ * could not be loaded. In this case just a warning is printed.
+ *
+ * Return value: Returns %TRUE if plugin manager was initialized successfully
+ * or was already initialized. Otherwise %FALSE will be returned.
+ */
gboolean xfdashboard_plugins_manager_setup(XfdashboardPluginsManager *self)
{
XfdashboardPluginsManagerPrivate *priv;
diff --git a/libxfdashboard/plugins-manager.h b/libxfdashboard/plugins-manager.h
index 4fb2ee3..560f831 100644
--- a/libxfdashboard/plugins-manager.h
+++ b/libxfdashboard/plugins-manager.h
@@ -43,8 +43,15 @@ typedef struct _XfdashboardPluginsManager XfdashboardPluginsManager;
typedef struct _XfdashboardPluginsManagerClass XfdashboardPluginsManagerClass;
typedef struct _XfdashboardPluginsManagerPrivate XfdashboardPluginsManagerPrivate;
+/**
+ * XfdashboardPluginsManager:
+ *
+ * The #XfdashboardPluginsManager structure contains only private data and
+ * should be accessed using the provided API
+ */
struct _XfdashboardPluginsManager
{
+ /*< private >*/
/* Parent instance */
GObject parent_instance;
@@ -52,6 +59,11 @@ struct _XfdashboardPluginsManager
XfdashboardPluginsManagerPrivate *priv;
};
+/**
+ * XfdashboardPluginsManagerClass:
+ *
+ * The #XfdashboardPluginsManagerClass structure contains only private data
+ */
struct _XfdashboardPluginsManagerClass
{
/*< private >*/
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list