diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-09-08 18:33:03 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-09-08 18:33:03 +0000 |
commit | 2e2272aac14ab669060c107e607611f1f16b6d49 (patch) | |
tree | 1c1f57de2b074ab7d3fff8b74e18e7c73e380432 /gtk/gtktextlayout.h | |
parent | 38a656ab1881f9013f3b0bdbb2172840d7685638 (diff) | |
download | gdk-pixbuf-2e2272aac14ab669060c107e607611f1f16b6d49.tar.gz |
Fix up visibility so that focus, cursor_visible and blink interact
Fri Sep 8 14:28:00 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextview.c: Fix up visibility so that focus,
cursor_visible and blink interact properly. Reenable cursor blink
which had been roughly disabled. Make blink and focus
properly per-view.
* gtk/gtktextlayout.[ch] (gtk_text_layout_set_cursor_visible):
Add a flag for whether to display insertion cursor and
a function to set the flag.
* gtk/gtktextlayout.c (gtk_text_layout_get_line_yrange): Change
get_line_y() to get_line_yrange(), to be a bit more generally
useful.
Diffstat (limited to 'gtk/gtktextlayout.h')
-rw-r--r-- | gtk/gtktextlayout.h | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/gtk/gtktextlayout.h b/gtk/gtktextlayout.h index 79871d389..048b55d77 100644 --- a/gtk/gtktextlayout.h +++ b/gtk/gtktextlayout.h @@ -67,6 +67,9 @@ struct _GtkTextLayout /* Whether we are allowed to wrap right now */ gint wrap_loop_count; + + /* Whether to show the insertion cursor */ + guint cursor_visible : 1; }; struct _GtkTextLayoutClass @@ -143,16 +146,20 @@ extern PangoAttrType gtk_text_attr_appearance_type; GtkType gtk_text_layout_get_type (void) G_GNUC_CONST; GtkTextLayout *gtk_text_layout_new (void); -void gtk_text_layout_set_buffer (GtkTextLayout *layout, - GtkTextBuffer *buffer); -void gtk_text_layout_set_default_style (GtkTextLayout *layout, - GtkTextAttributes *values); -void gtk_text_layout_set_contexts (GtkTextLayout *layout, - PangoContext *ltr_context, - PangoContext *rtl_context); -void gtk_text_layout_default_style_changed (GtkTextLayout *layout); -void gtk_text_layout_set_screen_width (GtkTextLayout *layout, - gint width); +void gtk_text_layout_set_buffer (GtkTextLayout *layout, + GtkTextBuffer *buffer); +void gtk_text_layout_set_default_style (GtkTextLayout *layout, + GtkTextAttributes *values); +void gtk_text_layout_set_contexts (GtkTextLayout *layout, + PangoContext *ltr_context, + PangoContext *rtl_context); +void gtk_text_layout_default_style_changed (GtkTextLayout *layout); +void gtk_text_layout_set_screen_width (GtkTextLayout *layout, + gint width); + +void gtk_text_layout_set_cursor_visible (GtkTextLayout *layout, + gboolean cursor_visible); +gboolean gtk_text_layout_get_cursor_visible (GtkTextLayout *layout); /* Getting the size or the lines potentially results in a call to * recompute, which is pretty massively expensive. Thus it should @@ -225,8 +232,10 @@ void gtk_text_layout_changed (GtkTextLayout *layout, void gtk_text_layout_get_iter_location (GtkTextLayout *layout, const GtkTextIter *iter, GdkRectangle *rect); -gint gtk_text_layout_get_line_y (GtkTextLayout *layout, - const GtkTextIter *iter); +void gtk_text_layout_get_line_yrange (GtkTextLayout *layout, + const GtkTextIter *iter, + gint *y, + gint *height); void gtk_text_layout_get_cursor_locations (GtkTextLayout *layout, GtkTextIter *iter, GdkRectangle *strong_pos, |