diff options
author | Matthias Clasen <mclasen@redhat.com> | 2004-07-19 18:15:48 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-07-19 18:15:48 +0000 |
commit | 5351a4e444a991bcc3022edb007b047493d86dd1 (patch) | |
tree | e1ce78d7dd1409d1bb9dfd205ef48d8528e21e83 /gtk/gtkentrycompletion.h | |
parent | 23b6bd5378571d027dc03c08843449c130d9fbde (diff) | |
download | gtk+-5351a4e444a991bcc3022edb007b047493d86dd1.tar.gz |
Support inline autocompletion in entries (#135953)
2004-07-19 Matthias Clasen <mclasen@redhat.com>
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.
Diffstat (limited to 'gtk/gtkentrycompletion.h')
-rw-r--r-- | gtk/gtkentrycompletion.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk/gtkentrycompletion.h b/gtk/gtkentrycompletion.h index 5bdcc4c1ca..72d00c7daf 100644 --- a/gtk/gtkentrycompletion.h +++ b/gtk/gtkentrycompletion.h @@ -63,12 +63,13 @@ struct _GtkEntryCompletionClass GtkTreeIter *iter); void (* action_activated) (GtkEntryCompletion *completion, gint index_); + gboolean (* insert_prefix) (GtkEntryCompletion *completion, + gchar *prefix); /* Padding for future expansion */ void (*_gtk_reserved0) (void); void (*_gtk_reserved1) (void); void (*_gtk_reserved2) (void); - void (*_gtk_reserved3) (void); }; /* core */ @@ -89,6 +90,7 @@ void gtk_entry_completion_set_minimum_key_length (GtkEntryComplet gint length); gint gtk_entry_completion_get_minimum_key_length (GtkEntryCompletion *completion); void gtk_entry_completion_complete (GtkEntryCompletion *completion); +void gtk_entry_completion_insert_prefix (GtkEntryCompletion *completion); void gtk_entry_completion_insert_action_text (GtkEntryCompletion *completion, gint index_, @@ -99,6 +101,13 @@ void gtk_entry_completion_insert_action_markup (GtkEntryComplet void gtk_entry_completion_delete_action (GtkEntryCompletion *completion, gint index_); +void gtk_entry_completion_set_inline_completion (GtkEntryCompletion *completion, + gboolean inline_completion); +gboolean gtk_entry_completion_get_inline_completion (GtkEntryCompletion *completion); +void gtk_entry_completion_set_popup_completion (GtkEntryCompletion *completion, + gboolean popup_completion); +gboolean gtk_entry_completion_get_popup_completion (GtkEntryCompletion *completion); + /* convenience */ void gtk_entry_completion_set_text_column (GtkEntryCompletion *completion, gint column); |