diff options
author | Yevgen Muntyan <muntyan@tamu.edu> | 2007-06-12 05:32:57 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2007-06-12 05:32:57 +0000 |
commit | ef1e05f7ded60ec3551ec4ab57fded69437a6837 (patch) | |
tree | d4c976d8416c781a92cbe59dcb17bd4eee9e1b51 /gtk/gtktextlayout.h | |
parent | 15c693477897eb1bbc8aebae880ef979eae1ba94 (diff) | |
download | gtk+-ef1e05f7ded60ec3551ec4ab57fded69437a6837.tar.gz |
Implement block-cursor for overwrite mode. (#80378)
2007-06-12 Yevgen Muntyan <muntyan@tamu.edu>
* gtk/gtkentry.c (gtk_entry_expose), (gtk_entry_toggle_overwrite),
(gtk_entry_draw_cursor):
* gtk/gtkstyle.c (_gtk_widget_get_cursor_gc),
(_gtk_widget_get_cursor_color):
* gtk/gtkstyle.h:
* gtk/gtktextdisplay.c (gtk_text_renderer_prepare_run),
(gtk_text_renderer_draw_shape), (text_renderer_set_state),
(render_para):
* gtk/gtktextlayout.c (gtk_text_layout_set_overwrite_mode),
(gtk_text_layout_invalidate_cache), (get_block_cursor),
(add_cursor), (gtk_text_layout_get_line_display),
(_gtk_text_layout_get_block_cursor):
* gtk/gtktextlayout.h:
* gtk/gtktextutil.c (layout_get_char_width),
(_gtk_text_util_get_block_cursor_location):
* gtk/gtktextutil.h:
* gtk/gtktextview.c (gtk_text_view_set_editable),
(gtk_text_view_toggle_overwrite), (gtk_text_view_set_overwrite),
(gtk_text_view_ensure_layout), (text_window_invalidate_cursors):
Implement block-cursor for overwrite mode. (#80378)
svn path=/trunk/; revision=18108
Diffstat (limited to 'gtk/gtktextlayout.h')
-rw-r--r-- | gtk/gtktextlayout.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk/gtktextlayout.h b/gtk/gtktextlayout.h index ffc889f711..cb35786454 100644 --- a/gtk/gtktextlayout.h +++ b/gtk/gtktextlayout.h @@ -174,6 +174,8 @@ struct _GtkTextLayout PangoAttrList *preedit_attrs; gint preedit_len; gint preedit_cursor; + + guint overwrite_mode : 1; }; struct _GtkTextLayoutClass @@ -258,7 +260,10 @@ struct _GtkTextLineDisplay GdkColor *pg_bg_color; + GdkRectangle block_cursor; guint cursors_invalid : 1; + guint has_block_cursor : 1; + guint cursor_at_line_end : 1; }; extern PangoAttrType gtk_text_attr_appearance_type; @@ -276,6 +281,8 @@ void gtk_text_layout_set_contexts (GtkTextLayout *lay PangoContext *rtl_context); void gtk_text_layout_set_cursor_direction (GtkTextLayout *layout, GtkTextDirection direction); +void gtk_text_layout_set_overwrite_mode (GtkTextLayout *layout, + gboolean overwrite); void gtk_text_layout_set_keyboard_direction (GtkTextLayout *layout, GtkTextDirection keyboard_dir); void gtk_text_layout_default_style_changed (GtkTextLayout *layout); @@ -380,6 +387,8 @@ void gtk_text_layout_get_cursor_locations (GtkTextLayout *layout, GtkTextIter *iter, GdkRectangle *strong_pos, GdkRectangle *weak_pos); +gboolean _gtk_text_layout_get_block_cursor (GtkTextLayout *layout, + GdkRectangle *pos); gboolean gtk_text_layout_clamp_iter_to_vrange (GtkTextLayout *layout, GtkTextIter *iter, gint top, |