Added comments to atktext.c
authorBrian Cameron <bcameron@src.gnome.org>
Thu, 17 May 2001 11:22:11 +0000 (11:22 +0000)
committerBrian Cameron <bcameron@src.gnome.org>
Thu, 17 May 2001 11:22:11 +0000 (11:22 +0000)
atk/atktext.c

index b5b741a..8780060 100755 (executable)
@@ -94,6 +94,14 @@ atk_text_base_init (gpointer *g_class)
   }
 }
 
+/**
+ *atk_text_get_text:
+ *@text: an #AtkText
+ *@start_offset: start position
+ *@end_offset: end position
+ *
+ *Returns the text between @start_offset and @end_offset.
+ **/
 gchar*
 atk_text_get_text (AtkText      *text,
                    gint         start_offset,
@@ -112,6 +120,13 @@ atk_text_get_text (AtkText      *text,
     return NULL;
 }
 
+/**
+ *atk_text_get_character_at_offset
+ *@text: an #AtkText
+ *@offset: position
+ *
+ *Returns the character at @offset.
+ **/
 gunichar
 atk_text_get_character_at_offset (AtkText      *text,
                                   gint         offset)
@@ -129,6 +144,14 @@ atk_text_get_character_at_offset (AtkText      *text,
     return (gunichar) 0;
 }
 
+/**
+ *atk_text_get_text_after_offset
+ *@text: an #AtkText
+ *@offset: position
+ *@boundary_type: An #AtkTextBoundary
+ *
+ *Returns the text after @offset up to the specified @boundary_type.
+ **/
 gchar*
 atk_text_get_text_after_offset (AtkText          *text,
                                 gint             offset,
@@ -147,6 +170,14 @@ atk_text_get_text_after_offset (AtkText          *text,
     return NULL;
 }
 
+/**
+ *atk_text_get_text_at_offset
+ *@text: an #AtkText
+ *@offset: position
+ *@boundary_type: An #AtkTextBoundary
+ *
+ *Returns the text at @offset up to the specified @boundary_type.
+ **/
 gchar*
 atk_text_get_text_at_offset (AtkText          *text,
                              gint             offset,
@@ -165,6 +196,14 @@ atk_text_get_text_at_offset (AtkText          *text,
     return NULL;
 }
 
+/**
+ *atk_text_get_text_before_offset
+ *@text: an #AtkText
+ *@offset: position
+ *@boundary_type: An #AtkTextBoundary
+ *
+ *Returns the text before @offset up to the specified @boundary_type.
+ **/
 gchar*
 atk_text_get_text_before_offset (AtkText          *text,
                                  gint             offset,
@@ -183,6 +222,12 @@ atk_text_get_text_before_offset (AtkText          *text,
     return NULL;
 }
 
+/**
+ *atk_text_get_caret_offset
+ *@text: an #AtkText
+ *
+ *Returns the position of the caret (cursor).
+ **/
 gint
 atk_text_get_caret_offset (AtkText *text)
 {
@@ -199,6 +244,15 @@ atk_text_get_caret_offset (AtkText *text)
     return -1;
 }
 
+/**
+ *atk_text_get_row_col_at_offset
+ *@text: an #AtkText
+ *@offset: position
+ *@row: row number
+ *@col: column number
+ *
+ *Given an @offset, the @row and @col arguments are filled appropriately.
+ **/
 void
 atk_text_get_row_col_at_offset (AtkText *text,
                                 gint offset,
@@ -221,6 +275,15 @@ atk_text_get_row_col_at_offset (AtkText *text,
     }
 }
 
+/**
+ *atk_text_get_range_attributes
+ *@text: an #AtkText
+ *@start_offset: start position
+ *@end_offset: end position
+ *
+ *Returns a #PangoAttrList with the text attributes between the
+ *@start_offset and the @end_offset.
+ **/
 PangoAttrList*
 atk_text_get_range_attributes (AtkText *text,
                                gint start_offset,
@@ -239,6 +302,18 @@ atk_text_get_range_attributes (AtkText *text,
     return NULL;
 }
 
+/**
+ *atk_text_get_character_extents
+ *@text: an #AtkText
+ *@offset: position
+ *@x: x-position of character
+ *@y: y-position of character
+ *@length: length of character
+ *@width: width of character
+ *
+ *Given an @offset, the @x, @y, @length, and @width values are filled
+ *appropriately.
+ **/
 void
 atk_text_get_character_extents (AtkText *text,
                                 gint offset,
@@ -265,6 +340,12 @@ atk_text_get_character_extents (AtkText *text,
     }
 }
 
+/**
+ *atk_text_get_character_count
+ *@text: an #AtkText
+ *
+ *Returns the number of characters.
+ **/
 gint
 atk_text_get_character_count (AtkText *text)
 {
@@ -281,6 +362,15 @@ atk_text_get_character_count (AtkText *text)
     return -1;
 }
 
+/**
+ *atk_text_get_offset_at_point
+ *@text: an #AtkText
+ *@x: x-position of character
+ *@y: y-position of character
+ *
+ *Returns the offset to the character which is located at
+ *the specified @x and @y coordinates.
+ **/
 gint
 atk_text_get_offset_at_point (AtkText *text,
                               gint x,
@@ -299,6 +389,12 @@ atk_text_get_offset_at_point (AtkText *text,
     return -1;
 }
 
+/**
+ *atk_text_get_selected_text
+ *@text: an #AtkText
+ *
+ *Returns the selected text.
+ **/
 gchar*
 atk_text_get_selected_text (AtkText *text)
 {
@@ -315,6 +411,15 @@ atk_text_get_selected_text (AtkText *text)
     return NULL;
 }
 
+/**
+ *atk_text_get_selection_bounds
+ *@text: an #AtkText
+ *@start_offset: start position
+ *@end_offset: end position
+ *
+ *@start_offset and @end_offset are filled with the
+ *current selection bounds.
+ **/
 void
 atk_text_get_selection_bounds (AtkText *text,
                                gint    *start_offset,
@@ -336,6 +441,16 @@ atk_text_get_selection_bounds (AtkText *text,
   }
 }
 
+/**
+ *atk_text_set_selection_bounds
+ *@text: an #AtkText
+ *@start_offset: start position
+ *@end_offset: end position
+ *
+ *The selection bounds are set to the specified @start_offset
+ *and @end_offset values.
+ *Returns TRUE if success, FALSE otherwise.
+ **/
 gboolean
 atk_text_set_selection_bounds (AtkText *text,
                                gint    start_offset,
@@ -358,6 +473,14 @@ atk_text_set_selection_bounds (AtkText *text,
     }
 }
 
+/**
+ *atk_text_set_caret_offset
+ *@text: an #AtkText
+ *@offset: position
+ *
+ *Sets the caret (cursor) position to the specified @offset.
+ *Returns TRUE if success, FALSE otherwise.
+ **/
 gboolean
 atk_text_set_caret_offset (AtkText *text,
                            gint    offset)