diff options
author | Michael Natterer <mitch@imendio.com> | 2006-10-05 14:48:57 +0000 |
---|---|---|
committer | Michael Natterer <mitch@src.gnome.org> | 2006-10-05 14:48:57 +0000 |
commit | a3b67535dfb1bc35b9e488282df81fadea81aa58 (patch) | |
tree | 018ec49e10daca32f068650e321f9ec0f47400e6 /gtk/gtkbindings.h | |
parent | 82448e172b5e0c42fdda20ad32e9700bac6d5fc3 (diff) | |
download | gtk+-a3b67535dfb1bc35b9e488282df81fadea81aa58.tar.gz |
added new scanner token "unbind" which gets rid of a key binding (in fact,
2006-10-05 Michael Natterer <mitch@imendio.com>
* gtk/gtkrc.[ch]: added new scanner token "unbind" which gets
rid of a key binding (in fact, it only lets it appear unbound).
* gtk/gtkbindings.[ch] (struct GtkBindingEntry): added
"guint marks_unbound : 1"
(gtk_binding_entry_skip): new API which marks the entry as unbound.
Changed code so it returns FALSE when "marks_unbound == TRUE" is
encountered while activating bindings, effectively letting the
binding appear unbound (regardless of still existing bindings in
lower binding priority levels). Fixes bug #358329.
(gtk_binding_entry_add)
(gtk_binding_entry_clear)
(gtk_binding_entry_add_signall)
(gtk_binding_parse_binding): deprected these functions.
(_gtk_binding_parse_binding)
(_gtk_binding_entry_add_signall): new internal API.
* gtk/gtk.symbols: changed accordingly.
Diffstat (limited to 'gtk/gtkbindings.h')
-rw-r--r-- | gtk/gtkbindings.h | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/gtk/gtkbindings.h b/gtk/gtkbindings.h index 7e28d8459d..a3109b2988 100644 --- a/gtk/gtkbindings.h +++ b/gtk/gtkbindings.h @@ -69,6 +69,7 @@ struct _GtkBindingEntry GtkBindingSet *binding_set; guint destroyed : 1; guint in_emission : 1; + guint marks_unbound : 1; GtkBindingEntry *set_next; GtkBindingEntry *hash_next; GtkBindingSignal *signals; @@ -106,16 +107,33 @@ gboolean gtk_binding_set_activate (GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers, GtkObject *object); + +#ifndef GTK_DISABLE_DEPRECATED #define gtk_binding_entry_add gtk_binding_entry_clear void gtk_binding_entry_clear (GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers); -void gtk_binding_entry_add_signal (GtkBindingSet *binding_set, +void gtk_binding_entry_add_signall (GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers, const gchar *signal_name, - guint n_args, - ...); + GSList *binding_args); +guint gtk_binding_parse_binding (GScanner *scanner); +#endif /* GTK_DISABLE_DEPRECATED */ + +void gtk_binding_entry_skip (GtkBindingSet *binding_set, + guint keyval, + GdkModifierType modifiers); +void gtk_binding_entry_add_signal (GtkBindingSet *binding_set, + guint keyval, + GdkModifierType modifiers, + const gchar *signal_name, + guint n_args, + ...); +void gtk_binding_entry_remove (GtkBindingSet *binding_set, + guint keyval, + GdkModifierType modifiers); + void gtk_binding_set_add_path (GtkBindingSet *binding_set, GtkPathType path_type, const gchar *path_pattern, @@ -124,18 +142,13 @@ void gtk_binding_set_add_path (GtkBindingSet *binding_set, /* Non-public methods */ -void gtk_binding_entry_remove (GtkBindingSet *binding_set, - guint keyval, - GdkModifierType modifiers); -void gtk_binding_entry_add_signall (GtkBindingSet *binding_set, +guint _gtk_binding_parse_binding (GScanner *scanner); +void _gtk_binding_reset_parsed (void); +void _gtk_binding_entry_add_signall (GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers, const gchar *signal_name, GSList *binding_args); -guint gtk_binding_parse_binding (GScanner *scanner); - - -void _gtk_binding_reset_parsed (void); /* Creates a signal with a fixed callback instead of a class offset; * useful for key binding signals |