1 | /************************************************************
|
---|
2 |
|
---|
3 | Copyright 1996 by Thomas E. Dickey <[email protected]>
|
---|
4 |
|
---|
5 | All Rights Reserved
|
---|
6 |
|
---|
7 | Permission to use, copy, modify, and distribute this software and its
|
---|
8 | documentation for any purpose and without fee is hereby granted,
|
---|
9 | provided that the above copyright notice appear in all copies and that
|
---|
10 | both that copyright notice and this permission notice appear in
|
---|
11 | supporting documentation, and that the name of the above listed
|
---|
12 | copyright holder(s) not be used in advertising or publicity pertaining
|
---|
13 | to distribution of the software without specific, written prior
|
---|
14 | permission.
|
---|
15 |
|
---|
16 | THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
|
---|
17 | TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
---|
18 | AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
|
---|
19 | LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
---|
20 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
---|
21 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
---|
22 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
---|
23 |
|
---|
24 | ********************************************************/
|
---|
25 |
|
---|
26 | /********************************************************************
|
---|
27 | * Interface of 'exevents.c'
|
---|
28 | */
|
---|
29 |
|
---|
30 | #ifndef EXEVENTS_H
|
---|
31 | #define EXEVENTS_H
|
---|
32 |
|
---|
33 | #include <X11/extensions/XIproto.h>
|
---|
34 |
|
---|
35 | /**
|
---|
36 | * Attached to the devPrivates of each client. Specifies the version number as
|
---|
37 | * supported by the client.
|
---|
38 | */
|
---|
39 | typedef struct _XIClientRec {
|
---|
40 | int major_version;
|
---|
41 | int minor_version;
|
---|
42 | } XIClientRec, *XIClientPtr;
|
---|
43 |
|
---|
44 | extern void RegisterOtherDevice (
|
---|
45 | DeviceIntPtr /* device */);
|
---|
46 |
|
---|
47 | extern int
|
---|
48 | UpdateDeviceState (
|
---|
49 | DeviceIntPtr /* device */,
|
---|
50 | xEventPtr /* xE */,
|
---|
51 | int /* count */);
|
---|
52 |
|
---|
53 | extern void ProcessOtherEvent (
|
---|
54 | xEventPtr /* FIXME deviceKeyButtonPointer * xE */,
|
---|
55 | DeviceIntPtr /* other */,
|
---|
56 | int /* count */);
|
---|
57 |
|
---|
58 | extern int InitProximityClassDeviceStruct(
|
---|
59 | DeviceIntPtr /* dev */);
|
---|
60 |
|
---|
61 | extern void InitValuatorAxisStruct(
|
---|
62 | DeviceIntPtr /* dev */,
|
---|
63 | int /* axnum */,
|
---|
64 | int /* minval */,
|
---|
65 | int /* maxval */,
|
---|
66 | int /* resolution */,
|
---|
67 | int /* min_res */,
|
---|
68 | int /* max_res */);
|
---|
69 |
|
---|
70 | extern void DeviceFocusEvent(
|
---|
71 | DeviceIntPtr /* dev */,
|
---|
72 | int /* type */,
|
---|
73 | int /* mode */,
|
---|
74 | int /* detail */,
|
---|
75 | WindowPtr /* pWin */);
|
---|
76 |
|
---|
77 | extern int GrabButton(
|
---|
78 | ClientPtr /* client */,
|
---|
79 | DeviceIntPtr /* dev */,
|
---|
80 | BYTE /* this_device_mode */,
|
---|
81 | BYTE /* other_devices_mode */,
|
---|
82 | CARD16 /* modifiers */,
|
---|
83 | DeviceIntPtr /* modifier_device */,
|
---|
84 | CARD8 /* button */,
|
---|
85 | Window /* grabWindow */,
|
---|
86 | BOOL /* ownerEvents */,
|
---|
87 | Cursor /* rcursor */,
|
---|
88 | Window /* rconfineTo */,
|
---|
89 | Mask /* eventMask */);
|
---|
90 |
|
---|
91 | extern int GrabKey(
|
---|
92 | ClientPtr /* client */,
|
---|
93 | DeviceIntPtr /* dev */,
|
---|
94 | BYTE /* this_device_mode */,
|
---|
95 | BYTE /* other_devices_mode */,
|
---|
96 | CARD16 /* modifiers */,
|
---|
97 | DeviceIntPtr /* modifier_device */,
|
---|
98 | CARD8 /* key */,
|
---|
99 | Window /* grabWindow */,
|
---|
100 | BOOL /* ownerEvents */,
|
---|
101 | Mask /* mask */);
|
---|
102 |
|
---|
103 | extern int SelectForWindow(
|
---|
104 | DeviceIntPtr /* dev */,
|
---|
105 | WindowPtr /* pWin */,
|
---|
106 | ClientPtr /* client */,
|
---|
107 | Mask /* mask */,
|
---|
108 | Mask /* exclusivemasks */,
|
---|
109 | Mask /* validmasks */);
|
---|
110 |
|
---|
111 | extern int AddExtensionClient (
|
---|
112 | WindowPtr /* pWin */,
|
---|
113 | ClientPtr /* client */,
|
---|
114 | Mask /* mask */,
|
---|
115 | int /* mskidx */);
|
---|
116 |
|
---|
117 | extern void RecalculateDeviceDeliverableEvents(
|
---|
118 | WindowPtr /* pWin */);
|
---|
119 |
|
---|
120 | extern int InputClientGone(
|
---|
121 | WindowPtr /* pWin */,
|
---|
122 | XID /* id */);
|
---|
123 |
|
---|
124 | extern int SendEvent (
|
---|
125 | ClientPtr /* client */,
|
---|
126 | DeviceIntPtr /* d */,
|
---|
127 | Window /* dest */,
|
---|
128 | Bool /* propagate */,
|
---|
129 | xEvent * /* ev */,
|
---|
130 | Mask /* mask */,
|
---|
131 | int /* count */);
|
---|
132 |
|
---|
133 | extern int SetButtonMapping (
|
---|
134 | ClientPtr /* client */,
|
---|
135 | DeviceIntPtr /* dev */,
|
---|
136 | int /* nElts */,
|
---|
137 | BYTE * /* map */);
|
---|
138 |
|
---|
139 | extern int SetModifierMapping(
|
---|
140 | ClientPtr /* client */,
|
---|
141 | DeviceIntPtr /* dev */,
|
---|
142 | int /* len */,
|
---|
143 | int /* rlen */,
|
---|
144 | int /* numKeyPerModifier */,
|
---|
145 | KeyCode * /* inputMap */,
|
---|
146 | KeyClassPtr * /* k */);
|
---|
147 |
|
---|
148 | extern void SendDeviceMappingNotify(
|
---|
149 | ClientPtr /* client, */,
|
---|
150 | CARD8 /* request, */,
|
---|
151 | KeyCode /* firstKeyCode */,
|
---|
152 | CARD8 /* count */,
|
---|
153 | DeviceIntPtr /* dev */);
|
---|
154 |
|
---|
155 | extern int ChangeKeyMapping(
|
---|
156 | ClientPtr /* client */,
|
---|
157 | DeviceIntPtr /* dev */,
|
---|
158 | unsigned /* len */,
|
---|
159 | int /* type */,
|
---|
160 | KeyCode /* firstKeyCode */,
|
---|
161 | CARD8 /* keyCodes */,
|
---|
162 | CARD8 /* keySymsPerKeyCode */,
|
---|
163 | KeySym * /* map */);
|
---|
164 |
|
---|
165 | extern void DeleteWindowFromAnyExtEvents(
|
---|
166 | WindowPtr /* pWin */,
|
---|
167 | Bool /* freeResources */);
|
---|
168 |
|
---|
169 | extern int MaybeSendDeviceMotionNotifyHint (
|
---|
170 | deviceKeyButtonPointer * /* pEvents */,
|
---|
171 | Mask /* mask */);
|
---|
172 |
|
---|
173 | extern void CheckDeviceGrabAndHintWindow (
|
---|
174 | WindowPtr /* pWin */,
|
---|
175 | int /* type */,
|
---|
176 | deviceKeyButtonPointer * /* xE */,
|
---|
177 | GrabPtr /* grab */,
|
---|
178 | ClientPtr /* client */,
|
---|
179 | Mask /* deliveryMask */);
|
---|
180 |
|
---|
181 | extern void MaybeStopDeviceHint(
|
---|
182 | DeviceIntPtr /* dev */,
|
---|
183 | ClientPtr /* client */);
|
---|
184 |
|
---|
185 | extern int DeviceEventSuppressForWindow(
|
---|
186 | WindowPtr /* pWin */,
|
---|
187 | ClientPtr /* client */,
|
---|
188 | Mask /* mask */,
|
---|
189 | int /* maskndx */);
|
---|
190 |
|
---|
191 | extern void SendEventToAllWindows(
|
---|
192 | DeviceIntPtr /* dev */,
|
---|
193 | Mask /* mask */,
|
---|
194 | xEvent * /* ev */,
|
---|
195 | int /* count */);
|
---|
196 |
|
---|
197 | /* Input device properties */
|
---|
198 | extern void XIDeleteAllDeviceProperties(
|
---|
199 | DeviceIntPtr /* device */
|
---|
200 | );
|
---|
201 |
|
---|
202 | extern int XIDeleteDeviceProperty(
|
---|
203 | DeviceIntPtr /* device */,
|
---|
204 | Atom /* property */,
|
---|
205 | Bool /* fromClient */
|
---|
206 | );
|
---|
207 |
|
---|
208 | extern int XIChangeDeviceProperty(
|
---|
209 | DeviceIntPtr /* dev */,
|
---|
210 | Atom /* property */,
|
---|
211 | Atom /* type */,
|
---|
212 | int /* format*/,
|
---|
213 | int /* mode*/,
|
---|
214 | unsigned long /* len*/,
|
---|
215 | pointer /* value*/,
|
---|
216 | Bool /* sendevent*/
|
---|
217 | );
|
---|
218 |
|
---|
219 | extern int XIGetDeviceProperty(
|
---|
220 | DeviceIntPtr /* dev */,
|
---|
221 | Atom /* property */,
|
---|
222 | XIPropertyValuePtr* /* value */
|
---|
223 | );
|
---|
224 |
|
---|
225 | extern int XISetDevicePropertyDeletable(
|
---|
226 | DeviceIntPtr /* dev */,
|
---|
227 | Atom /* property */,
|
---|
228 | Bool /* deletable */
|
---|
229 | );
|
---|
230 |
|
---|
231 | extern long XIRegisterPropertyHandler(
|
---|
232 | DeviceIntPtr dev,
|
---|
233 | int (*SetProperty) (DeviceIntPtr dev,
|
---|
234 | Atom property,
|
---|
235 | XIPropertyValuePtr prop,
|
---|
236 | BOOL checkonly),
|
---|
237 | int (*GetProperty) (DeviceIntPtr dev,
|
---|
238 | Atom property),
|
---|
239 | int (*DeleteProperty) (DeviceIntPtr dev,
|
---|
240 | Atom property)
|
---|
241 | );
|
---|
242 |
|
---|
243 | extern _X_EXPORT void XIUnregisterPropertyHandler(
|
---|
244 | DeviceIntPtr dev,
|
---|
245 | long id
|
---|
246 | );
|
---|
247 |
|
---|
248 | extern Atom XIGetKnownProperty(
|
---|
249 | char* name
|
---|
250 | );
|
---|
251 |
|
---|
252 | extern DeviceIntPtr XIGetDevice(xEvent *ev);
|
---|
253 |
|
---|
254 | #endif /* EXEVENTS_H */
|
---|