[devhelp] Settings lib: make the class public



commit c8aa5d43669fc53462df6af40457d0c8f10b8300
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Mon Apr 2 08:33:36 2018 +0200

    Settings lib: make the class public
    
    This is the last step to be able to use only "really public" libdevhelp
    APIs in the app (so in the app, to #include only the main libdevhelp
    header).

 devhelp/devhelp.h                   |    1 +
 devhelp/dh-settings.c               |   23 +++++++++++++++++++++++
 devhelp/meson.build                 |    3 ++-
 docs/reference/devhelp-docs.xml     |    1 +
 docs/reference/devhelp-sections.txt |   17 +++++++++++++++++
 docs/reference/meson.build          |    1 -
 6 files changed, 44 insertions(+), 2 deletions(-)
---
diff --git a/devhelp/devhelp.h b/devhelp/devhelp.h
index d889a46..dd6027b 100644
--- a/devhelp/devhelp.h
+++ b/devhelp/devhelp.h
@@ -33,6 +33,7 @@
 #include <devhelp/dh-init.h>
 #include <devhelp/dh-keyword-model.h>
 #include <devhelp/dh-link.h>
+#include <devhelp/dh-settings.h>
 #include <devhelp/dh-sidebar.h>
 
 #endif /* DEVHELP_H */
diff --git a/devhelp/dh-settings.c b/devhelp/dh-settings.c
index 09dfb7c..fbe75b1 100644
--- a/devhelp/dh-settings.c
+++ b/devhelp/dh-settings.c
@@ -21,6 +21,16 @@
 
 #include "dh-settings.h"
 
+/**
+ * SECTION:dh-settings
+ * @Title: DhSettings
+ * @Short_description: Access to the libdevhelp #GSettings objects
+ *
+ * #DhSettings permits to have access to the #GSettings objects that are part of
+ * the libdevhelp. To have the documentation about the available keys and their
+ * types, read the `*.gschema.xml` file.
+ */
+
 /* libdevhelp GSettings schema IDs */
 #define SETTINGS_SCHEMA_ID_CONTENTS             "org.gnome.libdevhelp-3.contents"
 
@@ -89,6 +99,12 @@ _dh_settings_new (const gchar *contents_path)
         return object;
 }
 
+/**
+ * dh_settings_get_default:
+ *
+ * Returns: (transfer none): the default #DhSettings object.
+ * Since: 3.30
+ */
 DhSettings *
 dh_settings_get_default (void)
 {
@@ -112,6 +128,13 @@ _dh_settings_unref_default (void)
          */
 }
 
+/**
+ * dh_settings_peek_contents_settings:
+ * @self: a #DhSettings.
+ *
+ * Returns: (transfer none): the #GSettings for the "contents" schema.
+ * Since: 3.30
+ */
 GSettings *
 dh_settings_peek_contents_settings (DhSettings *self)
 {
diff --git a/devhelp/meson.build b/devhelp/meson.build
index 1f0751c..d9945ca 100644
--- a/devhelp/meson.build
+++ b/devhelp/meson.build
@@ -8,6 +8,7 @@ libdevhelp_public_headers = [
         'dh-init.h',
         'dh-keyword-model.h',
         'dh-link.h',
+        'dh-settings.h',
         'dh-sidebar.h'
 ]
 
@@ -20,6 +21,7 @@ libdevhelp_public_c_files = [
         'dh-init.c',
         'dh-keyword-model.c',
         'dh-link.c',
+        'dh-settings.c',
         'dh-sidebar.c'
 ]
 
@@ -27,7 +29,6 @@ libdevhelp_private_c_files = [
         'dh-error.c',
         'dh-parser.c',
         'dh-search-context.c',
-        'dh-settings.c',
         'dh-util-lib.c'
 ]
 
diff --git a/docs/reference/devhelp-docs.xml b/docs/reference/devhelp-docs.xml
index b4acc0e..f5b09f7 100644
--- a/docs/reference/devhelp-docs.xml
+++ b/docs/reference/devhelp-docs.xml
@@ -20,6 +20,7 @@
     <chapter id="general">
       <title>General</title>
       <xi:include href="xml/init.xml"/>
+      <xi:include href="xml/dh-settings.xml"/>
     </chapter>
 
     <chapter id="data">
diff --git a/docs/reference/devhelp-sections.txt b/docs/reference/devhelp-sections.txt
index 047580e..dcd6133 100644
--- a/docs/reference/devhelp-sections.txt
+++ b/docs/reference/devhelp-sections.txt
@@ -152,6 +152,23 @@ dh_link_type_get_type
 </SECTION>
 
 <SECTION>
+<FILE>dh-settings</FILE>
+DhSettings
+dh_settings_get_default
+dh_settings_peek_contents_settings
+<SUBSECTION Standard>
+DH_IS_SETTINGS
+DH_IS_SETTINGS_CLASS
+DH_SETTINGS
+DH_SETTINGS_CLASS
+DH_SETTINGS_GET_CLASS
+DH_TYPE_SETTINGS
+DhSettingsClass
+DhSettingsPrivate
+dh_settings_get_type
+</SECTION>
+
+<SECTION>
 <FILE>dh-sidebar</FILE>
 DhSidebar
 dh_sidebar_new
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index 4f9c692..ac9c213 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -15,7 +15,6 @@ GNOME.gtkdoc(
                 'dh-error.h',
                 'dh-parser.h',
                 'dh-search-context.h',
-                'dh-settings.h',
                 'dh-util-lib.h'
         ],
         install : true


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