Function
Coglglib_source_new
since: 14
Declaration [src]
GSource*
cogl_glib_source_new (
CoglContext* context,
int priority
)
Description [src]
Creates a GSource 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 GSource should be attached to the main loop using g_source_attach().
Applications that manually connect to a CoglRenderer before they
create a CoglContext 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.
This api is actually just a thin convenience wrapper around
cogl_glib_renderer_source_new()
Available since: 14
Parameters
context-
Type:
CoglContextA
CoglContext.The data is owned by the caller of the function. priority-
Type:
intThe priority of the
GSource.
Return value
Type: GSource
A new GSource.
| The caller of the function takes ownership of the data, and is responsible for freeing it. |