gtk.shortcut_action

Module for ShortcutAction class

Types 3

gtk.shortcut_action.ShortcutAction encodes an action that can be triggered by a keyboard shortcut.

GtkShortcutActions contain functions that allow easy presentation to end users as well as being printed for debugging.

All GtkShortcutActions are immutable, you can only specify their properties during construction. If you want to change a action, you have to replace it with a new one. If you need to pass arguments to an action, these are specified by the higher-level gtk.shortcut.Shortcut object.

To activate a gtk.shortcut_action.ShortcutAction manually, gtk.shortcut_action.ShortcutAction.activate can be called.

GTK provides various actions:

Methods
GType _gType() @property
ShortcutAction self()Returns `this`, for use in `with` statements.
ShortcutActionGidBuilder builder()Get builder for [gtk.shortcut_action.ShortcutAction] Returns: New builder object
gtk.shortcut_action.ShortcutAction parseString(string string_)Tries to parse the given string into an action.
bool activate(gtk.types.ShortcutActionFlags flags, gtk.widget.Widget widget, glib.variant.Variant args = null)Activates the action on the widget with the given args.
void print(glib.string_.String string_)Prints the given action into a string for the developer.
string toString_()Prints the given action into a human-readable string.
Constructors
this(void * ptr, Flag!"Take" take)