GTK+ Reference Manual | ||||
---|---|---|---|---|
#include <gtk/gtk.h> GtkBindingSet; GtkBindingEntry; GtkBindingSignal; GtkBindingArg; GtkBindingSet* gtk_binding_set_new (const gchar *set_name); GtkBindingSet* gtk_binding_set_by_class (gpointer object_class); GtkBindingSet* gtk_binding_set_find (const gchar *set_name); gboolean gtk_bindings_activate (GtkObject *object, guint keyval, GdkModifierType modifiers); gboolean gtk_bindings_activate_event (GtkObject *object, GdkEventKey *event); gboolean gtk_binding_set_activate (GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers, GtkObject *object); #define gtk_binding_entry_add void gtk_binding_entry_clear (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_set_add_path (GtkBindingSet *binding_set, GtkPathType path_type, const gchar *path_pattern, GtkPathPriorityType priority); void gtk_binding_entry_remove (GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers); 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);
typedef struct { gchar *set_name; gint priority; GSList *widget_path_pspecs; GSList *widget_class_pspecs; GSList *class_branch_pspecs; GtkBindingEntry *entries; GtkBindingEntry *current; guint parsed : 1; /* From RC content */ } GtkBindingSet;
typedef struct { /* key portion */ guint keyval; GdkModifierType modifiers; GtkBindingSet *binding_set; guint destroyed : 1; guint in_emission : 1; GtkBindingEntry *set_next; GtkBindingEntry *hash_next; GtkBindingSignal *signals; } GtkBindingEntry;
typedef struct { GtkBindingSignal *next; gchar *signal_name; guint n_args; GtkBindingArg *args; } GtkBindingSignal;
typedef struct { GType arg_type; union { glong long_data; gdouble double_data; gchar *string_data; } d; } GtkBindingArg;
GtkBindingSet* gtk_binding_set_new (const gchar *set_name);
set_name : |
|
Returns : |
GtkBindingSet* gtk_binding_set_by_class (gpointer object_class);
object_class : |
|
Returns : |
GtkBindingSet* gtk_binding_set_find (const gchar *set_name);
set_name : |
|
Returns : |
gboolean gtk_bindings_activate (GtkObject *object, guint keyval, GdkModifierType modifiers);
object : |
|
keyval : |
|
modifiers : |
|
Returns : |
gboolean gtk_bindings_activate_event (GtkObject *object, GdkEventKey *event);
Looks up key bindings for object
to find one matching
event
, and if one was found, activate it.
object : |
a GtkObject (generally must be a widget) |
event : |
a GdkEventKey |
Returns : | TRUE if a matching key binding was found
|
gboolean gtk_binding_set_activate (GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers, GtkObject *object);
binding_set : |
|
keyval : |
|
modifiers : |
|
object : |
|
Returns : |
void gtk_binding_entry_clear (GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers);
binding_set : |
|
keyval : |
|
modifiers : |
void gtk_binding_entry_add_signal (GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers, const gchar *signal_name, guint n_args, ...);
binding_set : |
|
keyval : |
|
modifiers : |
|
signal_name : |
|
n_args : |
|
... : |
void gtk_binding_set_add_path (GtkBindingSet *binding_set, GtkPathType path_type, const gchar *path_pattern, GtkPathPriorityType priority);
binding_set : |
|
path_type : |
|
path_pattern : |
|
priority : |
void gtk_binding_entry_remove (GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers);
binding_set : |
|
keyval : |
|
modifiers : |
void gtk_binding_entry_add_signall (GtkBindingSet *binding_set, guint keyval, GdkModifierType modifiers, const gchar *signal_name, GSList *binding_args);
binding_set : |
|
keyval : |
|
modifiers : |
|
signal_name : |
|
binding_args : |