1 /******************************************************************************
3 * Copyright (c) 1994, 1995 Hewlett-Packard Company
5 * Permission is hereby granted, free of charge, to any person obtaining
6 * a copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sublicense, and/or sell copies of the Software, and to
10 * permit persons to whom the Software is furnished to do so, subject to
11 * the following conditions:
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM,
20 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
22 * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 * Except as contained in this notice, the name of the Hewlett-Packard
25 * Company shall not be used in advertising or otherwise to promote the
26 * sale, use or other dealings in this Software without prior written
27 * authorization from the Hewlett-Packard Company.
29 * Header file for Xlib-related DBE
31 *****************************************************************************/
36 #include <X11/Xfuncproto.h>
37 #include <X11/extensions/dbe.h>
41 VisualID visual; /* one visual ID that supports double-buffering */
42 int depth; /* depth of visual in bits */
43 int perflevel; /* performance level of visual */
49 int count; /* number of items in visual_depth */
50 XdbeVisualInfo *visinfo; /* list of visuals & depths for scrn */
55 typedef Drawable XdbeBackBuffer;
57 typedef unsigned char XdbeSwapAction;
61 Window swap_window; /* window for which to swap buffers */
62 XdbeSwapAction swap_action; /* swap action to use for swap_window */
68 Window window; /* window that buffer belongs to */
70 XdbeBackBufferAttributes;
75 Display *display; /* display the event was read from */
76 XdbeBackBuffer buffer; /* resource id */
77 unsigned long serial; /* serial number of failed request */
78 unsigned char error_code; /* error base + XdbeBadBuffer */
79 unsigned char request_code; /* major opcode of failed request */
80 unsigned char minor_code; /* minor opcode of failed request */
84 /* _XFUNCPROTOBEGIN and _XFUNCPROTOEND are defined as noops
85 * (for non-C++ builds) in X11/Xfuncproto.h.
89 extern Status XdbeQueryExtension(
91 int* /* major_version_return */,
92 int* /* minor_version_return */
95 extern XdbeBackBuffer XdbeAllocateBackBufferName(
98 XdbeSwapAction /* swap_action */
101 extern Status XdbeDeallocateBackBufferName(
103 XdbeBackBuffer /* buffer */
106 extern Status XdbeSwapBuffers(
108 XdbeSwapInfo* /* swap_info */,
109 int /* num_windows */
112 extern Status XdbeBeginIdiom(
116 extern Status XdbeEndIdiom(
120 extern XdbeScreenVisualInfo *XdbeGetVisualInfo(
122 Drawable* /* screen_specifiers */,
123 int* /* num_screens */
126 extern void XdbeFreeVisualInfo(
127 XdbeScreenVisualInfo* /* visual_info */
130 extern XdbeBackBufferAttributes *XdbeGetBackBufferAttributes(
132 XdbeBackBuffer /* buffer */