[buoh] Initial code documentation
- From: Jan Tojnar <jtojnar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [buoh] Initial code documentation
- Date: Fri, 1 Oct 2021 03:57:32 +0000 (UTC)
commit 3472926ab888a6cf9135eee3da7372f1777504f0
Author: Jan Tojnar <jtojnar gmail com>
Date: Fri Oct 1 05:53:09 2021 +0200
Initial code documentation
src/buoh-comic-list.c | 9 +++++++++
src/buoh-comic-manager-date.c | 6 ++++++
src/buoh-comic-manager.c | 7 +++++++
src/buoh-comic.c | 10 ++++++++++
src/buoh-comic.h | 6 ++++++
src/buoh-view-comic.c | 13 +++++++++++++
src/buoh-view.c | 6 ++++++
7 files changed, 57 insertions(+)
---
diff --git a/src/buoh-comic-list.c b/src/buoh-comic-list.c
index 36c505f..0142cae 100644
--- a/src/buoh-comic-list.c
+++ b/src/buoh-comic-list.c
@@ -25,6 +25,15 @@
#include "buoh-application.h"
#include "buoh-comic-list.h"
+/**
+ * BuohComicList:
+ * @tree_view: The #GtkTreeView displaying the list subscribed comic series.
+ * @model: The model of @tree_view.
+ * @comic_manager: Manager representing the currently selected series in the @tree_view.
+ *
+ * A widget displaying the list of subscribed comic series for switching between them.
+ */
+
struct _BuohComicList {
GtkBin parent;
diff --git a/src/buoh-comic-manager-date.c b/src/buoh-comic-manager-date.c
index c9d1bb0..665a62e 100644
--- a/src/buoh-comic-manager-date.c
+++ b/src/buoh-comic-manager-date.c
@@ -48,6 +48,12 @@ typedef struct {
guint offset;
} BuohComicManagerDatePrivate;
+/**
+ * BuohComicManagerDate:
+ *
+ * A class representing a comic series where new strips are released periodically on a certain day of a week.
+ */
+
struct _BuohComicManagerDate {
BuohComicManager parent;
};
diff --git a/src/buoh-comic-manager.c b/src/buoh-comic-manager.c
index c5b43f1..2bfc1a2 100644
--- a/src/buoh-comic-manager.c
+++ b/src/buoh-comic-manager.c
@@ -56,6 +56,13 @@ static void buoh_comic_manager_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec);
+/**
+ * BuohComicManager:
+ *
+ * An abstract class representing a comic series.
+ * Currently, #BuohComicManagerDate is the only implementation.
+ */
+
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (BuohComicManager, buoh_comic_manager, G_TYPE_OBJECT)
static void
diff --git a/src/buoh-comic.c b/src/buoh-comic.c
index e730e4c..2941706 100644
--- a/src/buoh-comic.c
+++ b/src/buoh-comic.c
@@ -38,6 +38,16 @@ enum {
PROP_DATE
};
+/**
+ * BuohComic:
+ * @id: Description of the comic strip (displayed in status bar).
+ * @uri: URI of the strip’s image file.
+ * @date: Publish date of the strip.
+ * @cache: Cache manager that actually stores the pixbuf and image (raw data) objects (keyed by URI).
+ *
+ * A class representing a single comic strip.
+ */
+
struct _BuohComic {
GObject parent;
diff --git a/src/buoh-comic.h b/src/buoh-comic.h
index a4ac20e..3c73b3f 100644
--- a/src/buoh-comic.h
+++ b/src/buoh-comic.h
@@ -28,6 +28,12 @@ G_BEGIN_DECLS
#define BUOH_TYPE_COMIC buoh_comic_get_type ()
G_DECLARE_FINAL_TYPE (BuohComic, buoh_comic, BUOH, COMIC, GObject)
+/**
+ * BuohComicImage:
+ *
+ * Raw data for a comic strip (with size).
+ */
+
typedef struct {
guchar *data;
gsize size;
diff --git a/src/buoh-view-comic.c b/src/buoh-view-comic.c
index 4afec89..d0c108c 100644
--- a/src/buoh-view-comic.c
+++ b/src/buoh-view-comic.c
@@ -33,6 +33,19 @@ enum {
PROP_SCALE
};
+/**
+ * BuohViewComic:
+ * @view: The parent widget showing this one.
+ * @image: #GtkImage widget that will display the comic strip.
+ * @comic_data: Raw image data for the currently displayed comic strip.
+ * @comic: An object representing the currently displayed comic strip.
+ *
+ * @comic_loader: A class that fetches image data for given comic.
+ * @pixbuf_loader: #GdkPixbufLoader responsible for parsing the raw data and returning #GdkPixbuf.
+ *
+ * A widget showing a comic strip.
+ */
+
struct _BuohViewComic {
GtkViewport parent;
diff --git a/src/buoh-view.c b/src/buoh-view.c
index a96b466..a612625 100644
--- a/src/buoh-view.c
+++ b/src/buoh-view.c
@@ -37,6 +37,12 @@ enum {
N_SIGNALS
};
+/**
+ * BuohView:
+ *
+ * A widget controlling the main application view. Will either display a comic strip or a message page.
+ */
+
struct _BuohView {
GtkStack parent;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]