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
constructArgumentsConstructArgument[]
Cancellable(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected Cancellable(CreationData data)
Parameters
dataCreationData
Cancellable(CancellableHandle)
protected Cancellable(CancellableHandle handle)
Parameters
handleCancellableHandle
Fields
CancelledSignal
Signal Descriptor for OnCancelled.
public static readonly Signal<Cancellable> CancelledSignal
Field Value
Methods
Cancel()
public void Cancel()
Connect(Callback)
[Version("2.22")]
public ulong Connect(Callback callback)
Parameters
callbackCallback
Returns
Disconnect(ulong)
[Version("2.22")]
public void Disconnect(ulong handlerId)
Parameters
handlerIdulong
GetCurrent()
public static Cancellable? GetCurrent()
Returns
GetFd()
public int GetFd()
Returns
GetGType()
public static Type GetGType()
Returns
IsCancelled()
public bool IsCancelled()
Returns
MakePollfd(PollFD)
[Version("2.22")]
public bool MakePollfd(PollFD pollfd)
Parameters
pollfdPollFD
Returns
New()
public static Cancellable New()
Returns
NewFromPointer(nint, bool)
Creates a new managed Cancellable instance for a given pointer.
public static Cancellable NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new Cancellable and sets the properties specified by the construct arguments.
public static Cancellable NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
PopCurrent()
public void PopCurrent()
PushCurrent()
public void PushCurrent()
ReleaseFd()
[Version("2.22")]
public void ReleaseFd()
Reset()
public void Reset()
SetErrorIfCancelled()
public bool SetErrorIfCancelled()
Returns
SourceNew()
[Version("2.28")]
public Source SourceNew()
Returns
Events
OnCancelled
public event SignalHandler<Cancellable> OnCancelled