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:
Robert Bragg
2013-01-21 01:18:25 +00:00
parent 88d8bd84f2
commit 013548c109
4 changed files with 108 additions and 0 deletions

View File

@ -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);
}