[gtk/test-text-buffer-undo: 10/11] textbuffer: Improve the docs




commit f921ad1d04a248e67ea66803de5a7f6d35b65acd
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed May 26 14:14:48 2021 -0400

    textbuffer: Improve the docs
    
    Add getter/setter annotations.

 gtk/gtktextbuffer.c | 31 ++++++++++++++++++-------------
 1 file changed, 18 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c
index 83fc009812..f628598bb6 100644
--- a/gtk/gtktextbuffer.c
+++ b/gtk/gtktextbuffer.c
@@ -447,6 +447,11 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
   klass->redo = gtk_text_buffer_real_redo;
 
   /* Construct */
+  /**
+   * GtkTextBuffer:tag-table: (org.gtk.Property.get=gtk_text_buffer_get_tag_table)
+   *
+   * The GtkTextTagTable for the buffer.
+   */
   text_buffer_props[PROP_TAG_TABLE] =
       g_param_spec_object ("tag-table",
                            P_("Tag Table"),
@@ -457,7 +462,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
   /* Normal properties */
 
   /**
-   * GtkTextBuffer:text:
+   * GtkTextBuffer:text: (org.gtk.Property.set=gtk_text_buffer_set_text)
    *
    * The text content of the buffer.
    *
@@ -484,7 +489,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
                             GTK_PARAM_READABLE);
 
   /**
-   * GtkTextBuffer:can-undo:
+   * GtkTextBuffer:can-undo: (org.gtk.Property.get=gtk_text_buffer_get_can_undo)
    *
    * Denotes that the buffer can undo the last applied action.
    */
@@ -496,7 +501,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
                           GTK_PARAM_READABLE);
 
   /**
-   * GtkTextBuffer:can-redo:
+   * GtkTextBuffer:can-redo: (org.gtk.Property.get=gtk_text_buffer_get_can_redo)
    *
    * Denotes that the buffer can reapply the last undone action.
    */
@@ -508,7 +513,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
                           GTK_PARAM_READABLE);
 
   /**
-   * GtkTextBuffer:enable-undo:
+   * GtkTextBuffer:enable-undo: (org.gtk.Property.get=gtk_text_buffer_get_enable_undo 
org.gtk.Property.set=gtk_text_buffer_set_enable_undo)
    *
    * Denotes if support for undoing and redoing changes to the buffer is allowed.
    */
@@ -678,7 +683,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
   signals[CHANGED] =
     g_signal_new (I_("changed"),
                   G_OBJECT_CLASS_TYPE (object_class),
-                  G_SIGNAL_RUN_LAST,                   
+                  G_SIGNAL_RUN_LAST,
                   G_STRUCT_OFFSET (GtkTextBufferClass, changed),
                   NULL, NULL,
                   NULL,
@@ -742,7 +747,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
   signals[MARK_DELETED] =
     g_signal_new (I_("mark-deleted"),
                   G_OBJECT_CLASS_TYPE (object_class),
-                  G_SIGNAL_RUN_LAST,                   
+                  G_SIGNAL_RUN_LAST,
                   G_STRUCT_OFFSET (GtkTextBufferClass, mark_deleted),
                   NULL, NULL,
                   NULL,
@@ -986,7 +991,7 @@ gtk_text_buffer_set_property (GObject         *object,
 
     case PROP_TEXT:
       gtk_text_buffer_set_text (text_buffer,
-                               g_value_get_string (value), -1);
+                                g_value_get_string (value), -1);
       break;
 
     default:
@@ -1124,7 +1129,7 @@ _gtk_text_buffer_get_btree (GtkTextBuffer *buffer)
 }
 
 /**
- * gtk_text_buffer_get_tag_table:
+ * gtk_text_buffer_get_tag_table: (attributes org.gtk.Method.get_property=tag-table)
  * @buffer: a `GtkTextBuffer`
  *
  * Get the `GtkTextTagTable` associated with this buffer.
@@ -1140,7 +1145,7 @@ gtk_text_buffer_get_tag_table (GtkTextBuffer *buffer)
 }
 
 /**
- * gtk_text_buffer_set_text:
+ * gtk_text_buffer_set_text: (attributes org.gtk.Method.set_property=text)
  * @buffer: a `GtkTextBuffer`
  * @text: UTF-8 text to insert
  * @len: length of @text in bytes
@@ -4820,7 +4825,7 @@ gtk_text_buffer_real_redo (GtkTextBuffer *buffer)
 }
 
 /**
- * gtk_text_buffer_get_can_undo:
+ * gtk_text_buffer_get_can_undo: (attributes org.gtk.Method.get_property=can-undo)
  * @buffer: a `GtkTextBuffer`
  *
  * Gets whether there is an undoable action in the history.
@@ -4836,7 +4841,7 @@ gtk_text_buffer_get_can_undo (GtkTextBuffer *buffer)
 }
 
 /**
- * gtk_text_buffer_get_can_redo:
+ * gtk_text_buffer_get_can_redo: (attributes org.gtk.Method.get_property=can-redo)
  * @buffer: a `GtkTextBuffer`
  *
  * Gets whether there is a redoable action in the history.
@@ -4953,7 +4958,7 @@ gtk_text_buffer_redo (GtkTextBuffer *buffer)
 }
 
 /**
- * gtk_text_buffer_get_enable_undo:
+ * gtk_text_buffer_get_enable_undo: (attributes org.gtk.Method.get_property=enable-undo)
  * @buffer: a `GtkTextBuffer`
  *
  * Gets whether the buffer is saving modifications to the buffer
@@ -4972,7 +4977,7 @@ gtk_text_buffer_get_enable_undo (GtkTextBuffer *buffer)
 }
 
 /**
- * gtk_text_buffer_set_enable_undo:
+ * gtk_text_buffer_set_enable_undo: (attributes org.gtk.Method.set_property=enable-undo)
  * @buffer: a `GtkTextBuffer`
  * @enable_undo: %TRUE to enable undo
  *


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