#include "gtktextiterprivate.h"
#include "gtkintl.h"
#include "gtkdebug.h"
-#include "gtkalias.h"
+
#include <string.h>
+
+/**
+ * SECTION:gtktextiter
+ * @Short_description: Text buffer iterator
+ * @Title: GtkTextIter
+ *
+ * You may wish to begin by reading the <link linkend="TextWidget">text widget
+ * conceptual overview</link> which gives an overview of all the objects and data
+ * types related to the text widget and how they work together.
+ */
+
+
#define FIX_OVERFLOWS(varname) if ((varname) == G_MININT) (varname) = G_MININT + 1
typedef struct _GtkTextRealIter GtkTextRealIter;
g_slice_free (GtkTextIter, iter);
}
-GType
-gtk_text_iter_get_type (void)
-{
- static GType our_type = 0;
-
- if (our_type == 0)
- our_type = g_boxed_type_register_static (I_("GtkTextIter"),
- (GBoxedCopyFunc) gtk_text_iter_copy,
- (GBoxedFreeFunc) gtk_text_iter_free);
-
- return our_type;
-}
+G_DEFINE_BOXED_TYPE (GtkTextIter, gtk_text_iter,
+ gtk_text_iter_copy,
+ gtk_text_iter_free)
GtkTextLineSegment*
_gtk_text_iter_get_indexable_segment (const GtkTextIter *iter)
/**
* gtk_text_iter_ends_tag:
* @iter: an iterator
- * @tag: a #GtkTextTag, or %NULL
+ * @tag: (allow-none): a #GtkTextTag, or %NULL
*
* Returns %TRUE if @tag is toggled off at exactly this point. If @tag
* is %NULL, returns %TRUE if any tag is toggled off at this point. Note
* @iter: a #GtkTextIter
* @pred: a function to be called on each character
* @user_data: user data for @pred
- * @limit: search limit, or %NULL for none
+ * @limit: (allow-none): search limit, or %NULL for none
*
* Advances @iter, calling @pred on each character. If
* @pred returns %TRUE, returns %TRUE and stops scanning.
* @iter: a #GtkTextIter
* @pred: function to be called on each character
* @user_data: user data for @pred
- * @limit: search limit, or %NULL for none
+ * @limit: (allow-none): search limit, or %NULL for none
*
* Same as gtk_text_iter_forward_find_char(), but goes backward from @iter.
*
* @iter: start of search
* @str: a search string
* @flags: flags affecting how the search is done
- * @match_start: (allow-none): return location for start of match, or %NULL
- * @match_end: (allow-none): return location for end of match, or %NULL
+ * @match_start: (out caller-allocates) (allow-none): return location for start of match, or %NULL
+ * @match_end: (out caller-allocates) (allow-none): return location for end of match, or %NULL
* @limit: (allow-none): bound for the search, or %NULL for the end of the buffer
*
* Searches forward for @str. Any match is returned by setting
* @iter: a #GtkTextIter where the search begins
* @str: search string
* @flags: bitmask of flags affecting the search
- * @match_start: (allow-none): return location for start of match, or %NULL
- * @match_end: (allow-none): return location for end of match, or %NULL
+ * @match_start: (out caller-allocates) (allow-none): return location for start of match, or %NULL
+ * @match_end: (out caller-allocates) (allow-none): return location for end of match, or %NULL
* @limit: (allow-none): location of last possible @match_start, or %NULL for start of buffer
*
* Same as gtk_text_iter_forward_search(), but moves backward.
if (_gtk_text_line_is_last (real->line, real->tree))
g_error ("Iterator was on last line (past the end iterator)");
}
-
-#define __GTK_TEXT_ITER_C__
-#include "gtkaliasdef.c"