## Bindings

Bindings — Key bindings for individual widgets

## Synopsis

    #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);

## Description

## Details

### GtkBindingSet

    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;

### GtkBindingEntry

    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;

### GtkBindingSignal

    typedef struct {
      GtkBindingSignal	*next;
      gchar			*signal_name;
      guint			 n_args;
      GtkBindingArg		*args;
    } GtkBindingSignal;

### GtkBindingArg

    typedef struct {
      GType		 arg_type;
      union {
        glong	 long_data;
        gdouble	 double_data;
        gchar	*string_data;
      } d;
    } GtkBindingArg;

### gtk_binding_set_new ()

    GtkBindingSet* gtk_binding_set_new          (const gchar *set_name);

`set_name` : |
Returns : |

### gtk_binding_set_by_class ()

    GtkBindingSet* gtk_binding_set_by_class     (gpointer object_class);

`object_class` : |
Returns : |

### gtk_binding_set_find ()

    GtkBindingSet* gtk_binding_set_find         (const gchar *set_name);

`set_name` : |
Returns : |

### gtk_bindings_activate ()

    gboolean    gtk_bindings_activate           (GtkObject *object,
                                                 guint keyval,
                                                 GdkModifierType modifiers);

`object` : |
`keyval` : |
`modifiers` : |
Returns : |

### gtk_bindings_activate_event ()

    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

### gtk_binding_set_activate ()

    gboolean    gtk_binding_set_activate        (GtkBindingSet *binding_set,
                                                 guint keyval,
                                                 GdkModifierType modifiers,
                                                 GtkObject *object);

`binding_set` : |
`keyval` : |
`modifiers` : |
`object` : |
Returns : |

### gtk_binding_entry_add

    #define	 gtk_binding_entry_add		gtk_binding_entry_clear

### gtk_binding_entry_clear ()

    void        gtk_binding_entry_clear         (GtkBindingSet *binding_set,
                                                 guint keyval,
                                                 GdkModifierType modifiers);

`binding_set` : |
`keyval` : |
`modifiers` : |

### gtk_binding_entry_add_signal ()

    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` : |
`...` : |

### gtk_binding_set_add_path ()

    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` : |

### gtk_binding_entry_remove ()

    void        gtk_binding_entry_remove        (GtkBindingSet *binding_set,
                                                 guint keyval,
                                                 GdkModifierType modifiers);

`binding_set` : |
`keyval` : |
`modifiers` : |

### gtk_binding_entry_add_signall ()

    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` : |

### gtk_binding_parse_binding ()

    guint       gtk_binding_parse_binding       (GScanner *scanner);

`scanner` : |
Returns : |