Table of Contents

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

constructArguments ConstructArgument[]

Shortcut(CreationData)

[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected Shortcut(CreationData data)

Parameters

data CreationData

Shortcut(ShortcutHandle)

protected Shortcut(ShortcutHandle handle)

Parameters

handle ShortcutHandle

Fields

ActionPropertyDefinition

public static readonly Property<ShortcutAction?, Shortcut> ActionPropertyDefinition

Field Value

Property<ShortcutAction, Shortcut>

TriggerPropertyDefinition

public static readonly Property<ShortcutTrigger?, Shortcut> TriggerPropertyDefinition

Field Value

Property<ShortcutTrigger, Shortcut>

Properties

Action

public ShortcutAction? Action { get; set; }

Property Value

ShortcutAction

Trigger

public ShortcutTrigger? Trigger { get; set; }

Property Value

ShortcutTrigger

Methods

GetAction()

public ShortcutAction? GetAction()

Returns

ShortcutAction

GetArguments()

public Variant? GetArguments()

Returns

Variant

GetGType()

public static Type GetGType()

Returns

Type

GetTrigger()

public ShortcutTrigger? GetTrigger()

Returns

ShortcutTrigger

New(ShortcutTrigger?, ShortcutAction?)

public static Shortcut New(ShortcutTrigger? trigger, ShortcutAction? action)

Parameters

trigger ShortcutTrigger
action ShortcutAction

Returns

Shortcut

NewFromPointer(nint, bool)

Creates a new managed Shortcut instance for a given pointer.

public static Shortcut NewFromPointer(nint ptr, bool ownsHandle)

Parameters

ptr nint
ownsHandle bool

Returns

Shortcut

NewWithProperties(ConstructArgument[])

Creates a new Shortcut and sets the properties specified by the construct arguments.

public static Shortcut NewWithProperties(ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

The properties to set.

Returns

Shortcut

SetAction(ShortcutAction?)

public void SetAction(ShortcutAction? action)

Parameters

action ShortcutAction

SetArguments(Variant?)

public void SetArguments(Variant? args)

Parameters

args Variant

SetTrigger(ShortcutTrigger?)

public void SetTrigger(ShortcutTrigger? trigger)

Parameters

trigger ShortcutTrigger