forked from AuroraMiddleware/gtk
new functions _gtk_text_btree_get_insert() and
2007-11-15 Yevgen Muntyan <muntyan@tamu.edu> * gtk/gtktextbtree.h: * gtk/gtktextbtree.c: new functions _gtk_text_btree_get_insert() and _gtk_text_btree_get_selection_bound() (#497102). * gtk/gtktextbuffer.c (gtk_text_buffer_get_insert), (gtk_text_buffer_get_selection_bound): use them here instead of hash table lookup. svn path=/trunk/; revision=18996
This commit is contained in:
parent
921da326f5
commit
abad58b003
@ -1,3 +1,12 @@
|
||||
2007-11-15 Yevgen Muntyan <muntyan@tamu.edu>
|
||||
|
||||
* gtk/gtktextbtree.h:
|
||||
* gtk/gtktextbtree.c: new functions _gtk_text_btree_get_insert()
|
||||
and _gtk_text_btree_get_selection_bound() (#497102).
|
||||
* gtk/gtktextbuffer.c (gtk_text_buffer_get_insert),
|
||||
(gtk_text_buffer_get_selection_bound): use them here instead of
|
||||
hash table lookup.
|
||||
|
||||
2007-11-15 Yevgen Muntyan <muntyan@tamu.edu>
|
||||
|
||||
* gtk/gtktextbtree.c (_gtk_text_btree_get_tags): sort returned
|
||||
|
@ -2972,6 +2972,18 @@ _gtk_text_btree_mark_is_selection_bound (GtkTextBTree *tree,
|
||||
return segment == tree->selection_bound_mark;
|
||||
}
|
||||
|
||||
GtkTextMark *
|
||||
_gtk_text_btree_get_insert (GtkTextBTree *tree)
|
||||
{
|
||||
return tree->insert_mark;
|
||||
}
|
||||
|
||||
GtkTextMark *
|
||||
_gtk_text_btree_get_selection_bound (GtkTextBTree *tree)
|
||||
{
|
||||
return tree->selection_bound_mark;
|
||||
}
|
||||
|
||||
GtkTextMark*
|
||||
_gtk_text_btree_get_mark_by_name (GtkTextBTree *tree,
|
||||
const gchar *name)
|
||||
|
@ -200,12 +200,13 @@ void _gtk_text_btree_place_cursor (GtkTextBTree
|
||||
const GtkTextIter *where);
|
||||
void _gtk_text_btree_select_range (GtkTextBTree *tree,
|
||||
const GtkTextIter *ins,
|
||||
const GtkTextIter
|
||||
*bound);
|
||||
const GtkTextIter *bound);
|
||||
gboolean _gtk_text_btree_mark_is_insert (GtkTextBTree *tree,
|
||||
GtkTextMark *segment);
|
||||
gboolean _gtk_text_btree_mark_is_selection_bound (GtkTextBTree *tree,
|
||||
GtkTextMark *segment);
|
||||
GtkTextMark *_gtk_text_btree_get_insert (GtkTextBTree *tree);
|
||||
GtkTextMark *_gtk_text_btree_get_selection_bound (GtkTextBTree *tree);
|
||||
GtkTextMark *_gtk_text_btree_get_mark_by_name (GtkTextBTree *tree,
|
||||
const gchar *name);
|
||||
GtkTextLine * _gtk_text_btree_first_could_contain_tag (GtkTextBTree *tree,
|
||||
|
@ -2296,8 +2296,7 @@ gtk_text_buffer_get_insert (GtkTextBuffer *buffer)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TEXT_BUFFER (buffer), NULL);
|
||||
|
||||
/* FIXME use struct member in btree */
|
||||
return gtk_text_buffer_get_mark (buffer, "insert");
|
||||
return _gtk_text_btree_get_insert (get_btree (buffer));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2323,8 +2322,7 @@ gtk_text_buffer_get_selection_bound (GtkTextBuffer *buffer)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TEXT_BUFFER (buffer), NULL);
|
||||
|
||||
/* FIXME use struct member in btree */
|
||||
return gtk_text_buffer_get_mark (buffer, "selection_bound");
|
||||
return _gtk_text_btree_get_selection_bound (get_btree (buffer));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user