Method

GtkWidgetadd_accelerator

Declaration [src]

void
gtk_widget_add_accelerator (
  GtkWidget* widget,
  const gchar* accel_signal,
  GtkAccelGroup* accel_group,
  guint accel_key,
  GdkModifierType accel_mods,
  GtkAccelFlags accel_flags
)

Description [src]

Installs an accelerator for this widget in accel_group that causes accel_signal to be emitted if the accelerator is activated. The accel_group needs to be added to the widget’s toplevel via gtk_window_add_accel_group(), and the signal must be of type G_SIGNAL_ACTION. Accelerators added through this function are not user changeable during runtime. If you want to support accelerators that can be changed by the user, use gtk_accel_map_add_entry() and gtk_widget_set_accel_path() or gtk_menu_item_set_accel_path() instead.

Parameters

accel_signal const gchar*
 

Widget signal to emit on accelerator activation.

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
accel_group GtkAccelGroup
 

Accel group for this widget, added to its toplevel.

 The data is owned by the caller of the function.
accel_key guint
 

GDK keyval of the accelerator.

accel_mods GdkModifierType
 

Modifier key combination of the accelerator.

accel_flags GtkAccelFlags
 

Flag accelerators, e.g. GTK_ACCEL_VISIBLE.