diff options
author | Havoc Pennington <hp@redhat.com> | 2000-12-14 23:26:59 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2000-12-14 23:26:59 +0000 |
commit | 94ec8cff934d0d5559d6474131b3682e943bbc8e (patch) | |
tree | 1e28209981e5b72a75bd7e49f88f0f673e3a6e29 /gtk/gtktextiter.h | |
parent | 2e70f892ccf120947b4ab34a968ca4818208211d (diff) | |
download | gtk+-94ec8cff934d0d5559d6474131b3682e943bbc8e.tar.gz |
remove unused call to get_last_line()
2000-12-14 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbtree.c (_gtk_text_btree_validate_line): remove
unused call to get_last_line()
* gtk/gtkobject.c (gtk_object_add_arg_type): add G_TYPE_POINTER
here until boxed is working (and maybe after that - we should
really not gratuitously break old code)
* gtk/gtktexttag.c (gtk_text_tag_class_init): add commented-out
specific types for font_desc and tabs args, move them to
GTK_TYPE_POINTER for now, waiting on g_param_spec_boxed() to get
fixed. Move GdkColor args to GTK_TYPE_POINTER also.
* gtk/gtktextbuffer.c (gtk_text_buffer_class_init): temporarily
use GTK_TYPE_POINTER for signal signatures as a hack-around
* gtk/gtk-boxed.defs: Add boxed types for PangoFontDescription and
PangoTabArray
* gtk/gtktextlayout.c (line_display_iter_to_index):
make static
(line_display_index_to_iter): make static
* gtk/gtktextbuffer.c (gtk_text_buffer_class_init): fix marshaller
to marshal a string not a boxed
* gtk/gtkmarshal.list: add marshaller for GtkTextBuffer:insert_text
* gtk/testtext.c (fill_file_buffer): don't use g_utf8_next_char
since the UTF-8 isn't validated yet
* gtk/gtktextsegment.c (char_segment_check_func): don't require
lines to end in '\n'
* gtk/gtktextview.c (gtk_text_view_move_cursor): update to use
forward_to_delimiters, and grapheme boundaries
(gtk_text_view_delete_from_cursor): properly handle non-newline
delimiters, and grapheme boundaries
* gtk/gtktextiter.c (gtk_text_iter_forward_to_newline): rename
to gtk_text_iter_forward_to_delimiters, and make it work properly
if empty lines end with a character other than '\n'
* gtk/gtktextiter.h, gtk/gtktextiter.c: Add movement by cursor
position
Diffstat (limited to 'gtk/gtktextiter.h')
-rw-r--r-- | gtk/gtktextiter.h | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/gtk/gtktextiter.h b/gtk/gtktextiter.h index da5e761d4e..0f46d625a1 100644 --- a/gtk/gtktextiter.h +++ b/gtk/gtktextiter.h @@ -125,11 +125,12 @@ GSList *gtk_text_iter_get_tags (const GtkTextIter *iter); gboolean gtk_text_iter_editable (const GtkTextIter *iter, gboolean default_setting); -gboolean gtk_text_iter_starts_word (const GtkTextIter *iter); -gboolean gtk_text_iter_ends_word (const GtkTextIter *iter); -gboolean gtk_text_iter_inside_word (const GtkTextIter *iter); -gboolean gtk_text_iter_starts_line (const GtkTextIter *iter); -gboolean gtk_text_iter_ends_line (const GtkTextIter *iter); +gboolean gtk_text_iter_starts_word (const GtkTextIter *iter); +gboolean gtk_text_iter_ends_word (const GtkTextIter *iter); +gboolean gtk_text_iter_inside_word (const GtkTextIter *iter); +gboolean gtk_text_iter_starts_line (const GtkTextIter *iter); +gboolean gtk_text_iter_ends_line (const GtkTextIter *iter); +gboolean gtk_text_iter_is_cursor_position (const GtkTextIter *iter); gint gtk_text_iter_get_chars_in_line (const GtkTextIter *iter); @@ -143,8 +144,8 @@ gboolean gtk_text_iter_is_first (const GtkTextIter *iter); * Moving around the buffer */ -gboolean gtk_text_iter_forward_char (GtkTextIter *iter); -gboolean gtk_text_iter_backward_char (GtkTextIter *iter); +gboolean gtk_text_iter_forward_char (GtkTextIter *iter); +gboolean gtk_text_iter_backward_char (GtkTextIter *iter); gboolean gtk_text_iter_forward_chars (GtkTextIter *iter, gint count); gboolean gtk_text_iter_backward_chars (GtkTextIter *iter, @@ -155,12 +156,24 @@ gboolean gtk_text_iter_forward_lines (GtkTextIter *iter, gint count); gboolean gtk_text_iter_backward_lines (GtkTextIter *iter, gint count); +gboolean gtk_text_iter_forward_word_end (GtkTextIter *iter); +gboolean gtk_text_iter_backward_word_start (GtkTextIter *iter); gboolean gtk_text_iter_forward_word_ends (GtkTextIter *iter, gint count); gboolean gtk_text_iter_backward_word_starts (GtkTextIter *iter, gint count); -gboolean gtk_text_iter_forward_word_end (GtkTextIter *iter); -gboolean gtk_text_iter_backward_word_start (GtkTextIter *iter); +/* cursor positions are almost equivalent to chars, but not quite; + * in some languages, you can't put the cursor between certain + * chars. Also, you can't put the cursor between \r\n at the end + * of a line. + */ +gboolean gtk_text_iter_forward_cursor_position (GtkTextIter *iter); +gboolean gtk_text_iter_backward_cursor_position (GtkTextIter *iter); +gboolean gtk_text_iter_forward_cursor_positions (GtkTextIter *iter, + gint count); +gboolean gtk_text_iter_backward_cursor_positions (GtkTextIter *iter, + gint count); + void gtk_text_iter_set_offset (GtkTextIter *iter, gint char_offset); @@ -171,7 +184,7 @@ void gtk_text_iter_set_line_offset (GtkTextIter *iter, void gtk_text_iter_set_line_index (GtkTextIter *iter, gint byte_on_line); void gtk_text_iter_forward_to_end (GtkTextIter *iter); -gboolean gtk_text_iter_forward_to_newline (GtkTextIter *iter); +gboolean gtk_text_iter_forward_to_delimiters (GtkTextIter *iter); /* returns TRUE if a toggle was found; NULL for the tag pointer |