4
* A Low Level GPU Graphics and Utilities API
6
* Copyright (C) 2011 Intel Corporation.
8
* Permission is hereby granted, free of charge, to any person
9
* obtaining a copy of this software and associated documentation
10
* files (the "Software"), to deal in the Software without
11
* restriction, including without limitation the rights to use, copy,
12
* modify, merge, publish, distribute, sublicense, and/or sell copies
13
* of the Software, and to permit persons to whom the Software is
14
* furnished to do so, subject to the following conditions:
16
* The above copyright notice and this permission notice shall be
17
* included in all copies or substantial portions of the Software.
19
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
23
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
24
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
#ifndef __COGL_RENDERER_XLIB_PRIVATE_H
32
#define __COGL_RENDERER_XLIB_PRIVATE_H
34
#include "cogl-object-private.h"
35
#include "cogl-xlib-private.h"
36
#include "cogl-x11-renderer-private.h"
37
#include "cogl-context.h"
38
#include "cogl-output.h"
40
typedef struct _CoglXlibRenderer
42
CoglX11Renderer _parent;
46
/* Current top of the XError trap state stack. The actual memory for
47
these is expected to be allocated on the stack by the caller */
48
CoglXlibTrapState *trap_state;
50
unsigned long outputs_update_serial;
52
XVisualInfo *xvisinfo;
56
_cogl_xlib_renderer_connect (CoglRenderer *renderer, CoglError **error);
59
_cogl_xlib_renderer_disconnect (CoglRenderer *renderer);
62
* cogl_xlib_renderer_trap_errors:
63
* @state: A temporary place to store data for the trap.
65
* Traps every X error until _cogl_xlib_renderer_untrap_errors()
66
* called. You should allocate an uninitialised CoglXlibTrapState
67
* struct on the stack to pass to this function. The same pointer
68
* should later be passed to _cogl_xlib_renderer_untrap_errors().
70
* Calls to _cogl_xlib_renderer_trap_errors() can be nested as long as
71
* _cogl_xlib_renderer_untrap_errors() is called with the
72
* corresponding state pointers in reverse order.
75
_cogl_xlib_renderer_trap_errors (CoglRenderer *renderer,
76
CoglXlibTrapState *state);
79
* cogl_xlib_renderer_untrap_errors:
80
* @state: The state that was passed to _cogl_xlib_renderer_trap_errors().
82
* Removes the X error trap and returns the current status.
84
* Return value: the trapped error code, or 0 for success
87
_cogl_xlib_renderer_untrap_errors (CoglRenderer *renderer,
88
CoglXlibTrapState *state);
91
_cogl_xlib_renderer_get_data (CoglRenderer *renderer);
94
_cogl_xlib_renderer_get_dispatch_timeout (CoglRenderer *renderer);
97
_cogl_xlib_renderer_output_for_rectangle (CoglRenderer *renderer,
103
#endif /* __COGL_RENDERER_XLIB_PRIVATE_H */