Gtk.BindingSet¶
Fields¶
Name | Type | Access | Description |
---|---|---|---|
class_branch_pspecs | [object ] |
r/w | unused |
current | Gtk.BindingEntry |
r/w | implementation detail |
entries | Gtk.BindingEntry |
r/w | the key binding entries in this binding set |
parsed | int |
r/w | whether this binding set stems from a CSS file and is reset upon theme changes |
priority | int |
r/w | unused |
set_name | str |
r/w | unique name of this binding set |
widget_class_pspecs | [object ] |
r/w | unused |
widget_path_pspecs | [object ] |
r/w | unused |
Methods¶
class | find (set_name) |
activate (keyval, modifiers, object) |
|
add_path (path_type, path_pattern, priority) |
Details¶
-
class
Gtk.
BindingSet
¶ A binding set maintains a list of activatable key bindings. A single binding set can match multiple types of widgets. Similar to style contexts, can be matched by any information contained in a widgets
Gtk.WidgetPath
. When a binding within a set is matched upon activation, an action signal is emitted on the target widget to carry out the actual activation.-
classmethod
find
(set_name)[source]¶ Parameters: set_name ( str
) – unique binding set nameReturns: None
or the specified binding setReturn type: Gtk.BindingSet
orNone
Find a binding set by its globally unique name.
The set_name can either be a name used for gtk_binding_set_new() or the type name of a class used in gtk_binding_set_by_class().
-
activate
(keyval, modifiers, object)[source]¶ Parameters: - keyval (
int
) – key value of the binding - modifiers (
Gdk.ModifierType
) – key modifier of the binding - object (
GObject.Object
) – object to activate when binding found
Returns: True
if a binding was found and activatedReturn type: Find a key binding matching keyval and modifiers within self and activate the binding on object.
- keyval (
-
add_path
(path_type, path_pattern, priority)[source]¶ Parameters: - path_type (
Gtk.PathType
) – path type the pattern applies to - path_pattern (
str
) – the actual match pattern - priority (
Gtk.PathPriorityType
) – binding priority
This function was used internally by the GtkRC parsing mechanism to assign match patterns to
Gtk.BindingSet
structures.In GTK+ 3, these match patterns are unused.
Deprecated since version 3.0.
- path_type (
-
classmethod