Cogl.glib_source_new

function glib_source_new(context: Cogl.Context, priority: Number(gint)): GLib.Source {
    // Gjs wrapper for cogl_glib_source_new()
}
  

Creates a GLib.Source which handles Cogl's internal system event processing. This can be used as a convenience instead of Cogl.poll_renderer_get_info and Cogl.poll_renderer_dispatch in applications that are already using the GLib main loop. After this is called the GLib.Source should be attached to the main loop using g_source_attach().

Applications that manually connect to a Cogl.Renderer before they create a Cogl.Context should instead use Cogl.glib_renderer_source_new so that events may be dispatched before a context has been created. In that case you don't need to use this api in addition later, it is simply enough to use Cogl.glib_renderer_source_new instead.

<note>This api is actually just a thin convenience wrapper around Cogl.glib_renderer_source_new</note>

Since 1.10

context

A Cogl.Context

priority

The priority of the GLib.Source

Returns

a new GLib.Source