It derives from <GObject>.
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
<GtkShortcut> object.
To activate a <GtkShortcutAction> manually,
shortcut-action:activate? can be
called.
GTK provides various actions:
<GtkMnemonicAction>: a shortcut action that
calls widget:mnemonic-activate?
<GtkCallbackAction>: a shortcut action that
invokes a given callback
<GtkSignalAction>: a shortcut action that
emits a given signal
<GtkActivateAction>: a shortcut action that
calls widget:activate?
<GtkNamedAction>: a shortcut action that calls
widget:activate-action?
<GtkNothingAction>: a shortcut action that
does nothing
Activates the action on the widget with the given args.
Note that some actions ignore the passed in flags, widget or args.
Activation of an action can fail for various reasons. If the action is
not supported by the widget, if the args don’t match the
action or if the activation otherwise had no effect, #f will be
returned.
Passed: a <GtkShortcutAction>.
Passed: a <GtkShortcutActionFlags>, or
a list of its symbols, or one of them.
flags to activate with
Passed: a <GtkWidget>.
Target of the activation
Passed, or left out: a <GVariant>, or
#f.
arguments to pass
Returned: a boolean.
#t if this action was activated successfully
Tries to parse the given string into an action.
On success, the parsed action is returned. When parsing failed,
#f is returned.
The accepted strings are:
nothing, for <GtkNothingAction>
activate, for <GtkActivateAction>
mnemonic-activate, for
<GtkMnemonicAction>
action(NAME), for a <GtkNamedAction>
for the action named NAME
signal(NAME), for a <GtkSignalAction>
for the signal NAME
Passed: a string.
the string to parse
Returned: a <GtkShortcutAction>, or
#f.
a new <GtkShortcutAction>
Prints the given action into a string for the developer.
This is meant for debugging and logging.
The form of the representation may change at any time and is not guaranteed to stay identical.
Passed: a <GtkShortcutAction>.
Passed: a <GString>.
a <GString> to print into
Prints the given action into a human-readable string.
This is a small wrapper around shortcut-action:print to help when debugging.
Passed: a <GtkShortcutAction>.
Returned: a string.
a new string