Class method


Declaration [src]

gtk_widget_class_add_binding (
  GtkWidgetClass* widget_class,
  guint keyval,
  GdkModifierType mods,
  GtkShortcutFunc callback,
  const char* format_string,

Description [src]

Creates a new shortcut for widget_class that calls the given callback with arguments read according to format_string.

The arguments and format string must be provided in the same way as with g_variant_new().

This function is a convenience wrapper around gtk_widget_class_add_shortcut() and must be called during class initialization. It does not provide for user_data, if you need that, you will have to use gtk_widget_class_add_shortcut() with a custom shortcut.

This class method is not directly available to language bindings


keyval guint

Key value of binding to install.

mods GdkModifierType

Key modifier of binding to install.

callback GtkShortcutFunc

The callback to call upon activation.

format_string const char*

GVariant format string for arguments or NULL for no arguments.

 The argument can be NULL.
 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.

Arguments, as given by format string.