6 /*****************************************************************************
7 Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA
9 Permission to use, copy, modify, and distribute this software and its
10 documentation for any purpose and without fee is hereby granted,
11 provided that the above copyright notice appear in all copies and that
12 both that copyright notice and this permission notice appear in
13 supporting documentation, and that the name of Digital not be
14 used in advertising or publicity pertaining to distribution of the
15 software without specific, written prior permission.
17 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
18 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
19 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
20 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
21 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
22 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
25 *****************************************************************************/
40 * This header file is used by the XTrap server extension only
41 * (not used by clients or the XTrap Toolkit). Information
42 * contained herein should *not* be visible to clients (xtrapdi.h
43 * is used for this). The name is historical.
46 #include <X11/extensions/xtrapbits.h>
50 # define MIN(a,b) ((a) < (b) ? (a) : (b))
53 # define MAX(a,b) ((a) > (b) ? (a) : (b))
56 #define XETrapNumEvents 1L /* constants used for AddExtension */
58 /* Other constants used within the extension code */
59 #define XETrapMinRepSize 32L /* Minimum number of longs */
61 /* This structure will be globally declared to provide storage to hold
62 * the various extension wide configuration information. Allocated on
67 ClientPtr client; /* Multi-client support and error handling */
68 xXTrapGetCurReply cur; /* Struct of Miscellaneous state info */
69 xXTrapGetStatsReply *stats; /* Pointer to stat's, malloc'd if requested */
70 CARD32 last_input_time B32; /* last timestamp from input event */
71 CARD16 protocol B16; /* current communication protocol */
74 #define XETrapSetHeaderEvent(phdr) ((phdr)->type = 0x1L)
75 #define XETrapSetHeaderRequest(phdr) ((phdr)->type = 0x2L)
76 #define XETrapSetHeaderSpecial(phdr) ((phdr)->type = 0x3L)
77 #define XETrapSetHeaderCursor(phdr) ((phdr)->type = 0x4L)
78 #define XETrapSetHeaderReply(phdr) ((phdr)->type = 0x5L)
82 #define globalref extern
85 /* Extension platform identifier (conditionally defined) */
86 #if ( defined (__osf__) && defined(__alpha) )
87 # define XETrapPlatform PF_DECOSF1
90 # define XETrapPlatform PF_DECUltrix
94 # define XETrapPlatform PF_DECELN
96 # define XETrapPlatform PF_DECVMS
100 # define XETrapPlatform PF_DECVT1000
103 # define XETrapPlatform PF_DECXTerm
106 # define XETrapPlatform PF_IBMAT
109 # define XETrapPlatform PF_SunSparc
111 #ifndef XETrapPlatform
112 # define XETrapPlatform PF_Other
113 #endif /* XETrapPlatform */
115 #endif /* __XTRAPDDMI__ */