[gnome-panel] libgnome-panel: move documentation to source file



commit 2dd69bd8aac4f4eee14982460b8d235273a95fe0
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sat Dec 30 20:16:18 2017 +0200

    libgnome-panel: move documentation to source file

 libgnome-panel/gp-module.c |  117 ++++++++++++++++++++++++++++++++++++++++++++
 libgnome-panel/gp-module.h |  117 --------------------------------------------
 2 files changed, 117 insertions(+), 117 deletions(-)
---
diff --git a/libgnome-panel/gp-module.c b/libgnome-panel/gp-module.c
index e95c902..6f5ed7d 100644
--- a/libgnome-panel/gp-module.c
+++ b/libgnome-panel/gp-module.c
@@ -15,6 +15,123 @@
  * along with this library; if not, see <https://www.gnu.org/licenses/>.
  */
 
+/**
+ * SECTION: gp-module
+ * @title: Module
+ * @short_description: a module with one or more applets
+ * @include: libngome-panel/gp-module.h
+ *
+ * A module with one or more applets.
+ *
+ * |[<!-- language="C" -->
+ * static GpAppletInfo *
+ * example_get_applet_info (const gchar *applet)
+ * {
+ *   GpAppletInfo *info;
+ *
+ *   if (g_strcmp0 (applet, "example1") == 0)
+ *     {
+ *       info = gp_applet_info_new (_("Example 1 name"),
+ *                                  _("Example 1 description"),
+ *                                  "example1-icon");
+ *     }
+ *   else if (g_strcmp0 (applet, "example2") == 0)
+ *     {
+ *       info = gp_applet_info_new (_("Example 2 name"),
+ *                                  _("Example 2 description"),
+ *                                  "example2-icon");
+ *
+ *       gp_applet_info_set_backends (info, "x11");
+ *     }
+ *   else
+ *     {
+ *       info = NULL;
+ *     }
+ *
+ *   return info;
+ * }
+ *
+ * static GType
+ * example_get_applet_type (const gchar *applet)
+ * {
+ *   if (g_strcmp0 (applet, "example1") == 0)
+ *     {
+ *       return EXAMPLE_TYPE_EXAMPLE1;
+ *     }
+ *   else if (g_strcmp0 (applet, "example2") == 0)
+ *     {
+ *       return EXAMPLE_TYPE_EXAMPLE2;
+ *     }
+ *
+ *   return G_TYPE_NONE;
+ * }
+ *
+ * static const gchar *
+ * example_get_applet_from_iid (const gchar *iid)
+ * {
+ *   if (g_strcmp0 (iid, "ExampleAppletFactory::Example1Applet") == 0)
+ *     {
+ *       return "example1";
+ *     }
+ *   else if (g_strcmp0 (iid, "ExampleAppletFactory::Example2Applet") == 0)
+ *     {
+ *       return "example2";
+ *     }
+ *
+ *   return NULL;
+ * }
+ *
+ * static gboolean
+ * example_setup_about (GtkAboutDialog *dialog,
+ *                      const gchar    *applet)
+ * {
+ *   if (g_strcmp0 (applet, "example1") == 0)
+ *     {
+ *       gtk_about_dialog_set_comments (about, "...");
+ *       gtk_about_dialog_set_copyright (about, "...");
+ *       // ...
+ *
+ *       return TRUE;
+ *     }
+ *
+ *   return FALSE;
+ * }
+ *
+ * guint32
+ * gp_module_get_abi_version (void)
+ * {
+ *   return GP_MODULE_ABI_VERSION;
+ * }
+ *
+ * GpModuleInfo *
+ * gp_module_get_module_info (void)
+ * {
+ *   GpModuleInfo *info;
+ *
+ *   bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+ *   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ *
+ *   info = gp_module_info_new ("org.example.example",
+ *                              PACKAGE_VERSION, GETTEXT_PACKAGE);
+ *
+ *   gp_module_info_set_applets (info, "example1", "example2", NULL);
+ *
+ *   return info;
+ * }
+ *
+ * void
+ * gp_module_get_applet_vtable (GpAppletVTable *vtable)
+ * {
+ *   *vtable = (GpAppletVTable) {
+ *     example_get_applet_info,
+ *     example_get_applet_type,
+ *     example_get_applet_from_iid, // or NULL if not needed
+ *     example_setup_about // or NULL if not needed
+ *   };
+ * }
+ * ]|
+ */
+
 #include "config.h"
 
 #include <gtk/gtk.h>
diff --git a/libgnome-panel/gp-module.h b/libgnome-panel/gp-module.h
index 50a7b62..b95fe28 100644
--- a/libgnome-panel/gp-module.h
+++ b/libgnome-panel/gp-module.h
@@ -25,123 +25,6 @@
 G_BEGIN_DECLS
 
 /**
- * SECTION: gp-module
- * @title: Module
- * @short_description: a module with one or more applets
- * @include: libngome-panel/gp-module.h
- *
- * A module with one or more applets.
- *
- * |[<!-- language="C" -->
- * static GpAppletInfo *
- * example_get_applet_info (const gchar *applet)
- * {
- *   GpAppletInfo *info;
- *
- *   if (g_strcmp0 (applet, "example1") == 0)
- *     {
- *       info = gp_applet_info_new (_("Example 1 name"),
- *                                  _("Example 1 description"),
- *                                  "example1-icon");
- *     }
- *   else if (g_strcmp0 (applet, "example2") == 0)
- *     {
- *       info = gp_applet_info_new (_("Example 2 name"),
- *                                  _("Example 2 description"),
- *                                  "example2-icon");
- *
- *       gp_applet_info_set_backends (info, "x11");
- *     }
- *   else
- *     {
- *       info = NULL;
- *     }
- *
- *   return info;
- * }
- *
- * static GType
- * example_get_applet_type (const gchar *applet)
- * {
- *   if (g_strcmp0 (applet, "example1") == 0)
- *     {
- *       return EXAMPLE_TYPE_EXAMPLE1;
- *     }
- *   else if (g_strcmp0 (applet, "example2") == 0)
- *     {
- *       return EXAMPLE_TYPE_EXAMPLE2;
- *     }
- *
- *   return G_TYPE_NONE;
- * }
- *
- * static const gchar *
- * example_get_applet_from_iid (const gchar *iid)
- * {
- *   if (g_strcmp0 (iid, "ExampleAppletFactory::Example1Applet") == 0)
- *     {
- *       return "example1";
- *     }
- *   else if (g_strcmp0 (iid, "ExampleAppletFactory::Example2Applet") == 0)
- *     {
- *       return "example2";
- *     }
- *
- *   return NULL;
- * }
- *
- * static gboolean
- * example_setup_about (GtkAboutDialog *dialog,
- *                      const gchar    *applet)
- * {
- *   if (g_strcmp0 (applet, "example1") == 0)
- *     {
- *       gtk_about_dialog_set_comments (about, "...");
- *       gtk_about_dialog_set_copyright (about, "...");
- *       // ...
- *
- *       return TRUE;
- *     }
- *
- *   return FALSE;
- * }
- *
- * guint32
- * gp_module_get_abi_version (void)
- * {
- *   return GP_MODULE_ABI_VERSION;
- * }
- *
- * GpModuleInfo *
- * gp_module_get_module_info (void)
- * {
- *   GpModuleInfo *info;
- *
- *   bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
- *   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- *
- *   info = gp_module_info_new ("org.example.example",
- *                              PACKAGE_VERSION, GETTEXT_PACKAGE);
- *
- *   gp_module_info_set_applets (info, "example1", "example2", NULL);
- *
- *   return info;
- * }
- *
- * void
- * gp_module_get_applet_vtable (GpAppletVTable *vtable)
- * {
- *   *vtable = (GpAppletVTable) {
- *     example_get_applet_info,
- *     example_get_applet_type,
- *     example_get_applet_from_iid, // or NULL if not needed
- *     example_setup_about // or NULL if not needed
- *   };
- * }
- * ]|
- */
-
-/**
  * GP_MODULE_ABI_VERSION:
  *
  * The version of the module system's ABI.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]