Top | ![]() |
![]() |
![]() |
![]() |
void | gtk_shortcut_action_print () |
gboolean | gtk_shortcut_action_activate () |
const char * | gtk_signal_action_get_signal_name () |
GtkShortcutAction is the object used to describe what a GtkShortcut should
do when triggered. To activate a GtkShortcutAction manually,
gtk_shortcut_action_activate()
can be called.
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.
GTK provides various actions:
GtkMnemonicAction: a shortcut action that calls gtk_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 gtk_widget_activate()
GtkNamedAction: a shortcut action that calls gtk_widget_activate_action()
GtkGActionAction: a shortcut action that activates a given GAction
GtkNothingAction: a shortcut action that does nothing
void gtk_shortcut_action_print (GtkShortcutAction *self
,GString *string
);
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.
gboolean gtk_shortcut_action_activate (GtkShortcutAction *self
,GtkShortcutActionFlags flags
,GtkWidget *widget
,GVariant *args
);
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, FALSE
will be returned.