Xdbeproto.h revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
/* $Xorg: Xdbeproto.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
/******************************************************************************
*
* Copyright (c) 1994, 1995 Hewlett-Packard Company
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Except as contained in this notice, the name of the Hewlett-Packard
* Company shall not be used in advertising or otherwise to promote the
* sale, use or other dealings in this Software without prior written
* authorization from the Hewlett-Packard Company.
*
* Header file for Xlib-related DBE
*
*****************************************************************************/
#ifndef XDBE_PROTO_H
#define XDBE_PROTO_H
/* INCLUDES */
/* DEFINES */
/* Values for swap_action field of XdbeSwapInfo structure */
#define XdbeUndefined 0
#define XdbeBackground 1
#define XdbeUntouched 2
#define XdbeCopied 3
#ifdef NEED_DBE_PROTOCOL
#define DBE_PROTOCOL_NAME "DOUBLE-BUFFER"
/* Current version numbers */
#define DBE_MAJOR_VERSION 1
#define DBE_MINOR_VERSION 0
/* Used when adding extension; also used in Xdbe macros */
#define DbeNumberEvents 0
#define DbeBadBuffer 0
/* Request values used in (S)ProcDbeDispatch() */
#define X_DbeGetVersion 0
#define X_DbeAllocateBackBufferName 1
#define X_DbeDeallocateBackBufferName 2
#define X_DbeSwapBuffers 3
#define X_DbeBeginIdiom 4
#define X_DbeEndIdiom 5
#define X_DbeGetVisualInfo 6
#define X_DbeGetBackBufferAttributes 7
typedef CARD8 xDbeSwapAction;
typedef CARD32 xDbeBackBuffer;
#endif /* NEED_DBE_PROTOCOL */
/* TYPEDEFS */
/* Client data types */
/* XdbeVisualInfo and XdbeScreenVisualInfo are defined in this file,
* "Xdbeproto.h", rather than "Xdbe.h" because the server uses these data
* types.
*/
typedef struct
{
int depth; /* depth of visual in bits */
int perflevel; /* performance level of visual */
}
typedef struct
{
int count; /* number of items in visual_depth */
}
/* Protocol data types */
#ifdef NEED_DBE_PROTOCOL
typedef struct
{
} xDbeSwapInfo;
typedef struct
{
} xDbeVisInfo;
#define sz_xDbeVisInfo 8
typedef struct
{
} xDbeScreenVisInfo; /* followed by n xDbeVisInfo items */
typedef struct
{
/* Requests and replies */
typedef struct
{
#define sz_xDbeGetVersionReq 8
typedef struct
{
#define sz_xDbeGetVersionReply 32
typedef struct
{
#define sz_xDbeAllocateBackBufferNameReq 16
typedef struct
{
#define sz_xDbeDeallocateBackBufferNameReq 8
typedef struct
{
} xDbeSwapBuffersReq; /* followed by n window/swap action pairs */
#define sz_xDbeSwapBuffersReq 8
typedef struct
{
#define sz_xDbeBeginIdiomReq 4
typedef struct
{
#define sz_xDbeEndIdiomReq 4
typedef struct
{
} xDbeGetVisualInfoReq; /* followed by n drawables */
#define sz_xDbeGetVisualInfoReq 8
typedef struct
{
CARD32 m; /* m, number of visual infos in list */
} xDbeGetVisualInfoReply; /* followed by m visual infos */
#define sz_xDbeGetVisualInfoReply 32
typedef struct
{
#define sz_xDbeGetBackBufferAttributesReq 8
typedef struct
{
#define sz_xDbeGetBackBufferAttributesReply 32
#endif /* NEED_DBE_PROTOCOL */
#endif /* XDBE_PROTO_H */