Debian Codegraph @

nx-X11/include/extensions/record.h

raw
1 /*
2 $Xorg: record.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $
3 */
4
5 /***************************************************************************
6 * Copyright 1995 Network Computing Devices
7 *
8 * Permission to use, copy, modify, distribute, and sell this software and
9 * its documentation for any purpose is hereby granted without fee, provided
10 * that the above copyright notice appear in all copies and that both that
11 * copyright notice and this permission notice appear in supporting
12 * documentation, and that the name of Network Computing Devices
13 * not be used in advertising or publicity pertaining to distribution
14 * of the software without specific, written prior permission.
15 *
16 * NETWORK COMPUTING DEVICES DISCLAIMs ALL WARRANTIES WITH REGARD TO
17 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18 * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE
19 * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
21 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
22 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 **************************************************************************/
24 /* $XFree86$ */
25
26 #ifndef _RECORD_H_
27 #define _RECORD_H_
28
29 #define XRecordBadContext 0 /* Not a valid RC */
30
31 /*
32 * Constants for arguments of various requests
33 */
34 #define XRecordFromServerTime 0x01
35 #define XRecordFromClientTime 0x02
36 #define XRecordFromClientSequence 0x04
37
38 #define XRecordCurrentClients 1
39 #define XRecordFutureClients 2
40 #define XRecordAllClients 3
41
42 #define XRecordFromServer 0
43 #define XRecordFromClient 1
44 #define XRecordClientStarted 2
45 #define XRecordClientDied 3
46 #define XRecordStartOfData 4
47 #define XRecordEndOfData 5
48
49 typedef unsigned long XRecordClientSpec;
50
51 #ifndef _XRECORD_SERVER_
52
53 typedef unsigned long XRecordContext;
54
55 typedef struct
56 {
57 unsigned char first;
58 unsigned char last;
59 } XRecordRange8;
60
61 typedef struct
62 {
63 unsigned short first;
64 unsigned short last;
65 } XRecordRange16;
66
67 typedef struct
68 {
69 XRecordRange8 ext_major;
70 XRecordRange16 ext_minor;
71 } XRecordExtRange;
72
73 typedef struct
74 {
75 XRecordRange8 core_requests; /* core X requests */
76 XRecordRange8 core_replies; /* core X replies */
77 XRecordExtRange ext_requests; /* extension requests */
78 XRecordExtRange ext_replies; /* extension replies */
79 XRecordRange8 delivered_events; /* delivered core and ext events */
80 XRecordRange8 device_events; /* all core and ext device events */
81 XRecordRange8 errors; /* core X and ext errors */
82 Bool client_started; /* connection setup reply */
83 Bool client_died; /* notice of client disconnect */
84 } XRecordRange;
85
86 typedef struct
87 {
88 XRecordClientSpec client;
89 unsigned long nranges;
90 XRecordRange **ranges;
91 } XRecordClientInfo;
92
93 typedef struct
94 {
95 Bool enabled;
96 int datum_flags;
97 unsigned long nclients;
98 XRecordClientInfo **client_info;
99 } XRecordState;
100
101 typedef struct
102 {
103 XID id_base;
104 Time server_time;
105 unsigned long client_seq;
106 int category;
107 Bool client_swapped;
108 unsigned char *data;
109 unsigned long data_len; /* in 4-byte units */
110 } XRecordInterceptData;
111
112 _XFUNCPROTOBEGIN
113
114 /*********************************************************
115 *
116 * Prototypes
117 *
118 */
119
120 XID XRecordIdBaseMask(
121 Display *dpy
122 );
123
124 extern Status XRecordQueryVersion(
125 Display* /* dpy */,
126 int* /* cmajor_return */,
127 int* /* cminor_return */
128 );
129
130 extern XRecordContext XRecordCreateContext(
131 Display* /* dpy */,
132 int /* datum_flags */,
133 XRecordClientSpec* /* clients */,
134 int /* nclients */,
135 XRecordRange** /* ranges */,
136 int /* nranges */
137 );
138
139 extern XRecordRange *XRecordAllocRange(
140 void
141 );
142
143 extern Status XRecordRegisterClients(
144 Display* /* dpy */,
145 XRecordContext /* context */,
146 int /* datum_flags */,
147 XRecordClientSpec* /* clients */,
148 int /* nclients */,
149 XRecordRange** /* ranges */,
150 int /* nranges */
151 );
152
153 extern Status XRecordUnregisterClients(
154 Display* /* dpy */,
155 XRecordContext /* context */,
156 XRecordClientSpec* /* clients */,
157 int /* nclients */
158 );
159
160 extern Status XRecordGetContext(
161 Display* /* dpy */,
162 XRecordContext /* context */,
163 XRecordState** /* state_return */
164 );
165
166 extern void XRecordFreeState(
167 XRecordState* /* state */
168 );
169
170 typedef void (*XRecordInterceptProc) (
171 XPointer /* closure */,
172 XRecordInterceptData* /* recorded_data */
173 );
174
175 extern Status XRecordEnableContext(
176 Display* /* dpy */,
177 XRecordContext /* context */,
178 XRecordInterceptProc /* callback */,
179 XPointer /* closure */
180 );
181
182 extern Status XRecordEnableContextAsync(
183 Display* /* dpy */,
184 XRecordContext /* context */,
185 XRecordInterceptProc /* callback */,
186 XPointer /* closure */
187 );
188
189 extern void XRecordProcessReplies(
190 Display* /* dpy */
191 );
192
193 extern void XRecordFreeData(
194 XRecordInterceptData* /* data */
195 );
196
197 extern Status XRecordDisableContext(
198 Display* /* dpy */,
199 XRecordContext /* context */
200 );
201
202 extern Status XRecordFreeContext(
203 Display* /* dpy */,
204 XRecordContext /* context */
205 );
206
207 _XFUNCPROTOEND
208
209 #endif /* _XRECORD_SERVER_ */
210
211 #endif /* _RECORD_H_ */