Companion

object Companion : RecordCompanion<MainContext, <Error class: unknown class>>

Functions

Link copied to clipboard

Returns the global-default main context. This is the main context used for main loop functions when a main loop is not explicitly specified, and corresponds to the "main" main loop. See also func@GLib.MainContext.get_thread_default.

Link copied to clipboard

Gets the thread-default #GMainContext for this thread. Asynchronous operations that want to be able to be run in contexts other than the default one should call this method or func@GLib.MainContext.ref_thread_default to get a struct@GLib.MainContext to add their struct@GLib.Sources to. (Note that even in single-threaded programs applications may sometimes want to temporarily push a non-default context, so it is not safe to assume that this will always return null if you are running in the default thread.)

Link copied to clipboard

Creates a new struct@GLib.MainContext structure.

Link copied to clipboard

Creates a new struct@GLib.MainContext structure.

Link copied to clipboard

Gets the thread-default struct@GLib.MainContext for this thread, as with func@GLib.MainContext.get_thread_default, but also adds a reference to it with method@GLib.MainContext.ref. In addition, unlike func@GLib.MainContext.get_thread_default, if the thread-default context is the global-default context, this will return that struct@GLib.MainContext (with a ref added to it) rather than returning null.

Link copied to clipboard
open override fun wrapRecordPointer(pointer: <Error class: unknown class><out <Error class: unknown class>>): MainContext

Wrap a CPointer pointing to a record of this type into its wrapper class.