Commit 99686a2f authored by Jesse van den Kieboom's avatar Jesse van den Kieboom Committed by Paolo Borelli

Added gtk_text_iter_assign API

https://bugzilla.gnome.org/show_bug.cgi?id=645258
parent 508353fd
......@@ -444,6 +444,28 @@ gtk_text_iter_free (GtkTextIter *iter)
g_slice_free (GtkTextIter, iter);
}
/**
* gtk_text_iter_assign:
* @iter: a #GtkTextIter
* @other: another #GtkTextIter
*
* Assigns the value of @other to @iter. This function
* is not useful in applications, because iterators can be assigned
* with <literal>GtkTextIter i = j;</literal>. The
* function is used by language bindings.
*
* Since: 3.2
**/
void
gtk_text_iter_assign (GtkTextIter *iter,
const GtkTextIter *other)
{
g_return_if_fail (iter != NULL);
g_return_if_fail (other != NULL);
*iter = *other;
}
G_DEFINE_BOXED_TYPE (GtkTextIter, gtk_text_iter,
gtk_text_iter_copy,
gtk_text_iter_free)
......
......@@ -88,6 +88,8 @@ GtkTextBuffer *gtk_text_iter_get_buffer (const GtkTextIter *iter);
GtkTextIter *gtk_text_iter_copy (const GtkTextIter *iter);
void gtk_text_iter_free (GtkTextIter *iter);
void gtk_text_iter_assign (GtkTextIter *iter,
const GtkTextIter *other);
GType gtk_text_iter_get_type (void) G_GNUC_CONST;
......@@ -234,7 +236,6 @@ gboolean gtk_text_iter_forward_visible_cursor_positions (GtkTextIter *iter,
gboolean gtk_text_iter_backward_visible_cursor_positions (GtkTextIter *iter,
gint count);
void gtk_text_iter_set_offset (GtkTextIter *iter,
gint char_offset);
void gtk_text_iter_set_line (GtkTextIter *iter,
......@@ -286,7 +287,6 @@ gboolean gtk_text_iter_backward_search (const GtkTextIter *iter,
GtkTextIter *match_end,
const GtkTextIter *limit);
/*
* Comparisons
*/
......@@ -305,5 +305,3 @@ void gtk_text_iter_order (GtkTextIter *first,
G_END_DECLS
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment