1 | /* $XFree86$ */
|
---|
2 |
|
---|
3 | #ifndef __XTRAPDDMI__
|
---|
4 | #define __XTRAPDDMI__
|
---|
5 |
|
---|
6 | /*****************************************************************************
|
---|
7 | Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA
|
---|
8 |
|
---|
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.
|
---|
16 |
|
---|
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
|
---|
23 | SOFTWARE.
|
---|
24 |
|
---|
25 | *****************************************************************************/
|
---|
26 | /*
|
---|
27 | *
|
---|
28 | * CONTRIBUTORS:
|
---|
29 | *
|
---|
30 | * Dick Annicchiarico
|
---|
31 | * Robert Chesler
|
---|
32 | * Dan Coutu
|
---|
33 | * Gene Durso
|
---|
34 | * Marc Evans
|
---|
35 | * Alan Jamison
|
---|
36 | * Mark Henry
|
---|
37 | * Ken Miller
|
---|
38 | *
|
---|
39 | * DESCRIPTION:
|
---|
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.
|
---|
44 | */
|
---|
45 | #include <X11/X.h>
|
---|
46 | #include <X11/extensions/xtrapbits.h>
|
---|
47 | #include "dix.h"
|
---|
48 |
|
---|
49 | #ifndef MIN
|
---|
50 | # define MIN(a,b) ((a) < (b) ? (a) : (b))
|
---|
51 | #endif
|
---|
52 | #ifndef MAX
|
---|
53 | # define MAX(a,b) ((a) > (b) ? (a) : (b))
|
---|
54 | #endif
|
---|
55 |
|
---|
56 | #define XETrapNumEvents 1L /* constants used for AddExtension */
|
---|
57 |
|
---|
58 | /* Other constants used within the extension code */
|
---|
59 | #define XETrapMinRepSize 32L /* Minimum number of longs */
|
---|
60 |
|
---|
61 | /* This structure will be globally declared to provide storage to hold
|
---|
62 | * the various extension wide configuration information. Allocated on
|
---|
63 | * a per-client basis.
|
---|
64 | */
|
---|
65 | typedef struct
|
---|
66 | {
|
---|
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 */
|
---|
72 | } XETrapEnv;
|
---|
73 |
|
---|
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)
|
---|
79 |
|
---|
80 | #ifndef vaxc
|
---|
81 | #define globaldef
|
---|
82 | #define globalref extern
|
---|
83 | #endif
|
---|
84 |
|
---|
85 | /* Extension platform identifier (conditionally defined) */
|
---|
86 | #if ( defined (__osf__) && defined(__alpha) )
|
---|
87 | # define XETrapPlatform PF_DECOSF1
|
---|
88 | #endif
|
---|
89 | #ifdef ultrix
|
---|
90 | # define XETrapPlatform PF_DECUltrix
|
---|
91 | #endif
|
---|
92 | #ifdef vms
|
---|
93 | #ifdef VAXELN
|
---|
94 | # define XETrapPlatform PF_DECELN
|
---|
95 | #else
|
---|
96 | # define XETrapPlatform PF_DECVMS
|
---|
97 | #endif
|
---|
98 | #endif
|
---|
99 | #ifdef VT1000
|
---|
100 | # define XETrapPlatform PF_DECVT1000
|
---|
101 | #endif
|
---|
102 | #ifdef VXT
|
---|
103 | # define XETrapPlatform PF_DECXTerm
|
---|
104 | #endif
|
---|
105 | #ifdef PC
|
---|
106 | # define XETrapPlatform PF_IBMAT
|
---|
107 | #endif
|
---|
108 | #ifdef sun
|
---|
109 | # define XETrapPlatform PF_SunSparc
|
---|
110 | #endif
|
---|
111 | #ifndef XETrapPlatform
|
---|
112 | # define XETrapPlatform PF_Other
|
---|
113 | #endif /* XETrapPlatform */
|
---|
114 |
|
---|
115 | #endif /* __XTRAPDDMI__ */
|
---|