jpayne@69: /****************************************************************************** jpayne@69: * jpayne@69: * Copyright (c) 1994, 1995 Hewlett-Packard Company jpayne@69: * jpayne@69: * Permission is hereby granted, free of charge, to any person obtaining jpayne@69: * a copy of this software and associated documentation files (the jpayne@69: * "Software"), to deal in the Software without restriction, including jpayne@69: * without limitation the rights to use, copy, modify, merge, publish, jpayne@69: * distribute, sublicense, and/or sell copies of the Software, and to jpayne@69: * permit persons to whom the Software is furnished to do so, subject to jpayne@69: * the following conditions: jpayne@69: * jpayne@69: * The above copyright notice and this permission notice shall be included jpayne@69: * in all copies or substantial portions of the Software. jpayne@69: * jpayne@69: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS jpayne@69: * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF jpayne@69: * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. jpayne@69: * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM, jpayne@69: * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR jpayne@69: * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR jpayne@69: * THE USE OR OTHER DEALINGS IN THE SOFTWARE. jpayne@69: * jpayne@69: * Except as contained in this notice, the name of the Hewlett-Packard jpayne@69: * Company shall not be used in advertising or otherwise to promote the jpayne@69: * sale, use or other dealings in this Software without prior written jpayne@69: * authorization from the Hewlett-Packard Company. jpayne@69: * jpayne@69: * Header file for Xlib-related DBE jpayne@69: * jpayne@69: *****************************************************************************/ jpayne@69: jpayne@69: #ifndef XDBE_H jpayne@69: #define XDBE_H jpayne@69: jpayne@69: #include jpayne@69: #include jpayne@69: jpayne@69: typedef struct jpayne@69: { jpayne@69: VisualID visual; /* one visual ID that supports double-buffering */ jpayne@69: int depth; /* depth of visual in bits */ jpayne@69: int perflevel; /* performance level of visual */ jpayne@69: } jpayne@69: XdbeVisualInfo; jpayne@69: jpayne@69: typedef struct jpayne@69: { jpayne@69: int count; /* number of items in visual_depth */ jpayne@69: XdbeVisualInfo *visinfo; /* list of visuals & depths for scrn */ jpayne@69: } jpayne@69: XdbeScreenVisualInfo; jpayne@69: jpayne@69: jpayne@69: typedef Drawable XdbeBackBuffer; jpayne@69: jpayne@69: typedef unsigned char XdbeSwapAction; jpayne@69: jpayne@69: typedef struct jpayne@69: { jpayne@69: Window swap_window; /* window for which to swap buffers */ jpayne@69: XdbeSwapAction swap_action; /* swap action to use for swap_window */ jpayne@69: } jpayne@69: XdbeSwapInfo; jpayne@69: jpayne@69: typedef struct jpayne@69: { jpayne@69: Window window; /* window that buffer belongs to */ jpayne@69: } jpayne@69: XdbeBackBufferAttributes; jpayne@69: jpayne@69: typedef struct jpayne@69: { jpayne@69: int type; jpayne@69: Display *display; /* display the event was read from */ jpayne@69: XdbeBackBuffer buffer; /* resource id */ jpayne@69: unsigned long serial; /* serial number of failed request */ jpayne@69: unsigned char error_code; /* error base + XdbeBadBuffer */ jpayne@69: unsigned char request_code; /* major opcode of failed request */ jpayne@69: unsigned char minor_code; /* minor opcode of failed request */ jpayne@69: } jpayne@69: XdbeBufferError; jpayne@69: jpayne@69: /* _XFUNCPROTOBEGIN and _XFUNCPROTOEND are defined as noops jpayne@69: * (for non-C++ builds) in X11/Xfuncproto.h. jpayne@69: */ jpayne@69: _XFUNCPROTOBEGIN jpayne@69: jpayne@69: extern Status XdbeQueryExtension( jpayne@69: Display* /* dpy */, jpayne@69: int* /* major_version_return */, jpayne@69: int* /* minor_version_return */ jpayne@69: ); jpayne@69: jpayne@69: extern XdbeBackBuffer XdbeAllocateBackBufferName( jpayne@69: Display* /* dpy */, jpayne@69: Window /* window */, jpayne@69: XdbeSwapAction /* swap_action */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XdbeDeallocateBackBufferName( jpayne@69: Display* /* dpy */, jpayne@69: XdbeBackBuffer /* buffer */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XdbeSwapBuffers( jpayne@69: Display* /* dpy */, jpayne@69: XdbeSwapInfo* /* swap_info */, jpayne@69: int /* num_windows */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XdbeBeginIdiom( jpayne@69: Display* /* dpy */ jpayne@69: ); jpayne@69: jpayne@69: extern Status XdbeEndIdiom( jpayne@69: Display* /* dpy */ jpayne@69: ); jpayne@69: jpayne@69: extern XdbeScreenVisualInfo *XdbeGetVisualInfo( jpayne@69: Display* /* dpy */, jpayne@69: Drawable* /* screen_specifiers */, jpayne@69: int* /* num_screens */ jpayne@69: ); jpayne@69: jpayne@69: extern void XdbeFreeVisualInfo( jpayne@69: XdbeScreenVisualInfo* /* visual_info */ jpayne@69: ); jpayne@69: jpayne@69: extern XdbeBackBufferAttributes *XdbeGetBackBufferAttributes( jpayne@69: Display* /* dpy */, jpayne@69: XdbeBackBuffer /* buffer */ jpayne@69: ); jpayne@69: jpayne@69: _XFUNCPROTOEND jpayne@69: jpayne@69: #endif /* XDBE_H */ jpayne@69: