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:
@ -31,6 +31,7 @@
|
||||
#include <cogl/cogl-types.h>
|
||||
#include <cogl/cogl-onscreen-template.h>
|
||||
#include <cogl/cogl-error.h>
|
||||
#include <cogl/cogl-output.h>
|
||||
|
||||
COGL_BEGIN_DECLS
|
||||
|
||||
@ -383,6 +384,39 @@ cogl_renderer_set_driver (CoglRenderer *renderer,
|
||||
CoglDriver
|
||||
cogl_renderer_get_driver (CoglRenderer *renderer);
|
||||
|
||||
/**
|
||||
* CoglOutputCallback:
|
||||
* @output: The current display output being iterated
|
||||
* @user_data: The user pointer passed to
|
||||
* cogl_renderer_foreach_output()
|
||||
*
|
||||
* A callback type that can be passed to
|
||||
* cogl_renderer_foreach_output() for iterating display outputs for a
|
||||
* given renderer.
|
||||
*
|
||||
* Since: 1.14
|
||||
* Stability: Unstable
|
||||
*/
|
||||
typedef void (*CoglOutputCallback) (CoglOutput *output, void *user_data);
|
||||
|
||||
/**
|
||||
* cogl_renderer_foreach_output:
|
||||
* @renderer: A connected #CoglRenderer
|
||||
* @callback: A #CoglOutputCallback to be called for each display output
|
||||
* @user_data: A user pointer to be passed to @callback
|
||||
*
|
||||
* Iterates all known display outputs for the given @renderer and
|
||||
* passes a corresponding #CoglOutput pointer to the given @callback
|
||||
* for each one, along with the given @user_data.
|
||||
*
|
||||
* Since: 1.14
|
||||
* Stability: Unstable
|
||||
*/
|
||||
void
|
||||
cogl_renderer_foreach_output (CoglRenderer *renderer,
|
||||
CoglOutputCallback callback,
|
||||
void *user_data);
|
||||
|
||||
COGL_END_DECLS
|
||||
|
||||
#endif /* __COGL_RENDERER_H__ */
|
||||
|
Reference in New Issue
Block a user