keybinder

## keybinder keybinder |

## Synopsis

    void                (*KeybinderHandler)                 (const char *keystring,
                                                             void *user_data);
    gboolean            keybinder_bind                      (const char *keystring,
                                                             KeybinderHandler handler,
                                                             void *user_data);
    gboolean            keybinder_bind_full                 (const char *keystring,
                                                             KeybinderHandler handler,
                                                             void *user_data,
                                                             GDestroyNotify notify);
    guint32             keybinder_get_current_event_time    (void);
    void                keybinder_init                      (void);
    void                keybinder_unbind                    (const char *keystring,
                                                             KeybinderHandler handler);
    void                keybinder_unbind_all                (const char *keystring);

## Description

## Details

### KeybinderHandler ()

    void                (*KeybinderHandler)                 (const char *keystring,
                                                             void *user_data);

### keybinder_bind ()

    gboolean            keybinder_bind                      (const char *keystring,
                                                             KeybinderHandler handler,
                                                             void *user_data);

Grab a key combination globally and register a callback to be called each time the key combination is pressed.

This function is excluded from introspected bindings and is replaced by keybinder_bind_full.

`keystring` : | an accelerator description (`gtk_accelerator_parse()` format)
`handler` : | callback function
`user_data` : | data to pass to `handler`
Returns : | `TRUE` if the accelerator could be grabbed

### keybinder_bind_full ()

    gboolean            keybinder_bind_full                 (const char *keystring,
                                                             KeybinderHandler handler,
                                                             void *user_data,
                                                             GDestroyNotify notify);

Grab a key combination globally and register a callback to be called each time the key combination is pressed.

Rename to: keybinder_bind

`keystring` : | an accelerator description (`gtk_accelerator_parse()` format)
`handler` : | callback function. [scope notified]
`user_data` : | data to pass to `handler`. [closure][allow-none]
`notify` : | called when `handler` is unregistered. [allow-none]
Returns : | `TRUE` if the accelerator could be grabbed

Since 0.3.0

### keybinder_get_current_event_time ()

    guint32             keybinder_get_current_event_time    (void);

Returns : | the current event timestamp

### keybinder_init ()

    void                keybinder_init                      (void);

Initialize the keybinder library.

This function must be called after initializing GTK, before calling any other function in the library. Can only be called once.

### keybinder_unbind ()

    void                keybinder_unbind                    (const char *keystring,
                                                             KeybinderHandler handler);

Unregister a specific previously bound callback for this keystring.

This function is excluded from introspected bindings and is replaced by keybinder_unbind_all.

`keystring` : | an accelerator description (`gtk_accelerator_parse()` format)
`handler` : | callback function

### keybinder_unbind_all ()

    void                keybinder_unbind_all                (const char *keystring);

Unregister all previously bound callbacks for this keystring.

Rename to: keybinder_unbind

`keystring` : | an accelerator description (`gtk_accelerator_parse()` format)

Since 0.3.0