Class

GtkShortcut

Description [src]

final class Gtk.Shortcut : GObject.Object
{
  /* No available fields */
}

A GtkShortcut describes a keyboard shortcut.

It contains a description of how to trigger the shortcut via a GtkShortcutTrigger and a way to activate the shortcut on a widget via a GtkShortcutAction.

The actual work is usually done via GtkShortcutController, 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 GtkWidgets that make it easier to use shortcuts in GTK.

GtkShortcut 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.

Hierarchy

hierarchy this GtkShortcut ancestor_0 GObject ancestor_0--this

Ancestors

Constructors

gtk_shortcut_new

Creates a new GtkShortcut that is triggered by trigger and then activates action.

gtk_shortcut_new_with_arguments

Creates a new GtkShortcut that is triggered by trigger and then activates action with arguments given by format_string.

Instance methods

gtk_shortcut_get_action

Gets the action that is activated by this shortcut.

gtk_shortcut_get_arguments

Gets the arguments that are passed when activating the shortcut.

gtk_shortcut_get_trigger

Gets the trigger used to trigger self.

gtk_shortcut_set_action

Sets the new action for self to be action.

gtk_shortcut_set_arguments

Sets the arguments to pass when activating the shortcut.

gtk_shortcut_set_trigger

Sets the new trigger for self to be trigger.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Gtk.Shortcut:action

The action that gets activated by this shortcut.

Gtk.Shortcut:arguments

Arguments passed to activation.

Gtk.Shortcut:trigger

The trigger that triggers this shortcut.

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct GtkShortcutClass {
  GObjectClass parent_class;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.