1
/* $XFree86: xc/include/extensions/xtraplib.h,v 1.1 2001/11/02 23:29:26 dawes Exp $ */
6
/*****************************************************************************
7
Copyright 1987, 1988, 1989, 1990, 1991, 1994 by Digital Equipment Corp.,
10
Permission to use, copy, modify, and distribute this software and its
11
documentation for any purpose and without fee is hereby granted,
12
provided that the above copyright notice appear in all copies and that
13
both that copyright notice and this permission notice appear in
14
supporting documentation, and that the name of Digital not be
15
used in advertising or publicity pertaining to distribution of the
16
software without specific, written prior permission.
18
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
19
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
20
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
21
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
22
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
23
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
26
*****************************************************************************/
41
* This header file describes all the structures/constants required
42
* for interfacing with the client toolkit *except* the common
43
* client/extension definitions in xtrapdi.h. Namely, *no* extension-
44
* only information or client/extension information can be found here.
51
#include <X11/Intrinsic.h>
52
#include <X11/extensions/xtrapdi.h>
53
#include <X11/extensions/xtrapemacros.h>
55
typedef struct /* Callback structure */
61
/* Data structure for setting trap context */
64
CARD8 tc_flags[2L]; /* Toolkit-side specific flags */
65
XETrapCfg v; /* XTrap configuration values */
66
XETrapCB *req_cb; /* Pointer to Request Callbacks */
67
XETrapCB *evt_cb; /* Pointer to Event Callbacks (starting at 2) */
68
CARD32 last_time B32; /* Last (delta) timestamp */
71
/* bits 0 thru 6 are formerly "families" (now obsolete) */
72
#define XETCDeltaTimes 7
73
#define XETCTrapActive 8
74
/* bits 9 thru 15 are reserved for future expansion */
76
/* Values bit masks (used when determining what's dirty */
77
#define TCStatistics (1L<<0L)
78
#define TCRequests (1L<<1L)
79
#define TCEvents (1L<<2L)
80
#define TCMaxPacket (1L<<3L)
81
#define TCCmdKey (1L<<4L)
82
#define TCTimeStamps (1L<<5L)
83
#define TCWinXY (1L<<6L)
84
#define TCXInput (1L<<7L)
85
#define TCReqCBs (1L<<8L)
86
#define TCEvtCBs (1L<<9L)
87
#define TCCursor (1L<<10L)
88
#define TCColorReplies (1L<<11L)
89
#define TCGrabServer (1L<<12L)
91
/* This is the representation we use in the library code for XLib transport */
99
unsigned char data[sz_EventData];
102
/* Trap Context structure for maintaining XTrap State for client */
105
struct _XETC *next; /* Ptr to next linked-listed TC */
106
Display *dpy; /* Display ptr of current TC */
107
INT32 eventBase /*B32*/; /* First event value */
108
INT32 errorBase /*B32*/; /* First error value */
109
INT32 extOpcode /*B32*/; /* Major opcode of the extension */
110
BYTE *xbuff; /* Pointer to buffer for XLib Communications */
111
CARD16 xmax_size /*B16*/; /* Max Size of a request */
112
XExtData *ext_data; /* hook for extension to hang data */
114
* The following are initialized with the client-side version number
115
* However, when either a GetAvailable or GetVersion reply is received,
116
* these values are updated with the *oldest* version numbers.
118
CARD16 release /*B16*/; /* The extension release number */
119
CARD16 version /*B16*/; /* The xtrap extension version number */
120
CARD16 revision /*B16*/; /* The xtrap extension revision number */
121
CARD16 protocol /*B16*/; /* The xtrap extension protocol number */
122
unsigned dirty /*B32*/; /* cache dirty bits */
123
XETCValues values; /* shadow structure of values */
124
Boolean (*eventFunc[XETrapNumberEvents])(XETrapDataEvent *event, struct _XETC *tc);
128
#endif /* __XTRAPLIB__ */