ShortcutTriggerProtocol
public protocol ShortcutTriggerProtocol : ObjectProtocol
GtkShortcutTrigger tracks how a GtkShortcut should be activated.
To find out if a GtkShortcutTrigger triggers, you can call
[methodGtk.ShortcutTrigger.trigger] on a GdkEvent.
GtkShortcutTriggers contain functions that allow easy presentation
to end users as well as being printed for debugging.
All GtkShortcutTriggers are immutable, you can only specify their
properties during construction. If you want to change a trigger, you
have to replace it with a new one.
The ShortcutTriggerProtocol protocol exposes the methods and properties of an underlying GtkShortcutTrigger instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see ShortcutTrigger.
Alternatively, use ShortcutTriggerRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkShortcutTriggerinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
shortcut_trigger_ptrDefault implementationTyped pointer to the underlying
GtkShortcutTriggerinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkShortcutTriggerinstance.Declaration
Swift
var shortcut_trigger_ptr: UnsafeMutablePointer<GtkShortcutTrigger>! { get } -
Required Initialiser for types conforming to
ShortcutTriggerProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
compare(trigger2:Extension method) The types of
trigger1andtrigger2aregconstpointeronly to allow use of this function as aGCompareFunc.They must each be a
GtkShortcutTrigger.Declaration
Swift
@inlinable func compare<ShortcutTriggerT>(trigger2: ShortcutTriggerT) -> Int where ShortcutTriggerT : ShortcutTriggerProtocol -
equal(trigger2:Extension method) Checks if
trigger1andtrigger2trigger under the same conditions.The types of
oneandtwoaregconstpointeronly to allow use of this function withGHashTable. They must each be aGtkShortcutTrigger.Declaration
Swift
@inlinable func equal<ShortcutTriggerT>(trigger2: ShortcutTriggerT) -> Bool where ShortcutTriggerT : ShortcutTriggerProtocol -
hash()Extension methodGenerates a hash value for a
GtkShortcutTrigger.The output of this function is guaranteed to be the same for a given value only per-process. It may change between different processor architectures or even different versions of GTK. Do not use this function as a basis for building protocols or file formats.
The types of
triggerisgconstpointeronly to allow use of this function withGHashTable. They must each be aGtkShortcutTrigger.Declaration
Swift
@inlinable func hash() -> Int -
print(string:Extension method) Prints the given trigger 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.
Declaration
Swift
@inlinable func print<StringTypeT>(string: StringTypeT) where StringTypeT : StringProtocol -
printLabel(display:Extension methodstring: ) Prints the given trigger into a string.
This function is returning a translated string for presentation to end users for example in menu items or in help texts.
The
displayin use may influence the resulting string in various forms, such as resolving hardware keycodes or by causing display-specific modifier names.The form of the representation may change at any time and is not guaranteed to stay identical.
Declaration
Swift
@inlinable func printLabel<DisplayT, StringTypeT>(display: DisplayT, string: StringTypeT) -> Bool where DisplayT : DisplayProtocol, StringTypeT : StringProtocol -
toLabel(display:Extension method) Gets textual representation for the given trigger.
This function is returning a translated string for presentation to end users for example in menu items or in help texts.
The
displayin use may influence the resulting string in various forms, such as resolving hardware keycodes or by causing display-specific modifier names.The form of the representation may change at any time and is not guaranteed to stay identical.
Declaration
Swift
@inlinable func toLabel<DisplayT>(display: DisplayT) -> String! where DisplayT : DisplayProtocol -
toString()Extension methodPrints the given trigger into a human-readable string.
This is a small wrapper around [method
Gtk.ShortcutTrigger.print] to help when debugging.Declaration
Swift
@inlinable func toString() -> String! -
trigger(event:Extension methodenableMnemonics: ) Checks if the given
eventtriggersself.Declaration
Swift
@inlinable func trigger<EventT>(event: EventT, enableMnemonics: Bool) -> GdkKeyMatch where EventT : EventProtocol
View on GitHub
Install in Dash
ShortcutTriggerProtocol Protocol Reference