Companion
object Companion
Functions
Link copied to clipboard
Checks that @result is a #GTask, and that @source_object is its source object (or that @source_object is null and @result has no source object). This can be used in g_return_if_fail() checks.
Link copied to clipboard
fun reportError(sourceObject: <Error class: unknown class>? = null, callback: AsyncReadyCallback?, sourceTag: <Error class: unknown class>? = null, error: <Error class: unknown class>)
Creates a #GTask and then immediately calls g_task_return_error() on it. Use this in the wrapper function of an asynchronous method when you want to avoid even calling the virtual method. You can then use g_async_result_is_tagged() in the finish method wrapper to check if the result there is tagged as having been created by the wrapper method, and deal with it appropriately if so.