Debian Codegraph @

include/X11/extensions/record.h

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