static VALUE binding_activate(VALUE self, VALUE keyval, VALUE modifiers, VALUE object) { return CBOOL2RVAL(gtk_binding_set_activate(_SELF(self), NUM2UINT(keyval), RVAL2MOD(modifiers), GTK_OBJECT(RVAL2GOBJ(object)))); }
static gboolean gimp_popup_key_press (GtkWidget *widget, GdkEventKey *kevent) { GtkBindingSet *binding_set; binding_set = gtk_binding_set_by_class (g_type_class_peek (GIMP_TYPE_POPUP)); /* invoke the popup's binding entries manually, because otherwise * the focus widget (GtkTreeView e.g.) would consume it */ if (gtk_binding_set_activate (binding_set, kevent->keyval, kevent->state, GTK_OBJECT (widget))) { return TRUE; } return GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, kevent); }