[nautilus/wip/jtojnar/gi-docgen] extension/Column: Port docs to gi-docgen
- From: Jan Tojnar <jtojnar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/jtojnar/gi-docgen] extension/Column: Port docs to gi-docgen
- Date: Thu, 11 Aug 2022 15:03:42 +0000 (UTC)
commit def5fd39e4727686aa064e025a9abbedbc845e4a
Author: Jan Tojnar <jtojnar gmail com>
Date: Thu Aug 11 16:50:37 2022 +0200
extension/Column: Port docs to gi-docgen
libnautilus-extension/nautilus-column.c | 34 +++++++++++++++++++++++++++++++++
libnautilus-extension/nautilus-column.h | 26 ++++++++++---------------
2 files changed, 44 insertions(+), 16 deletions(-)
---
diff --git a/libnautilus-extension/nautilus-column.c b/libnautilus-extension/nautilus-column.c
index c5e9994c5..99993d72c 100644
--- a/libnautilus-extension/nautilus-column.c
+++ b/libnautilus-extension/nautilus-column.c
@@ -228,6 +228,11 @@ nautilus_column_class_init (NautilusColumnClass *class)
G_OBJECT_CLASS (class)->get_property = nautilus_column_get_property;
G_OBJECT_CLASS (class)->set_property = nautilus_column_set_property;
+ /**
+ * NautilusColumn:name:
+ *
+ * The name of the column.
+ */
g_object_class_install_property (G_OBJECT_CLASS (class),
PROP_NAME,
g_param_spec_string ("name",
@@ -235,6 +240,12 @@ nautilus_column_class_init (NautilusColumnClass *class)
"Name of the column",
NULL,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE |
G_PARAM_READABLE));
+
+ /**
+ * NautilusColumn:attribute:
+ *
+ * The attribute name to display.
+ */
g_object_class_install_property (G_OBJECT_CLASS (class),
PROP_ATTRIBUTE,
g_param_spec_string ("attribute",
@@ -242,6 +253,12 @@ nautilus_column_class_init (NautilusColumnClass *class)
"The attribute name to display",
NULL,
G_PARAM_READWRITE));
+
+ /**
+ * NautilusColumn:attribute_q:
+ *
+ * The attribute name to display, in quark form.
+ */
g_object_class_install_property (G_OBJECT_CLASS (class),
PROP_ATTRIBUTE_Q,
g_param_spec_uint ("attribute_q",
@@ -249,6 +266,12 @@ nautilus_column_class_init (NautilusColumnClass *class)
"The attribute name to display, in quark form",
0, G_MAXUINT, 0,
G_PARAM_READABLE));
+
+ /**
+ * NautilusColumn:label:
+ *
+ * The label to display in the column.
+ */
g_object_class_install_property (G_OBJECT_CLASS (class),
PROP_LABEL,
g_param_spec_string ("label",
@@ -256,6 +279,12 @@ nautilus_column_class_init (NautilusColumnClass *class)
"Label to display in the column",
NULL,
G_PARAM_READWRITE));
+
+ /**
+ * NautilusColumn:description:
+ *
+ * The user-visible description of the column.
+ */
g_object_class_install_property (G_OBJECT_CLASS (class),
PROP_DESCRIPTION,
g_param_spec_string ("description",
@@ -264,6 +293,11 @@ nautilus_column_class_init (NautilusColumnClass *class)
NULL,
G_PARAM_READWRITE));
+ /**
+ * NautilusColumn:xalign:
+ *
+ * The x-alignment of the column.
+ */
g_object_class_install_property (G_OBJECT_CLASS (class),
PROP_XALIGN,
g_param_spec_float ("xalign",
diff --git a/libnautilus-extension/nautilus-column.h b/libnautilus-extension/nautilus-column.h
index 8f82bf23e..09dc0c74d 100644
--- a/libnautilus-extension/nautilus-column.h
+++ b/libnautilus-extension/nautilus-column.h
@@ -36,24 +36,27 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (NautilusColumn, nautilus_column, NAUTILUS, COLUMN, GObject)
/**
- * SECTION:nautilus-column
- * @title: NautilusColumn
- * @short_description: List view column descriptor object
+ * NautilusColumn:
*
- * #NautilusColumn is an object that describes a column in the file manager
- * list view. Extensions can provide #NautilusColumn by registering a
- * #NautilusColumnProvider and returning them from
- * nautilus_column_provider_get_columns(), which will be called by the main
+ * List view column descriptor object.
+ *
+ * `NautilusColumn` is an object that describes a column in the file manager
+ * list view. Extensions can provide `NautilusColumn` by registering a
+ * [class@ColumnProvider] and returning them from
+ * [method@ColumnProvider.get_columns], which will be called by the main
* application when creating a view.
*/
/**
* nautilus_column_new:
+ *
* @name: (not nullable): identifier of the column
* @attribute: (not nullable): the file attribute to be displayed in the column
* @label: (not nullable): the user-visible label for the column
* @description: (not nullable): a user-visible description of the column
*
+ * Creates a new [class@Column] object.
+ *
* Returns: (transfer full): a new #NautilusColumn
*/
NautilusColumn *nautilus_column_new (const char *name,
@@ -61,13 +64,4 @@ NautilusColumn *nautilus_column_new (const char *name,
const char *label,
const char *description);
-/* NautilusColumn has the following properties:
- * name (string) - the identifier for the column
- * attribute (string) - the file attribute to be displayed in the
- * column
- * label (string) - the user-visible label for the column
- * description (string) - a user-visible description of the column
- * xalign (float) - x-alignment of the column
- */
-
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]