gtk.shortcut

Module for [Shortcut] class

Types 3

A gtk.shortcut.Shortcut describes a keyboard shortcut.

It contains a description of how to trigger the shortcut via a gtk.shortcut_trigger.ShortcutTrigger and a way to activate the shortcut on a widget via a gtk.shortcut_action.ShortcutAction.

The actual work is usually done via gtk.shortcut_controller.ShortcutController, which decides if and when to activate a shortcut. Using that controller directly however is rarely necessary as various higher level convenience APIs exist on gtk.widget.Widgets that make it easier to use shortcuts in GTK.

gtk.shortcut.Shortcut does provide functionality to make it easy for users to work with shortcuts, either by providing informational strings for display purposes or by allowing shortcuts to be configured.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
Shortcut self() nothrowReturns `this`, for use in `with` statements.
ShortcutGidBuilder builder() static nothrowGet builder for [gtk.shortcut.Shortcut] Returns: New builder object
gtk.shortcut_action.ShortcutAction action() @property nothrowGet `action` property. Returns: The action that gets activated by this shortcut.
void action(gtk.shortcut_action.ShortcutAction propval) @property nothrowSet `action` property. Params: propval = The action that gets activated by this shortcut.
glib.variant.Variant arguments() @property nothrowGet `arguments` property. Returns: Arguments passed to activation.
void arguments(glib.variant.Variant propval) @property nothrowSet `arguments` property. Params: propval = Arguments passed to activation.
gtk.shortcut_trigger.ShortcutTrigger trigger() @property nothrowGet `trigger` property. Returns: The trigger that triggers this shortcut.
void trigger(gtk.shortcut_trigger.ShortcutTrigger propval) @property nothrowSet `trigger` property. Params: propval = The trigger that triggers this shortcut.
gtk.shortcut_action.ShortcutAction getAction() nothrowGets the action that is activated by this shortcut. Returns: the action
glib.variant.Variant getArguments() nothrowGets the arguments that are passed when activating the shortcut. Returns: the arguments
gtk.shortcut_trigger.ShortcutTrigger getTrigger() nothrowGets the trigger used to trigger self. Returns: the trigger used
void setAction(gtk.shortcut_action.ShortcutAction action = null) nothrowSets the new action for self to be action.
void setArguments(glib.variant.Variant args = null) nothrowSets the arguments to pass when activating the shortcut.
void setTrigger(gtk.shortcut_trigger.ShortcutTrigger trigger = null) nothrowSets the new trigger for self to be trigger.
Constructors
this(void * ptr, Flag!"Take" take)
this(gtk.shortcut_trigger.ShortcutTrigger trigger = null, gtk.shortcut_action.ShortcutAction action = null)Creates a new [gtk.shortcut.Shortcut] that is triggered by trigger and then activates action.

Fluent builder implementation template for gtk.shortcut.Shortcut

Methods
T action(gtk.shortcut_action.ShortcutAction propval) nothrowSet `action` property. Params: propval = The action that gets activated by this shortcut. Returns: Builder instance for fluent chaining
T arguments(glib.variant.Variant propval) nothrowSet `arguments` property. Params: propval = Arguments passed to activation. Returns: Builder instance for fluent chaining
T trigger(gtk.shortcut_trigger.ShortcutTrigger propval) nothrowSet `trigger` property. Params: propval = The trigger that triggers this shortcut. Returns: Builder instance for fluent chaining

Fluent builder for gtk.shortcut.Shortcut

Methods
Shortcut build() nothrowCreate object from builder. Returns: New object