From 5351a4e444a991bcc3022edb007b047493d86dd1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 19 Jul 2004 18:15:48 +0000 Subject: Support inline autocompletion in entries (#135953) 2004-07-19 Matthias Clasen Support inline autocompletion in entries (#135953) * gtk/gtkentryprivate.h: * gtk/gtkentrycompletion.h: * gtk/gtkentrycompletion.c (gtk_entry_completion_class_init): Add a new signal ::insert-prefix which can be used to override the default inline-completion behaviour. Add two new boolean properties, :popup_completion and :inline_completion which determine how the possible completions should be presented. (gtk_entry_completion_insert_prefix): New function to request a prefix insertion. * gtk/gtkentry.c: Add the necessary glue for inline completion. --- gtk/gtkentryprivate.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gtk/gtkentryprivate.h') diff --git a/gtk/gtkentryprivate.h b/gtk/gtkentryprivate.h index aed129e02..7fb369b9c 100644 --- a/gtk/gtkentryprivate.h +++ b/gtk/gtkentryprivate.h @@ -55,10 +55,14 @@ struct _GtkEntryCompletionPrivate gulong completion_timeout; gulong changed_id; - gulong key_press_id; - gulong key_release_id; + gulong insert_text_id; - gboolean ignore_enter; + guint ignore_enter : 1; + guint has_completion : 1; + guint inline_completion : 1; + guint popup_completion : 1; + + GSource *check_completion_idle; }; gboolean _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion); -- cgit v1.2.1