get_context
Description:
Gets the [struct@GLib.
MainContext] with which the source is associated.
You can call this on a source that has been destroyed, provided that the [struct@GLib.MainContext] it was attached to still exists (in which case it will return that [struct@GLib.MainContext]). In particular, you can always call this function on the source returned from [ func@GLib.main_current_source]. But calling this function on a source whose [struct@GLib.MainContext] has been destroyed is an error.
If the associated [struct@GLib.MainContext] could be destroy concurrently from a different thread, then this function is not safe to call and [ method@GLib.Source.dup_context] should be used instead.
Parameters:
| this |
a source |
Returns:
|
the main context with which the source is associated, or `NULL` if the context has not yet been added to a source |