[devhelp] Write class descriptions for some classes in the Devhelp app



commit e0c8acc1dbe5555b2afc77ffde680c2c96a1614b
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun May 27 11:46:22 2018 +0200

    Write class descriptions for some classes in the Devhelp app
    
    This will be useful when those classes will be moved to the libdevhelp
    (and is anyway already useful, it gives a good overview and the intents
    of those classes).

 src/dh-notebook.c   |  4 ++++
 src/dh-search-bar.c | 11 +++++++++++
 src/dh-tab-label.c  |  2 ++
 src/dh-tab.c        |  7 +++++++
 src/dh-web-view.c   |  4 ++++
 5 files changed, 28 insertions(+)
---
diff --git a/src/dh-notebook.c b/src/dh-notebook.c
index afd7d90d..4fbeed10 100644
--- a/src/dh-notebook.c
+++ b/src/dh-notebook.c
@@ -21,6 +21,10 @@
 #include "dh-notebook.h"
 #include "dh-tab-label.h"
 
+/* #DhNotebook is a subclass of #GtkNotebook. The content of the tabs are
+ * #DhTab's, and the tab labels are #DhTabLabel's.
+ */
+
 G_DEFINE_TYPE (DhNotebook, dh_notebook, GTK_TYPE_NOTEBOOK)
 
 static void
diff --git a/src/dh-search-bar.c b/src/dh-search-bar.c
index 2d9fa884..581699fc 100644
--- a/src/dh-search-bar.c
+++ b/src/dh-search-bar.c
@@ -20,6 +20,17 @@
 
 #include "dh-search-bar.h"
 
+/* #DhSearchBar is a subclass of #GtkSearchBar, meant to be shown above a
+ * #DhNotebook. There is only one #DhSearchBar for the whole #DhNotebook, it
+ * applies the same search text to all the #DhWebView's (lazily, when the tab is
+ * shown).
+ *
+ * (A different way to implement the search for the #DhWebView's would be to
+ * have a different #GtkSearchEntry for each #DhWebView, with the
+ * #GtkSearchEntry shown inside the #DhTab; in that case #DhSearchBar won't help
+ * you).
+ */
+
 struct _DhSearchBarPrivate {
         DhNotebook *notebook;
         GtkSearchEntry *search_entry;
diff --git a/src/dh-tab-label.c b/src/dh-tab-label.c
index b005c7db..11791317 100644
--- a/src/dh-tab-label.c
+++ b/src/dh-tab-label.c
@@ -21,6 +21,8 @@
 #include "dh-tab-label.h"
 #include "dh-web-view.h"
 
+/* The #DhTabLabel widget is used for the tab labels in #DhNotebook. */
+
 struct _DhTabLabelPrivate {
         /* Weak ref */
         DhTab *tab;
diff --git a/src/dh-tab.c b/src/dh-tab.c
index 17c2296b..4516b961 100644
--- a/src/dh-tab.c
+++ b/src/dh-tab.c
@@ -20,6 +20,13 @@
 
 #include "dh-tab.h"
 
+/* #DhTab is meant to be the content of one tab in a #DhNotebook. Currently it
+ * contains only one element: a #DhWebView.
+ *
+ * So #DhTab is not really useful right now, but it is planned to move it to the
+ * libdevhelp, where it makes sense to have more flexibility.
+ */
+
 struct _DhTabPrivate {
         DhWebView *web_view;
 };
diff --git a/src/dh-web-view.c b/src/dh-web-view.c
index 1ae633b6..c74dd320 100644
--- a/src/dh-web-view.c
+++ b/src/dh-web-view.c
@@ -23,6 +23,10 @@
 #include <glib/gi18n.h>
 #include <devhelp/devhelp.h>
 
+/* #DhWebView is a subclass of #WebKitWebView, to have a higher-level API for
+ * some features.
+ */
+
 struct _DhWebViewPrivate {
         gchar *search_text;
         gdouble total_scroll_delta_y;


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