Declaration [src]

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().



Type: CoglContext

A CoglContext.

The data is owned by the caller of the function.

Type: int

The 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.