Table of Contents

Class Cancellable

Namespace
Gio
Assembly
Gio-2.0.dll
public class Cancellable : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
Inheritance
Cancellable
Implements
Inherited Members

Constructors

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

Parameters

constructArguments ConstructArgument[]

Cancellable(CreationData)

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

Parameters

data CreationData

Cancellable(CancellableHandle)

protected Cancellable(CancellableHandle handle)

Parameters

handle CancellableHandle

Fields

CancelledSignal

Signal Descriptor for OnCancelled.

public static readonly Signal<Cancellable> CancelledSignal

Field Value

Signal<Cancellable>

Methods

Cancel()

public void Cancel()

Connect(Callback)

[Version("2.22")]
public ulong Connect(Callback callback)

Parameters

callback Callback

Returns

ulong

Disconnect(ulong)

[Version("2.22")]
public void Disconnect(ulong handlerId)

Parameters

handlerId ulong

GetCurrent()

public static Cancellable? GetCurrent()

Returns

Cancellable

GetFd()

public int GetFd()

Returns

int

GetGType()

public static Type GetGType()

Returns

Type

IsCancelled()

public bool IsCancelled()

Returns

bool

MakePollfd(PollFD)

[Version("2.22")]
public bool MakePollfd(PollFD pollfd)

Parameters

pollfd PollFD

Returns

bool

New()

public static Cancellable New()

Returns

Cancellable

NewFromPointer(nint, bool)

Creates a new managed Cancellable instance for a given pointer.

public static Cancellable NewFromPointer(nint ptr, bool ownsHandle)

Parameters

ptr nint
ownsHandle bool

Returns

Cancellable

NewWithProperties(ConstructArgument[])

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

public static Cancellable NewWithProperties(ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

The properties to set.

Returns

Cancellable

PopCurrent()

public void PopCurrent()

PushCurrent()

public void PushCurrent()

ReleaseFd()

[Version("2.22")]
public void ReleaseFd()

Reset()

public void Reset()

SetErrorIfCancelled()

public bool SetErrorIfCancelled()

Returns

bool

SourceNew()

[Version("2.28")]
public Source SourceNew()

Returns

Source

Events

OnCancelled

public event SignalHandler<Cancellable> OnCancelled

Event Type

SignalHandler<Cancellable>