summaryrefslogtreecommitdiff
path: root/gtk/gtkentry.h
diff options
context:
space:
mode:
authorOwen Taylor <owt1@cornell.edu>1998-03-22 21:31:10 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-03-22 21:31:10 +0000
commit16aa9c196416f6bbb60e22f06f62cae8ab4b0196 (patch)
treefa112252cd622b7ca926ae704d7fce65359b76af /gtk/gtkentry.h
parentac05ab301ddc3590ca55b7dec8c2ac472cedc55d (diff)
downloadgtk+-16aa9c196416f6bbb60e22f06f62cae8ab4b0196.tar.gz
fixes to locale checks
Sun Mar 22 16:25:46 1998 Owen Taylor <owt1@cornell.edu> * gtk/gtkmain.c (gtk_init): fixes to locale checks * gtk/testgtk.c (create_dnd): Create the dnd icons separately to avoid strange interactions with shapes demo. * gtk/gtkentry.[ch]: - Limit the length of the text to 2048 to prevent long delays - Fix problems with buffer overruns - Draw only the onscreen portion of the text to prevent wrapping of shorts in the X drawing code. - Keep track of character positions and x-offsets to speed up algorithms.
Diffstat (limited to 'gtk/gtkentry.h')
-rw-r--r--gtk/gtkentry.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/gtk/gtkentry.h b/gtk/gtkentry.h
index e624def9db..43c895138b 100644
--- a/gtk/gtkentry.h
+++ b/gtk/gtkentry.h
@@ -48,10 +48,21 @@ struct _GtkEntry
guint16 text_size;
guint16 text_length;
guint16 text_max_length;
- gint16 scroll_offset;
+ gint scroll_offset;
guint visible : 1;
guint32 timer;
guint button;
+
+ /* The total number of characters (not bytes) in the entry */
+ guint nchars;
+
+ /* The byte offset of each character
+ * (including the last insertion position) */
+ guint16 *char_pos;
+
+ /* The x-offset of each character (including the last insertion position)
+ * only valid when the widget is realized */
+ gint *char_offset;
};
struct _GtkEntryClass