~noskcaj/ubuntu/trusty/cogl/1.16.2

« back to all changes in this revision

Viewing changes to cogl/cogl-renderer.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha, Jeremy Bicha, Rico Tzschichholz
  • Date: 2013-02-26 16:43:25 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20130226164325-t4z9rylpa20v0p6q
Tags: 1.13.4-0ubuntu1
[ Jeremy Bicha ]
* New upstream release
  - soname bump
* debian/control.in:
  - Bump minimum glib to 2.32
  - Drop obsolete breaks/replaces
  - Bump libclutter-1.0-dev breaks for soname transition
* debian/libcogl-dev.install:
  - Add some missing files

[ Rico Tzschichholz ]
* debian/control.in:
  - Build-depend on libxrandr-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#ifndef __COGL_RENDERER_H__
29
29
#define __COGL_RENDERER_H__
30
30
 
31
 
#include <glib.h>
32
 
 
33
31
#include <cogl/cogl-types.h>
34
32
#include <cogl/cogl-onscreen-template.h>
 
33
#include <cogl/cogl-error.h>
 
34
#include <cogl/cogl-output.h>
35
35
 
36
 
G_BEGIN_DECLS
 
36
COGL_BEGIN_DECLS
37
37
 
38
38
/**
39
39
 * SECTION:cogl-renderer
75
75
 */
76
76
#define COGL_RENDERER_ERROR cogl_renderer_error_quark ()
77
77
 
78
 
GQuark
 
78
uint32_t
79
79
cogl_renderer_error_quark (void);
80
80
 
81
81
typedef struct _CoglRenderer CoglRenderer;
104
104
 *
105
105
 * While the renderer is unconnected it can be configured so that
106
106
 * applications may specify backend constraints, such as "must use
107
 
 * x11" for example via cogl_renderer_add_criteria().
 
107
 * x11" for example via cogl_renderer_add_constraint().
108
108
 *
109
109
 * There are also some platform specific configuration apis such
110
110
 * as cogl_xlib_renderer_set_foreign_display() that may also be
220
220
 * cogl_renderer_check_onscreen_template:
221
221
 * @renderer: A #CoglRenderer
222
222
 * @onscreen_template: A #CoglOnscreenTemplate
223
 
 * @error: A pointer to a #GError for reporting exceptions
 
223
 * @error: A pointer to a #CoglError for reporting exceptions
224
224
 *
225
225
 * Tests if a given @onscreen_template can be supported with the given
226
226
 * @renderer.
233
233
CoglBool
234
234
cogl_renderer_check_onscreen_template (CoglRenderer *renderer,
235
235
                                       CoglOnscreenTemplate *onscreen_template,
236
 
                                       GError **error);
 
236
                                       CoglError **error);
237
237
 
238
238
/* Final connection API */
239
239
 
240
240
/**
241
241
 * cogl_renderer_connect:
242
242
 * @renderer: An unconnected #CoglRenderer
243
 
 * @error a pointer to a #GError for reporting exceptions
 
243
 * @error: a pointer to a #CoglError for reporting exceptions
244
244
 *
245
245
 * Connects the configured @renderer. Renderer connection isn't a
246
246
 * very active process, it basically just means validating that
253
253
 * Stability: unstable
254
254
 */
255
255
CoglBool
256
 
cogl_renderer_connect (CoglRenderer *renderer, GError **error);
 
256
cogl_renderer_connect (CoglRenderer *renderer, CoglError **error);
257
257
 
258
258
/**
259
259
 * CoglRendererConstraint:
327
327
/**
328
328
 * CoglDriver:
329
329
 * @COGL_DRIVER_ANY: Implies no preference for which driver is used
 
330
 * @COGL_DRIVER_NOP: A No-Op driver.
330
331
 * @COGL_DRIVER_GL: An OpenGL driver.
 
332
 * @COGL_DRIVER_GL3: An OpenGL driver using the core GL 3.1 profile
331
333
 * @COGL_DRIVER_GLES1: An OpenGL ES 1.1 driver.
332
334
 * @COGL_DRIVER_GLES2: An OpenGL ES 2.0 driver.
333
335
 *
340
342
typedef enum
341
343
{
342
344
  COGL_DRIVER_ANY,
 
345
  COGL_DRIVER_NOP,
343
346
  COGL_DRIVER_GL,
 
347
  COGL_DRIVER_GL3,
344
348
  COGL_DRIVER_GLES1,
345
349
  COGL_DRIVER_GLES2
346
350
} CoglDriver;
380
384
CoglDriver
381
385
cogl_renderer_get_driver (CoglRenderer *renderer);
382
386
 
383
 
G_END_DECLS
 
387
/**
 
388
 * CoglOutputCallback:
 
389
 * @output: The current display output being iterated
 
390
 * @user_data: The user pointer passed to
 
391
 *             cogl_renderer_foreach_output()
 
392
 *
 
393
 * A callback type that can be passed to
 
394
 * cogl_renderer_foreach_output() for iterating display outputs for a
 
395
 * given renderer.
 
396
 *
 
397
 * Since: 1.14
 
398
 * Stability: Unstable
 
399
 */
 
400
typedef void (*CoglOutputCallback) (CoglOutput *output, void *user_data);
 
401
 
 
402
/**
 
403
 * cogl_renderer_foreach_output:
 
404
 * @renderer: A connected #CoglRenderer
 
405
 * @callback: A #CoglOutputCallback to be called for each display output
 
406
 * @user_data: A user pointer to be passed to @callback
 
407
 *
 
408
 * Iterates all known display outputs for the given @renderer and
 
409
 * passes a corresponding #CoglOutput pointer to the given @callback
 
410
 * for each one, along with the given @user_data.
 
411
 *
 
412
 * Since: 1.14
 
413
 * Stability: Unstable
 
414
 */
 
415
void
 
416
cogl_renderer_foreach_output (CoglRenderer *renderer,
 
417
                              CoglOutputCallback callback,
 
418
                              void *user_data);
 
419
 
 
420
COGL_END_DECLS
384
421
 
385
422
#endif /* __COGL_RENDERER_H__ */
386
423