1 /* $XConsortium: Xdbe.h /main/3 1995/09/22 10:20:01 dpw $ */
2 /******************************************************************************
4 * Copyright (c) 1994, 1995 Hewlett-Packard Company
6 * Permission is hereby granted, free of charge, to any person obtaining
7 * a copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sublicense, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM,
21 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
22 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
23 * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 * Except as contained in this notice, the name of the Hewlett-Packard
26 * Company shall not be used in advertising or otherwise to promote the
27 * sale, use or other dealings in this Software without prior written
28 * authorization from the Hewlett-Packard Company.
30 * Header file for Xlib-related DBE
32 *****************************************************************************/
41 #include <X11/Xfuncproto.h>
42 #include "Xdbeproto.h"
48 #define XdbeBadBuffer 0
53 typedef Drawable XdbeBackBuffer;
55 typedef unsigned char XdbeSwapAction;
59 Window swap_window; /* window for which to swap buffers */
60 XdbeSwapAction swap_action; /* swap action to use for swap_window */
66 Window window; /* window that buffer belongs to */
68 XdbeBackBufferAttributes;
73 Display *display; /* display the event was read from */
74 XdbeBackBuffer buffer; /* resource id */
75 unsigned long serial; /* serial number of failed request */
76 unsigned char error_code; /* error base + XdbeBadBuffer */
77 unsigned char request_code; /* major opcode of failed request */
78 unsigned char minor_code; /* minor opcode of failed request */
82 /* _XFUNCPROTOBEGIN and _XFUNCPROTOEND are defined as noops
83 * (for non-C++ builds) in X11/Xfuncproto.h.
87 extern Status XdbeQueryExtension(
88 #if NeedFunctionPrototypes
90 int* /* major_version_return */,
91 int* /* minor_version_return */
95 extern XdbeBackBuffer XdbeAllocateBackBufferName(
96 #if NeedFunctionPrototypes
99 XdbeSwapAction /* swap_action */
103 extern Status XdbeDeallocateBackBufferName(
104 #if NeedFunctionPrototypes
106 XdbeBackBuffer /* buffer */
110 extern Status XdbeSwapBuffers(
111 #if NeedFunctionPrototypes
113 XdbeSwapInfo* /* swap_info */,
114 int /* num_windows */
118 extern Status XdbeBeginIdiom(
119 #if NeedFunctionPrototypes
124 extern Status XdbeEndIdiom(
125 #if NeedFunctionPrototypes
130 extern XdbeScreenVisualInfo *XdbeGetVisualInfo(
131 #if NeedFunctionPrototypes
133 Drawable* /* screen_specifiers */,
134 int* /* num_screens */
138 extern void XdbeFreeVisualInfo(
139 #if NeedFunctionPrototypes
140 XdbeScreenVisualInfo* /* visual_info */
144 extern XdbeBackBufferAttributes *XdbeGetBackBufferAttributes(
145 #if NeedFunctionPrototypes
147 XdbeBackBuffer /* buffer */