renderer: expose CoglOutputs
This adds a cogl_renderer_foreach_output() function that can be used to iterate the display outputs for a particular renderer. This also updates cogl-info to use this new api so it can dump out all the output information. Reviewed-by: Owen W. Taylor <otaylor@fishsoup.net> (cherry picked from commit a2abf4c4c1fd5aeafd761f965d07a0fe9a362afc)
This commit is contained in:
@ -631,3 +631,17 @@ cogl_renderer_get_driver (CoglRenderer *renderer)
|
||||
|
||||
return renderer->driver;
|
||||
}
|
||||
|
||||
void
|
||||
cogl_renderer_foreach_output (CoglRenderer *renderer,
|
||||
CoglOutputCallback callback,
|
||||
void *user_data)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
_COGL_RETURN_IF_FAIL (renderer->connected);
|
||||
_COGL_RETURN_IF_FAIL (callback != NULL);
|
||||
|
||||
for (l = renderer->outputs; l; l = l->next)
|
||||
callback (l->data, user_data);
|
||||
}
|
||||
|
Reference in New Issue
Block a user