Class Shortcut
- Namespace
- Gtk
- Assembly
- Gtk-4.0.dll
public class Shortcut : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
- Inheritance
-
Shortcut
- Implements
- Inherited Members
Constructors
Shortcut(params ConstructArgument[])
[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public Shortcut(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
Shortcut(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected Shortcut(CreationData data)
Parameters
dataCreationData
Shortcut(ShortcutHandle)
protected Shortcut(ShortcutHandle handle)
Parameters
handleShortcutHandle
Fields
ActionPropertyDefinition
public static readonly Property<ShortcutAction?, Shortcut> ActionPropertyDefinition
Field Value
TriggerPropertyDefinition
public static readonly Property<ShortcutTrigger?, Shortcut> TriggerPropertyDefinition
Field Value
Properties
Action
public ShortcutAction? Action { get; set; }
Property Value
Trigger
public ShortcutTrigger? Trigger { get; set; }
Property Value
Methods
GetAction()
public ShortcutAction? GetAction()
Returns
GetArguments()
public Variant? GetArguments()
Returns
GetGType()
public static Type GetGType()
Returns
GetTrigger()
public ShortcutTrigger? GetTrigger()
Returns
New(ShortcutTrigger?, ShortcutAction?)
public static Shortcut New(ShortcutTrigger? trigger, ShortcutAction? action)
Parameters
triggerShortcutTriggeractionShortcutAction
Returns
NewFromPointer(nint, bool)
Creates a new managed Shortcut instance for a given pointer.
public static Shortcut NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new Shortcut and sets the properties specified by the construct arguments.
public static Shortcut NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
SetAction(ShortcutAction?)
public void SetAction(ShortcutAction? action)
Parameters
actionShortcutAction
SetArguments(Variant?)
public void SetArguments(Variant? args)
Parameters
argsVariant
SetTrigger(ShortcutTrigger?)
public void SetTrigger(ShortcutTrigger? trigger)
Parameters
triggerShortcutTrigger