1 | /***********************************************************
|
---|
2 |
|
---|
3 | Copyright 1987, 1998 The Open Group
|
---|
4 |
|
---|
5 | Permission to use, copy, modify, distribute, and sell this software and its
|
---|
6 | documentation for any purpose is hereby granted without fee, provided that
|
---|
7 | the above copyright notice appear in all copies and that both that
|
---|
8 | copyright notice and this permission notice appear in supporting
|
---|
9 | documentation.
|
---|
10 |
|
---|
11 | The above copyright notice and this permission notice shall be included in
|
---|
12 | all copies or substantial portions of the Software.
|
---|
13 |
|
---|
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
---|
17 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
---|
18 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
20 |
|
---|
21 | Except as contained in this notice, the name of The Open Group shall not be
|
---|
22 | used in advertising or otherwise to promote the sale, use or other dealings
|
---|
23 | in this Software without prior written authorization from The Open Group.
|
---|
24 |
|
---|
25 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
---|
26 |
|
---|
27 | All Rights Reserved
|
---|
28 |
|
---|
29 | Permission to use, copy, modify, and distribute this software and its
|
---|
30 | documentation for any purpose and without fee is hereby granted,
|
---|
31 | provided that the above copyright notice appear in all copies and that
|
---|
32 | both that copyright notice and this permission notice appear in
|
---|
33 | supporting documentation, and that the name of Digital not be
|
---|
34 | used in advertising or publicity pertaining to distribution of the
|
---|
35 | software without specific, written prior permission.
|
---|
36 |
|
---|
37 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
---|
38 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
---|
39 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
---|
40 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
---|
41 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
---|
42 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
---|
43 | SOFTWARE.
|
---|
44 |
|
---|
45 | ******************************************************************/
|
---|
46 |
|
---|
47 | #ifndef DIX_H
|
---|
48 | #define DIX_H
|
---|
49 |
|
---|
50 | #include "callback.h"
|
---|
51 | #include "gc.h"
|
---|
52 | #include "window.h"
|
---|
53 | #include "input.h"
|
---|
54 | #include "cursor.h"
|
---|
55 | #include "geext.h"
|
---|
56 | #include "events.h"
|
---|
57 | #include <X11/extensions/XI.h>
|
---|
58 |
|
---|
59 | #define EARLIER -1
|
---|
60 | #define SAMETIME 0
|
---|
61 | #define LATER 1
|
---|
62 |
|
---|
63 | #define NullClient ((ClientPtr) 0)
|
---|
64 | #define REQUEST(type) \
|
---|
65 | type *stuff = (type *)client->requestBuffer
|
---|
66 |
|
---|
67 | #define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0]))
|
---|
68 |
|
---|
69 | #define REQUEST_SIZE_MATCH(req)\
|
---|
70 | if ((sizeof(req) >> 2) != client->req_len)\
|
---|
71 | return(BadLength)
|
---|
72 |
|
---|
73 | #define REQUEST_AT_LEAST_SIZE(req) \
|
---|
74 | if ((sizeof(req) >> 2) > client->req_len )\
|
---|
75 | return(BadLength)
|
---|
76 |
|
---|
77 | #define REQUEST_FIXED_SIZE(req, n)\
|
---|
78 | if (((sizeof(req) >> 2) > client->req_len) || \
|
---|
79 | (((sizeof(req) + (n) + 3) >> 2) != client->req_len)) \
|
---|
80 | return(BadLength)
|
---|
81 |
|
---|
82 | #define LEGAL_NEW_RESOURCE(id,client)\
|
---|
83 | if (!LegalNewID(id,client)) \
|
---|
84 | {\
|
---|
85 | client->errorValue = id;\
|
---|
86 | return BadIDChoice;\
|
---|
87 | }
|
---|
88 |
|
---|
89 | #define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\
|
---|
90 | {\
|
---|
91 | int tmprc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode);\
|
---|
92 | if (tmprc != Success)\
|
---|
93 | return tmprc;\
|
---|
94 | tmprc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);\
|
---|
95 | if (tmprc != Success)\
|
---|
96 | return tmprc;\
|
---|
97 | if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
|
---|
98 | return BadMatch;\
|
---|
99 | }\
|
---|
100 | if (pGC->serialNumber != pDraw->serialNumber)\
|
---|
101 | ValidateGC(pDraw, pGC);
|
---|
102 |
|
---|
103 | #define WriteReplyToClient(pClient, size, pReply) { \
|
---|
104 | if ((pClient)->swapped) \
|
---|
105 | (*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \
|
---|
106 | (pClient, (int)(size), pReply); \
|
---|
107 | else WriteToClient(pClient, (int)(size), (pReply)); }
|
---|
108 |
|
---|
109 | #define WriteSwappedDataToClient(pClient, size, pbuf) \
|
---|
110 | if ((pClient)->swapped) \
|
---|
111 | (*(pClient)->pSwapReplyFunc)(pClient, (int)(size), pbuf); \
|
---|
112 | else WriteToClient(pClient, (int)(size), (pbuf));
|
---|
113 |
|
---|
114 | typedef struct _TimeStamp *TimeStampPtr;
|
---|
115 |
|
---|
116 | #ifndef _XTYPEDEF_CLIENTPTR
|
---|
117 | typedef struct _Client *ClientPtr; /* also in misc.h */
|
---|
118 |
|
---|
119 | #define _XTYPEDEF_CLIENTPTR
|
---|
120 | #endif
|
---|
121 |
|
---|
122 | typedef struct _WorkQueue *WorkQueuePtr;
|
---|
123 |
|
---|
124 | extern _X_EXPORT ClientPtr clients[MAXCLIENTS];
|
---|
125 | extern _X_EXPORT ClientPtr serverClient;
|
---|
126 | extern _X_EXPORT int currentMaxClients;
|
---|
127 | extern _X_EXPORT char dispatchExceptionAtReset;
|
---|
128 |
|
---|
129 | typedef int HWEventQueueType;
|
---|
130 | typedef HWEventQueueType *HWEventQueuePtr;
|
---|
131 |
|
---|
132 | extern _X_EXPORT HWEventQueuePtr checkForInput[2];
|
---|
133 |
|
---|
134 | typedef struct _TimeStamp {
|
---|
135 | CARD32 months; /* really ~49.7 days */
|
---|
136 | CARD32 milliseconds;
|
---|
137 | } TimeStamp;
|
---|
138 |
|
---|
139 | /* dispatch.c */
|
---|
140 |
|
---|
141 | extern _X_EXPORT void SetInputCheck(HWEventQueuePtr /*c0 */ ,
|
---|
142 | HWEventQueuePtr /*c1 */ );
|
---|
143 |
|
---|
144 | extern _X_EXPORT void CloseDownClient(ClientPtr /*client */ );
|
---|
145 |
|
---|
146 | extern _X_EXPORT void UpdateCurrentTime(void);
|
---|
147 |
|
---|
148 | extern _X_EXPORT void UpdateCurrentTimeIf(void);
|
---|
149 |
|
---|
150 | extern _X_EXPORT int dixDestroyPixmap(pointer /*value */ ,
|
---|
151 | XID /*pid */ );
|
---|
152 |
|
---|
153 | extern _X_EXPORT void InitClient(ClientPtr /*client */ ,
|
---|
154 | int /*i */ ,
|
---|
155 | pointer /*ospriv */ );
|
---|
156 |
|
---|
157 | extern _X_EXPORT ClientPtr NextAvailableClient(pointer /*ospriv */ );
|
---|
158 |
|
---|
159 | extern _X_EXPORT void SendErrorToClient(ClientPtr /*client */ ,
|
---|
160 | unsigned int /*majorCode */ ,
|
---|
161 | unsigned int /*minorCode */ ,
|
---|
162 | XID /*resId */ ,
|
---|
163 | int /*errorCode */ );
|
---|
164 |
|
---|
165 | extern _X_EXPORT void MarkClientException(ClientPtr /*client */ );
|
---|
166 |
|
---|
167 | extern _X_HIDDEN Bool CreateConnectionBlock(void);
|
---|
168 |
|
---|
169 | /* dixutils.c */
|
---|
170 |
|
---|
171 | extern _X_EXPORT int CompareISOLatin1Lowered(const unsigned char * /*a */ ,
|
---|
172 | int alen,
|
---|
173 | const unsigned char * /*b */ ,
|
---|
174 | int blen);
|
---|
175 |
|
---|
176 | extern _X_EXPORT int dixLookupWindow(WindowPtr *result,
|
---|
177 | XID id,
|
---|
178 | ClientPtr client, Mask access_mode);
|
---|
179 |
|
---|
180 | extern _X_EXPORT int dixLookupDrawable(DrawablePtr *result,
|
---|
181 | XID id,
|
---|
182 | ClientPtr client,
|
---|
183 | Mask type_mask, Mask access_mode);
|
---|
184 |
|
---|
185 | extern _X_EXPORT int dixLookupGC(GCPtr *result,
|
---|
186 | XID id, ClientPtr client, Mask access_mode);
|
---|
187 |
|
---|
188 | extern _X_EXPORT int dixLookupFontable(FontPtr *result,
|
---|
189 | XID id,
|
---|
190 | ClientPtr client, Mask access_mode);
|
---|
191 |
|
---|
192 | extern _X_EXPORT int dixLookupClient(ClientPtr *result,
|
---|
193 | XID id,
|
---|
194 | ClientPtr client, Mask access_mode);
|
---|
195 |
|
---|
196 | extern _X_EXPORT void NoopDDA(void);
|
---|
197 |
|
---|
198 | extern _X_EXPORT int AlterSaveSetForClient(ClientPtr /*client */ ,
|
---|
199 | WindowPtr /*pWin */ ,
|
---|
200 | unsigned /*mode */ ,
|
---|
201 | Bool /*toRoot */ ,
|
---|
202 | Bool /*map */ );
|
---|
203 |
|
---|
204 | extern _X_EXPORT void DeleteWindowFromAnySaveSet(WindowPtr /*pWin */ );
|
---|
205 |
|
---|
206 | extern _X_EXPORT void BlockHandler(pointer /*pTimeout */ ,
|
---|
207 | pointer /*pReadmask */ );
|
---|
208 |
|
---|
209 | extern _X_EXPORT void WakeupHandler(int /*result */ ,
|
---|
210 | pointer /*pReadmask */ );
|
---|
211 |
|
---|
212 | void
|
---|
213 | EnableLimitedSchedulingLatency(void);
|
---|
214 |
|
---|
215 | void
|
---|
216 | DisableLimitedSchedulingLatency(void);
|
---|
217 |
|
---|
218 | typedef void (*WakeupHandlerProcPtr) (pointer /* blockData */ ,
|
---|
219 | int /* result */ ,
|
---|
220 | pointer /* pReadmask */ );
|
---|
221 |
|
---|
222 | extern _X_EXPORT Bool RegisterBlockAndWakeupHandlers(BlockHandlerProcPtr
|
---|
223 | /*blockHandler */ ,
|
---|
224 | WakeupHandlerProcPtr
|
---|
225 | /*wakeupHandler */ ,
|
---|
226 | pointer /*blockData */ );
|
---|
227 |
|
---|
228 | extern _X_EXPORT void RemoveBlockAndWakeupHandlers(BlockHandlerProcPtr
|
---|
229 | /*blockHandler */ ,
|
---|
230 | WakeupHandlerProcPtr
|
---|
231 | /*wakeupHandler */ ,
|
---|
232 | pointer /*blockData */ );
|
---|
233 |
|
---|
234 | extern _X_EXPORT void InitBlockAndWakeupHandlers(void);
|
---|
235 |
|
---|
236 | extern _X_EXPORT void ProcessWorkQueue(void);
|
---|
237 |
|
---|
238 | extern _X_EXPORT void ProcessWorkQueueZombies(void);
|
---|
239 |
|
---|
240 | extern _X_EXPORT Bool QueueWorkProc(Bool (* /*function */ )(
|
---|
241 | ClientPtr
|
---|
242 | /*clientUnused */
|
---|
243 | ,
|
---|
244 | pointer
|
---|
245 | /*closure */ ),
|
---|
246 | ClientPtr /*client */ ,
|
---|
247 | pointer /*closure */
|
---|
248 | );
|
---|
249 |
|
---|
250 | typedef Bool (*ClientSleepProcPtr) (ClientPtr /*client */ ,
|
---|
251 | pointer /*closure */ );
|
---|
252 |
|
---|
253 | extern _X_EXPORT Bool ClientSleep(ClientPtr /*client */ ,
|
---|
254 | ClientSleepProcPtr /* function */ ,
|
---|
255 | pointer /*closure */ );
|
---|
256 |
|
---|
257 | #ifndef ___CLIENTSIGNAL_DEFINED___
|
---|
258 | #define ___CLIENTSIGNAL_DEFINED___
|
---|
259 | extern _X_EXPORT Bool ClientSignal(ClientPtr /*client */ );
|
---|
260 | #endif /* ___CLIENTSIGNAL_DEFINED___ */
|
---|
261 |
|
---|
262 | extern _X_EXPORT void ClientWakeup(ClientPtr /*client */ );
|
---|
263 |
|
---|
264 | extern _X_EXPORT Bool ClientIsAsleep(ClientPtr /*client */ );
|
---|
265 |
|
---|
266 | /* atom.c */
|
---|
267 |
|
---|
268 | extern _X_EXPORT Atom MakeAtom(const char * /*string */ ,
|
---|
269 | unsigned /*len */ ,
|
---|
270 | Bool /*makeit */ );
|
---|
271 |
|
---|
272 | extern _X_EXPORT Bool ValidAtom(Atom /*atom */ );
|
---|
273 |
|
---|
274 | extern _X_EXPORT const char *NameForAtom(Atom /*atom */ );
|
---|
275 |
|
---|
276 | extern _X_EXPORT void
|
---|
277 | AtomError(void)
|
---|
278 | _X_NORETURN;
|
---|
279 |
|
---|
280 | extern _X_EXPORT void
|
---|
281 | FreeAllAtoms(void);
|
---|
282 |
|
---|
283 | extern _X_EXPORT void
|
---|
284 | InitAtoms(void);
|
---|
285 |
|
---|
286 | /* main.c */
|
---|
287 |
|
---|
288 | extern _X_EXPORT void
|
---|
289 | SetVendorRelease(int release);
|
---|
290 |
|
---|
291 | extern _X_EXPORT void
|
---|
292 | SetVendorString(char *string);
|
---|
293 |
|
---|
294 | /* events.c */
|
---|
295 |
|
---|
296 | extern void
|
---|
297 | SetMaskForEvent(int /* deviceid */ ,
|
---|
298 | Mask /* mask */ ,
|
---|
299 | int /* event */ );
|
---|
300 |
|
---|
301 | extern _X_EXPORT void
|
---|
302 | ConfineToShape(DeviceIntPtr /* pDev */ ,
|
---|
303 | RegionPtr /* shape */ ,
|
---|
304 | int * /* px */ ,
|
---|
305 | int * /* py */ );
|
---|
306 |
|
---|
307 | extern _X_EXPORT Bool
|
---|
308 | IsParent(WindowPtr /* maybeparent */ ,
|
---|
309 | WindowPtr /* child */ );
|
---|
310 |
|
---|
311 | extern _X_EXPORT WindowPtr
|
---|
312 | GetCurrentRootWindow(DeviceIntPtr pDev);
|
---|
313 |
|
---|
314 | extern _X_EXPORT WindowPtr
|
---|
315 | GetSpriteWindow(DeviceIntPtr pDev);
|
---|
316 |
|
---|
317 | extern _X_EXPORT void
|
---|
318 | NoticeTime(const DeviceIntPtr dev,
|
---|
319 | TimeStamp time);
|
---|
320 | extern _X_EXPORT void
|
---|
321 | NoticeEventTime(InternalEvent *ev,
|
---|
322 | DeviceIntPtr dev);
|
---|
323 | extern _X_EXPORT TimeStamp
|
---|
324 | LastEventTime(int deviceid);
|
---|
325 | extern _X_EXPORT Bool
|
---|
326 | LastEventTimeWasReset(int deviceid);
|
---|
327 | extern _X_EXPORT void
|
---|
328 | LastEventTimeToggleResetFlag(int deviceid, Bool state);
|
---|
329 | extern _X_EXPORT void
|
---|
330 | LastEventTimeToggleResetAll(Bool state);
|
---|
331 |
|
---|
332 | extern void
|
---|
333 | EnqueueEvent(InternalEvent * /* ev */ ,
|
---|
334 | DeviceIntPtr /* device */ );
|
---|
335 | extern void
|
---|
336 | PlayReleasedEvents(void);
|
---|
337 |
|
---|
338 | extern void
|
---|
339 | ActivatePointerGrab(DeviceIntPtr /* mouse */ ,
|
---|
340 | GrabPtr /* grab */ ,
|
---|
341 | TimeStamp /* time */ ,
|
---|
342 | Bool /* autoGrab */ );
|
---|
343 |
|
---|
344 | extern void
|
---|
345 | DeactivatePointerGrab(DeviceIntPtr /* mouse */ );
|
---|
346 |
|
---|
347 | extern void
|
---|
348 | ActivateKeyboardGrab(DeviceIntPtr /* keybd */ ,
|
---|
349 | GrabPtr /* grab */ ,
|
---|
350 | TimeStamp /* time */ ,
|
---|
351 | Bool /* passive */ );
|
---|
352 |
|
---|
353 | extern void
|
---|
354 | DeactivateKeyboardGrab(DeviceIntPtr /* keybd */ );
|
---|
355 |
|
---|
356 | extern BOOL
|
---|
357 | ActivateFocusInGrab(DeviceIntPtr /* dev */ ,
|
---|
358 | WindowPtr /* old */ ,
|
---|
359 | WindowPtr /* win */ );
|
---|
360 |
|
---|
361 | extern void
|
---|
362 | AllowSome(ClientPtr /* client */ ,
|
---|
363 | TimeStamp /* time */ ,
|
---|
364 | DeviceIntPtr /* thisDev */ ,
|
---|
365 | int /* newState */ );
|
---|
366 |
|
---|
367 | extern void
|
---|
368 | ReleaseActiveGrabs(ClientPtr client);
|
---|
369 |
|
---|
370 | extern GrabPtr
|
---|
371 | CheckPassiveGrabsOnWindow(WindowPtr /* pWin */ ,
|
---|
372 | DeviceIntPtr /* device */ ,
|
---|
373 | InternalEvent * /* event */ ,
|
---|
374 | BOOL /* checkCore */ ,
|
---|
375 | BOOL /* activate */ );
|
---|
376 |
|
---|
377 | extern _X_EXPORT int
|
---|
378 | DeliverEventsToWindow(DeviceIntPtr /* pWin */ ,
|
---|
379 | WindowPtr /* pWin */ ,
|
---|
380 | xEventPtr /* pEvents */ ,
|
---|
381 | int /* count */ ,
|
---|
382 | Mask /* filter */ ,
|
---|
383 | GrabPtr /* grab */ );
|
---|
384 |
|
---|
385 | extern _X_EXPORT void
|
---|
386 | DeliverRawEvent(RawDeviceEvent * /* ev */ ,
|
---|
387 | DeviceIntPtr /* dev */
|
---|
388 | );
|
---|
389 |
|
---|
390 | extern int
|
---|
391 | DeliverDeviceEvents(WindowPtr /* pWin */ ,
|
---|
392 | InternalEvent * /* event */ ,
|
---|
393 | GrabPtr /* grab */ ,
|
---|
394 | WindowPtr /* stopAt */ ,
|
---|
395 | DeviceIntPtr /* dev */ );
|
---|
396 |
|
---|
397 | extern int
|
---|
398 | DeliverOneGrabbedEvent(InternalEvent * /* event */ ,
|
---|
399 | DeviceIntPtr /* dev */ ,
|
---|
400 | enum InputLevel /* level */ );
|
---|
401 |
|
---|
402 | extern void
|
---|
403 | DeliverTouchEvents(DeviceIntPtr /* dev */ ,
|
---|
404 | TouchPointInfoPtr /* ti */ ,
|
---|
405 | InternalEvent * /* ev */ ,
|
---|
406 | XID /* resource */ );
|
---|
407 |
|
---|
408 | extern void
|
---|
409 | InitializeSprite(DeviceIntPtr /* pDev */ ,
|
---|
410 | WindowPtr /* pWin */ );
|
---|
411 | extern void
|
---|
412 | FreeSprite(DeviceIntPtr pDev);
|
---|
413 |
|
---|
414 | extern void
|
---|
415 | UpdateSpriteForScreen(DeviceIntPtr /* pDev */ ,
|
---|
416 | ScreenPtr /* pScreen */ );
|
---|
417 |
|
---|
418 | extern _X_EXPORT void
|
---|
419 | WindowHasNewCursor(WindowPtr /* pWin */ );
|
---|
420 |
|
---|
421 | extern Bool
|
---|
422 | CheckDeviceGrabs(DeviceIntPtr /* device */ ,
|
---|
423 | DeviceEvent * /* event */ ,
|
---|
424 | WindowPtr /* ancestor */ );
|
---|
425 |
|
---|
426 | extern void
|
---|
427 | DeliverFocusedEvent(DeviceIntPtr /* keybd */ ,
|
---|
428 | InternalEvent * /* event */ ,
|
---|
429 | WindowPtr /* window */ );
|
---|
430 |
|
---|
431 | extern int
|
---|
432 | DeliverGrabbedEvent(InternalEvent * /* event */ ,
|
---|
433 | DeviceIntPtr /* thisDev */ ,
|
---|
434 | Bool /* deactivateGrab */ );
|
---|
435 |
|
---|
436 | extern void
|
---|
437 | FixKeyState(DeviceEvent * /* event */ ,
|
---|
438 | DeviceIntPtr /* keybd */ );
|
---|
439 |
|
---|
440 | extern void
|
---|
441 | RecalculateDeliverableEvents(WindowPtr /* pWin */ );
|
---|
442 |
|
---|
443 | extern _X_EXPORT int
|
---|
444 | OtherClientGone(pointer /* value */ ,
|
---|
445 | XID /* id */ );
|
---|
446 |
|
---|
447 | extern void
|
---|
448 | DoFocusEvents(DeviceIntPtr /* dev */ ,
|
---|
449 | WindowPtr /* fromWin */ ,
|
---|
450 | WindowPtr /* toWin */ ,
|
---|
451 | int /* mode */ );
|
---|
452 |
|
---|
453 | extern int
|
---|
454 | SetInputFocus(ClientPtr /* client */ ,
|
---|
455 | DeviceIntPtr /* dev */ ,
|
---|
456 | Window /* focusID */ ,
|
---|
457 | CARD8 /* revertTo */ ,
|
---|
458 | Time /* ctime */ ,
|
---|
459 | Bool /* followOK */ );
|
---|
460 |
|
---|
461 | extern int
|
---|
462 | GrabDevice(ClientPtr /* client */ ,
|
---|
463 | DeviceIntPtr /* dev */ ,
|
---|
464 | unsigned /* this_mode */ ,
|
---|
465 | unsigned /* other_mode */ ,
|
---|
466 | Window /* grabWindow */ ,
|
---|
467 | unsigned /* ownerEvents */ ,
|
---|
468 | Time /* ctime */ ,
|
---|
469 | GrabMask * /* mask */ ,
|
---|
470 | int /* grabtype */ ,
|
---|
471 | Cursor /* curs */ ,
|
---|
472 | Window /* confineToWin */ ,
|
---|
473 | CARD8 * /* status */ );
|
---|
474 |
|
---|
475 | extern void
|
---|
476 | InitEvents(void);
|
---|
477 |
|
---|
478 | extern void
|
---|
479 | CloseDownEvents(void);
|
---|
480 |
|
---|
481 | extern void
|
---|
482 | DeleteWindowFromAnyEvents(WindowPtr /* pWin */ ,
|
---|
483 | Bool /* freeResources */ );
|
---|
484 |
|
---|
485 | extern Mask
|
---|
486 | EventMaskForClient(WindowPtr /* pWin */ ,
|
---|
487 | ClientPtr /* client */ );
|
---|
488 |
|
---|
489 | extern _X_EXPORT int
|
---|
490 | DeliverEvents(WindowPtr /*pWin */ ,
|
---|
491 | xEventPtr /*xE */ ,
|
---|
492 | int /*count */ ,
|
---|
493 | WindowPtr /*otherParent */ );
|
---|
494 |
|
---|
495 | extern Bool
|
---|
496 | CheckMotion(DeviceEvent * /* ev */ ,
|
---|
497 | DeviceIntPtr /* pDev */ );
|
---|
498 |
|
---|
499 | extern _X_EXPORT void
|
---|
500 | WriteEventsToClient(ClientPtr /*pClient */ ,
|
---|
501 | int /*count */ ,
|
---|
502 | xEventPtr /*events */ );
|
---|
503 |
|
---|
504 | extern _X_EXPORT int
|
---|
505 | TryClientEvents(ClientPtr /*client */ ,
|
---|
506 | DeviceIntPtr /* device */ ,
|
---|
507 | xEventPtr /*pEvents */ ,
|
---|
508 | int /*count */ ,
|
---|
509 | Mask /*mask */ ,
|
---|
510 | Mask /*filter */ ,
|
---|
511 | GrabPtr /*grab */ );
|
---|
512 |
|
---|
513 | extern _X_EXPORT void
|
---|
514 | WindowsRestructured(void);
|
---|
515 |
|
---|
516 | extern int
|
---|
517 | SetClientPointer(ClientPtr /* client */ ,
|
---|
518 | DeviceIntPtr /* device */ );
|
---|
519 |
|
---|
520 | extern _X_EXPORT DeviceIntPtr
|
---|
521 | PickPointer(ClientPtr /* client */ );
|
---|
522 |
|
---|
523 | extern _X_EXPORT DeviceIntPtr
|
---|
524 | PickKeyboard(ClientPtr /* client */ );
|
---|
525 |
|
---|
526 | extern Bool
|
---|
527 | IsInterferingGrab(ClientPtr /* client */ ,
|
---|
528 | DeviceIntPtr /* dev */ ,
|
---|
529 | xEvent * /* events */ );
|
---|
530 |
|
---|
531 | #ifdef PANORAMIX
|
---|
532 | extern _X_EXPORT void
|
---|
533 | ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
|
---|
534 | #endif
|
---|
535 |
|
---|
536 | #ifdef RANDR
|
---|
537 | extern _X_EXPORT void
|
---|
538 | ScreenRestructured(ScreenPtr pScreen);
|
---|
539 | #endif
|
---|
540 |
|
---|
541 | #ifndef HAVE_FFS
|
---|
542 | extern _X_EXPORT int
|
---|
543 | ffs(int i);
|
---|
544 | #endif
|
---|
545 |
|
---|
546 | /*
|
---|
547 | * ServerGrabCallback stuff
|
---|
548 | */
|
---|
549 |
|
---|
550 | extern _X_EXPORT CallbackListPtr ServerGrabCallback;
|
---|
551 |
|
---|
552 | typedef enum { SERVER_GRABBED, SERVER_UNGRABBED,
|
---|
553 | CLIENT_PERVIOUS, CLIENT_IMPERVIOUS
|
---|
554 | } ServerGrabState;
|
---|
555 |
|
---|
556 | typedef struct {
|
---|
557 | ClientPtr client;
|
---|
558 | ServerGrabState grabstate;
|
---|
559 | } ServerGrabInfoRec;
|
---|
560 |
|
---|
561 | /*
|
---|
562 | * EventCallback stuff
|
---|
563 | */
|
---|
564 |
|
---|
565 | extern _X_EXPORT CallbackListPtr EventCallback;
|
---|
566 |
|
---|
567 | typedef struct {
|
---|
568 | ClientPtr client;
|
---|
569 | xEventPtr events;
|
---|
570 | int count;
|
---|
571 | } EventInfoRec;
|
---|
572 |
|
---|
573 | /*
|
---|
574 | * DeviceEventCallback stuff
|
---|
575 | */
|
---|
576 |
|
---|
577 | extern _X_EXPORT CallbackListPtr DeviceEventCallback;
|
---|
578 |
|
---|
579 | typedef struct {
|
---|
580 | InternalEvent *event;
|
---|
581 | DeviceIntPtr device;
|
---|
582 | } DeviceEventInfoRec;
|
---|
583 |
|
---|
584 | extern int
|
---|
585 | XItoCoreType(int xi_type);
|
---|
586 | extern Bool
|
---|
587 | DevHasCursor(DeviceIntPtr pDev);
|
---|
588 | extern _X_EXPORT Bool
|
---|
589 | IsPointerDevice(DeviceIntPtr dev);
|
---|
590 | extern _X_EXPORT Bool
|
---|
591 | IsKeyboardDevice(DeviceIntPtr dev);
|
---|
592 | extern Bool
|
---|
593 | IsPointerEvent(InternalEvent *event);
|
---|
594 | extern Bool
|
---|
595 | IsTouchEvent(InternalEvent *event);
|
---|
596 | extern _X_EXPORT Bool
|
---|
597 | IsMaster(DeviceIntPtr dev);
|
---|
598 | extern _X_EXPORT Bool
|
---|
599 | IsFloating(DeviceIntPtr dev);
|
---|
600 |
|
---|
601 | extern _X_HIDDEN void
|
---|
602 | CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master);
|
---|
603 | extern _X_HIDDEN int
|
---|
604 | CorePointerProc(DeviceIntPtr dev, int what);
|
---|
605 | extern _X_HIDDEN int
|
---|
606 | CoreKeyboardProc(DeviceIntPtr dev, int what);
|
---|
607 |
|
---|
608 | #endif /* DIX_H */
|
---|