Table of Contents

Class Task

Namespace
Gio.Internal
Assembly
Gio-2.0.dll
public class Task
Inheritance
Task
Inherited Members

Methods

AttachSource(IntPtr, SourceHandle, SourceFunc)

Calls native method g_task_attach_source. Version: 2.36

[Version("2.36")]
public static extern void AttachSource(IntPtr task, SourceHandle source, SourceFunc callback)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

source SourceHandle

Transfer ownership: None Nullable: False

callback SourceFunc

Transfer ownership: None Nullable: False

GetCancellable(IntPtr)

Calls native method g_task_get_cancellable. Version: 2.36

[Version("2.36")]
public static extern IntPtr GetCancellable(IntPtr task)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

Returns

IntPtr

Transfer ownership: None Nullable: True

GetCheckCancellable(IntPtr)

Calls native method g_task_get_check_cancellable. Version: 2.36

[Version("2.36")]
public static extern bool GetCheckCancellable(IntPtr task)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

Returns

bool

Transfer ownership: None Nullable: False

GetCompleted(IntPtr)

Calls native method g_task_get_completed. Version: 2.44

[Version("2.44")]
public static extern bool GetCompleted(IntPtr task)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

Returns

bool

Transfer ownership: None Nullable: False

GetContext(IntPtr)

Calls native method g_task_get_context. Version: 2.36

[Version("2.36")]
public static extern MainContextUnownedHandle GetContext(IntPtr task)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

Returns

MainContextUnownedHandle

Transfer ownership: None Nullable: False

GetGType()

Calls native function g_task_get_type.

public static extern nuint GetGType()

Returns

nuint

Transfer ownership: None Nullable: False

GetName(IntPtr)

Calls native method g_task_get_name. Version: 2.60

[Version("2.60")]
public static extern NullableUtf8StringUnownedHandle GetName(IntPtr task)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

Returns

NullableUtf8StringUnownedHandle

Transfer ownership: None Nullable: True

GetPriority(IntPtr)

Calls native method g_task_get_priority. Version: 2.36

[Version("2.36")]
public static extern int GetPriority(IntPtr task)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

Returns

int

Transfer ownership: None Nullable: False

GetReturnOnCancel(IntPtr)

Calls native method g_task_get_return_on_cancel. Version: 2.36

[Version("2.36")]
public static extern bool GetReturnOnCancel(IntPtr task)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

Returns

bool

Transfer ownership: None Nullable: False

GetSourceObject(IntPtr)

Calls native method g_task_get_source_object. Version: 2.36

[Version("2.36")]
public static extern IntPtr GetSourceObject(IntPtr task)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

Returns

IntPtr

Transfer ownership: None Nullable: True

GetSourceTag(IntPtr)

Calls native method g_task_get_source_tag. Version: 2.36

[Version("2.36")]
public static extern IntPtr GetSourceTag(IntPtr task)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

Returns

IntPtr

Transfer ownership: None Nullable: True

GetTaskData(IntPtr)

Calls native method g_task_get_task_data. Version: 2.36

[Version("2.36")]
public static extern IntPtr GetTaskData(IntPtr task)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

Returns

IntPtr

Transfer ownership: None Nullable: True

HadError(IntPtr)

Calls native method g_task_had_error. Version: 2.36

[Version("2.36")]
public static extern bool HadError(IntPtr task)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

Returns

bool

Transfer ownership: None Nullable: False

IsValid(IntPtr, IntPtr)

Calls native function g_task_is_valid. Version: 2.36

[Version("2.36")]
public static extern bool IsValid(IntPtr result, IntPtr sourceObject)

Parameters

result IntPtr

Transfer ownership: None Nullable: False

sourceObject IntPtr

Transfer ownership: None Nullable: True

Returns

bool

Transfer ownership: None Nullable: False

New(IntPtr, IntPtr, AsyncReadyCallback, IntPtr)

Calls native constructor g_task_new. Version: 2.36

[Version("2.36")]
public static extern IntPtr New(IntPtr sourceObject, IntPtr cancellable, AsyncReadyCallback callback, IntPtr callbackData)

Parameters

sourceObject IntPtr

Transfer ownership: None Nullable: True

cancellable IntPtr

Transfer ownership: None Nullable: True

callback AsyncReadyCallback

Transfer ownership: None Nullable: True

callbackData IntPtr

Transfer ownership: None Nullable: True

Returns

IntPtr

Transfer ownership: Full Nullable: False

PropagateBoolean(IntPtr, out ErrorOwnedHandle)

Calls native method g_task_propagate_boolean. Version: 2.36

[Version("2.36")]
public static extern bool PropagateBoolean(IntPtr task, out ErrorOwnedHandle error)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

error ErrorOwnedHandle

Returns

bool

Transfer ownership: None Nullable: False

PropagateInt(IntPtr, out ErrorOwnedHandle)

Calls native method g_task_propagate_int. Version: 2.36

[Version("2.36")]
public static extern long PropagateInt(IntPtr task, out ErrorOwnedHandle error)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

error ErrorOwnedHandle

Returns

long

Transfer ownership: None Nullable: False

PropagatePointer(IntPtr, out ErrorOwnedHandle)

Calls native method g_task_propagate_pointer. Version: 2.36

[Version("2.36")]
public static extern IntPtr PropagatePointer(IntPtr task, out ErrorOwnedHandle error)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

error ErrorOwnedHandle

Returns

IntPtr

Transfer ownership: Full Nullable: True

ReportError(IntPtr, AsyncReadyCallback, IntPtr, IntPtr, ErrorUnownedHandle)

Calls native function g_task_report_error. Version: 2.36

[Version("2.36")]
public static extern void ReportError(IntPtr sourceObject, AsyncReadyCallback callback, IntPtr callbackData, IntPtr sourceTag, ErrorUnownedHandle error)

Parameters

sourceObject IntPtr

Transfer ownership: None Nullable: True

callback AsyncReadyCallback

Transfer ownership: None Nullable: True

callbackData IntPtr

Transfer ownership: None Nullable: True

sourceTag IntPtr

Transfer ownership: None Nullable: True

error ErrorUnownedHandle

Transfer ownership: Full Nullable: False

ReturnBoolean(IntPtr, bool)

Calls native method g_task_return_boolean. Version: 2.36

[Version("2.36")]
public static extern void ReturnBoolean(IntPtr task, bool result)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

result bool

Transfer ownership: None Nullable: False

ReturnError(IntPtr, ErrorUnownedHandle)

Calls native method g_task_return_error. Version: 2.36

[Version("2.36")]
public static extern void ReturnError(IntPtr task, ErrorUnownedHandle error)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

error ErrorUnownedHandle

Transfer ownership: Full Nullable: False

ReturnErrorIfCancelled(IntPtr)

Calls native method g_task_return_error_if_cancelled. Version: 2.36

[Version("2.36")]
public static extern bool ReturnErrorIfCancelled(IntPtr task)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

Returns

bool

Transfer ownership: None Nullable: False

ReturnInt(IntPtr, long)

Calls native method g_task_return_int. Version: 2.36

[Version("2.36")]
public static extern void ReturnInt(IntPtr task, long result)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

result long

Transfer ownership: None Nullable: False

ReturnNewErrorLiteral(IntPtr, Quark, int, NonNullableUtf8StringHandle)

Calls native method g_task_return_new_error_literal. Version: 2.80

[Version("2.80")]
public static extern void ReturnNewErrorLiteral(IntPtr task, Quark domain, int code, NonNullableUtf8StringHandle message)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

domain Quark

Transfer ownership: None Nullable: False

code int

Transfer ownership: None Nullable: False

message NonNullableUtf8StringHandle

Transfer ownership: None Nullable: False

ReturnPointer(IntPtr, IntPtr, DestroyNotify)

Calls native method g_task_return_pointer. Version: 2.36

[Version("2.36")]
public static extern void ReturnPointer(IntPtr task, IntPtr result, DestroyNotify resultDestroy)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

result IntPtr

Transfer ownership: Full Nullable: True

resultDestroy DestroyNotify

Transfer ownership: None Nullable: True

ReturnValue(IntPtr, ValueHandle)

Calls native method g_task_return_value. Version: 2.64

[Version("2.64")]
public static extern void ReturnValue(IntPtr task, ValueHandle result)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

result ValueHandle

Transfer ownership: None Nullable: True

RunInThread(IntPtr, TaskThreadFunc)

Calls native method g_task_run_in_thread. Version: 2.36

[Version("2.36")]
public static extern void RunInThread(IntPtr task, TaskThreadFunc taskFunc)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

taskFunc TaskThreadFunc

Transfer ownership: None Nullable: False

RunInThreadSync(IntPtr, TaskThreadFunc)

Calls native method g_task_run_in_thread_sync. Version: 2.36

[Version("2.36")]
public static extern void RunInThreadSync(IntPtr task, TaskThreadFunc taskFunc)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

taskFunc TaskThreadFunc

Transfer ownership: None Nullable: False

SetCheckCancellable(IntPtr, bool)

Calls native method g_task_set_check_cancellable. Version: 2.36

[Version("2.36")]
public static extern void SetCheckCancellable(IntPtr task, bool checkCancellable)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

checkCancellable bool

Transfer ownership: None Nullable: False

SetName(IntPtr, NullableUtf8StringHandle)

Calls native method g_task_set_name. Version: 2.60

[Version("2.60")]
public static extern void SetName(IntPtr task, NullableUtf8StringHandle name)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

name NullableUtf8StringHandle

Transfer ownership: None Nullable: True

SetPriority(IntPtr, int)

Calls native method g_task_set_priority. Version: 2.36

[Version("2.36")]
public static extern void SetPriority(IntPtr task, int priority)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

priority int

Transfer ownership: None Nullable: False

SetReturnOnCancel(IntPtr, bool)

Calls native method g_task_set_return_on_cancel. Version: 2.36

[Version("2.36")]
public static extern bool SetReturnOnCancel(IntPtr task, bool returnOnCancel)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

returnOnCancel bool

Transfer ownership: None Nullable: False

Returns

bool

Transfer ownership: None Nullable: False

SetSourceTag(IntPtr, IntPtr)

Calls native method g_task_set_source_tag. Version: 2.36

[Version("2.36")]
public static extern void SetSourceTag(IntPtr task, IntPtr sourceTag)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

sourceTag IntPtr

Transfer ownership: None Nullable: True

SetStaticName(IntPtr, NullableUtf8StringHandle)

Calls native method g_task_set_static_name. Version: 2.76

[Version("2.76")]
public static extern void SetStaticName(IntPtr task, NullableUtf8StringHandle name)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

name NullableUtf8StringHandle

Transfer ownership: None Nullable: True

SetTaskData(IntPtr, IntPtr, DestroyNotify)

Calls native method g_task_set_task_data. Version: 2.36

[Version("2.36")]
public static extern void SetTaskData(IntPtr task, IntPtr taskData, DestroyNotify taskDataDestroy)

Parameters

task IntPtr

Transfer ownership: None Nullable: False

taskData IntPtr

Transfer ownership: None Nullable: True

taskDataDestroy DestroyNotify

Transfer ownership: None Nullable: True