Table of Contents

Class Cursor

Namespace
Gdk
Assembly
Gdk-4.0.dll
public class Cursor : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
Inheritance
Cursor
Implements
Inherited Members

Constructors

Cursor(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 Cursor(params ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

Cursor(CreationData)

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

Parameters

data CreationData

Cursor(CursorHandle)

protected Cursor(CursorHandle handle)

Parameters

handle CursorHandle

Fields

FallbackPropertyDefinition

public static readonly Property<Cursor?, Cursor> FallbackPropertyDefinition

Field Value

Property<Cursor, Cursor>

HotspotXPropertyDefinition

public static readonly Property<int, Cursor> HotspotXPropertyDefinition

Field Value

Property<int, Cursor>

HotspotYPropertyDefinition

public static readonly Property<int, Cursor> HotspotYPropertyDefinition

Field Value

Property<int, Cursor>

NamePropertyDefinition

public static readonly Property<string?, Cursor> NamePropertyDefinition

Field Value

Property<string, Cursor>

TexturePropertyDefinition

public static readonly Property<Texture?, Cursor> TexturePropertyDefinition

Field Value

Property<Texture, Cursor>

Properties

Fallback

public Cursor? Fallback { get; }

Property Value

Cursor

HotspotX

public int HotspotX { get; }

Property Value

int

HotspotY

public int HotspotY { get; }

Property Value

int

Name

public string? Name { get; }

Property Value

string

Texture

public Texture? Texture { get; }

Property Value

Texture

Methods

GetFallback()

public Cursor? GetFallback()

Returns

Cursor

GetGType()

public static Type GetGType()

Returns

Type

GetHotspotX()

public int GetHotspotX()

Returns

int

GetHotspotY()

public int GetHotspotY()

Returns

int

GetName()

public string? GetName()

Returns

string

GetTexture()

public Texture? GetTexture()

Returns

Texture

NewFromCallback(CursorGetTextureCallback, Cursor?)

[Version("4.16")]
public static Cursor? NewFromCallback(CursorGetTextureCallback callback, Cursor? fallback)

Parameters

callback CursorGetTextureCallback
fallback Cursor

Returns

Cursor

NewFromName(string, Cursor?)

public static Cursor? NewFromName(string name, Cursor? fallback)

Parameters

name string
fallback Cursor

Returns

Cursor

NewFromPointer(nint, bool)

Creates a new managed Cursor instance for a given pointer.

public static Cursor NewFromPointer(nint ptr, bool ownsHandle)

Parameters

ptr nint
ownsHandle bool

Returns

Cursor

NewFromTexture(Texture, int, int, Cursor?)

public static Cursor NewFromTexture(Texture texture, int hotspotX, int hotspotY, Cursor? fallback)

Parameters

texture Texture
hotspotX int
hotspotY int
fallback Cursor

Returns

Cursor

NewWithProperties(ConstructArgument[])

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

public static Cursor NewWithProperties(ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

The properties to set.

Returns

Cursor