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 rc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode);\
|
---|
92 | if (rc != Success)\
|
---|
93 | return rc;\
|
---|
94 | rc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);\
|
---|
95 | if (rc != Success)\
|
---|
96 | return rc;\
|
---|
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 | NoticeEventTime(InternalEvent *ev,
|
---|
319 | DeviceIntPtr dev);
|
---|
320 |
|
---|
321 | extern void
|
---|
322 | EnqueueEvent(InternalEvent * /* ev */ ,
|
---|
323 | DeviceIntPtr /* device */ );
|
---|
324 | extern void
|
---|
325 | PlayReleasedEvents(void);
|
---|
326 |
|
---|
327 | extern void
|
---|
328 | ActivatePointerGrab(DeviceIntPtr /* mouse */ ,
|
---|
329 | GrabPtr /* grab */ ,
|
---|
330 | TimeStamp /* time */ ,
|
---|
331 | Bool /* autoGrab */ );
|
---|
332 |
|
---|
333 | extern void
|
---|
334 | DeactivatePointerGrab(DeviceIntPtr /* mouse */ );
|
---|
335 |
|
---|
336 | extern void
|
---|
337 | ActivateKeyboardGrab(DeviceIntPtr /* keybd */ ,
|
---|
338 | GrabPtr /* grab */ ,
|
---|
339 | TimeStamp /* time */ ,
|
---|
340 | Bool /* passive */ );
|
---|
341 |
|
---|
342 | extern void
|
---|
343 | DeactivateKeyboardGrab(DeviceIntPtr /* keybd */ );
|
---|
344 |
|
---|
345 | extern BOOL
|
---|
346 | ActivateFocusInGrab(DeviceIntPtr /* dev */ ,
|
---|
347 | WindowPtr /* old */ ,
|
---|
348 | WindowPtr /* win */ );
|
---|
349 |
|
---|
350 | extern void
|
---|
351 | AllowSome(ClientPtr /* client */ ,
|
---|
352 | TimeStamp /* time */ ,
|
---|
353 | DeviceIntPtr /* thisDev */ ,
|
---|
354 | int /* newState */ );
|
---|
355 |
|
---|
356 | extern void
|
---|
357 | ReleaseActiveGrabs(ClientPtr client);
|
---|
358 |
|
---|
359 | extern GrabPtr
|
---|
360 | CheckPassiveGrabsOnWindow(WindowPtr /* pWin */ ,
|
---|
361 | DeviceIntPtr /* device */ ,
|
---|
362 | InternalEvent * /* event */ ,
|
---|
363 | BOOL /* checkCore */ ,
|
---|
364 | BOOL /* activate */ );
|
---|
365 |
|
---|
366 | extern _X_EXPORT int
|
---|
367 | DeliverEventsToWindow(DeviceIntPtr /* pWin */ ,
|
---|
368 | WindowPtr /* pWin */ ,
|
---|
369 | xEventPtr /* pEvents */ ,
|
---|
370 | int /* count */ ,
|
---|
371 | Mask /* filter */ ,
|
---|
372 | GrabPtr /* grab */ );
|
---|
373 |
|
---|
374 | extern _X_EXPORT void
|
---|
375 | DeliverRawEvent(RawDeviceEvent * /* ev */ ,
|
---|
376 | DeviceIntPtr /* dev */
|
---|
377 | );
|
---|
378 |
|
---|
379 | extern int
|
---|
380 | DeliverDeviceEvents(WindowPtr /* pWin */ ,
|
---|
381 | InternalEvent * /* event */ ,
|
---|
382 | GrabPtr /* grab */ ,
|
---|
383 | WindowPtr /* stopAt */ ,
|
---|
384 | DeviceIntPtr /* dev */ );
|
---|
385 |
|
---|
386 | extern int
|
---|
387 | DeliverOneGrabbedEvent(InternalEvent * /* event */ ,
|
---|
388 | DeviceIntPtr /* dev */ ,
|
---|
389 | enum InputLevel /* level */ );
|
---|
390 |
|
---|
391 | extern void
|
---|
392 | DeliverTouchEvents(DeviceIntPtr /* dev */ ,
|
---|
393 | TouchPointInfoPtr /* ti */ ,
|
---|
394 | InternalEvent * /* ev */ ,
|
---|
395 | XID /* resource */ );
|
---|
396 |
|
---|
397 | extern void
|
---|
398 | InitializeSprite(DeviceIntPtr /* pDev */ ,
|
---|
399 | WindowPtr /* pWin */ );
|
---|
400 | extern void
|
---|
401 | FreeSprite(DeviceIntPtr pDev);
|
---|
402 |
|
---|
403 | extern void
|
---|
404 | UpdateSpriteForScreen(DeviceIntPtr /* pDev */ ,
|
---|
405 | ScreenPtr /* pScreen */ );
|
---|
406 |
|
---|
407 | extern _X_EXPORT void
|
---|
408 | WindowHasNewCursor(WindowPtr /* pWin */ );
|
---|
409 |
|
---|
410 | extern Bool
|
---|
411 | CheckDeviceGrabs(DeviceIntPtr /* device */ ,
|
---|
412 | DeviceEvent * /* event */ ,
|
---|
413 | WindowPtr /* ancestor */ );
|
---|
414 |
|
---|
415 | extern void
|
---|
416 | DeliverFocusedEvent(DeviceIntPtr /* keybd */ ,
|
---|
417 | InternalEvent * /* event */ ,
|
---|
418 | WindowPtr /* window */ );
|
---|
419 |
|
---|
420 | extern int
|
---|
421 | DeliverGrabbedEvent(InternalEvent * /* event */ ,
|
---|
422 | DeviceIntPtr /* thisDev */ ,
|
---|
423 | Bool /* deactivateGrab */ );
|
---|
424 |
|
---|
425 | extern void
|
---|
426 | FixKeyState(DeviceEvent * /* event */ ,
|
---|
427 | DeviceIntPtr /* keybd */ );
|
---|
428 |
|
---|
429 | extern void
|
---|
430 | RecalculateDeliverableEvents(WindowPtr /* pWin */ );
|
---|
431 |
|
---|
432 | extern _X_EXPORT int
|
---|
433 | OtherClientGone(pointer /* value */ ,
|
---|
434 | XID /* id */ );
|
---|
435 |
|
---|
436 | extern void
|
---|
437 | DoFocusEvents(DeviceIntPtr /* dev */ ,
|
---|
438 | WindowPtr /* fromWin */ ,
|
---|
439 | WindowPtr /* toWin */ ,
|
---|
440 | int /* mode */ );
|
---|
441 |
|
---|
442 | extern int
|
---|
443 | SetInputFocus(ClientPtr /* client */ ,
|
---|
444 | DeviceIntPtr /* dev */ ,
|
---|
445 | Window /* focusID */ ,
|
---|
446 | CARD8 /* revertTo */ ,
|
---|
447 | Time /* ctime */ ,
|
---|
448 | Bool /* followOK */ );
|
---|
449 |
|
---|
450 | extern int
|
---|
451 | GrabDevice(ClientPtr /* client */ ,
|
---|
452 | DeviceIntPtr /* dev */ ,
|
---|
453 | unsigned /* this_mode */ ,
|
---|
454 | unsigned /* other_mode */ ,
|
---|
455 | Window /* grabWindow */ ,
|
---|
456 | unsigned /* ownerEvents */ ,
|
---|
457 | Time /* ctime */ ,
|
---|
458 | GrabMask * /* mask */ ,
|
---|
459 | int /* grabtype */ ,
|
---|
460 | Cursor /* curs */ ,
|
---|
461 | Window /* confineToWin */ ,
|
---|
462 | CARD8 * /* status */ );
|
---|
463 |
|
---|
464 | extern void
|
---|
465 | InitEvents(void);
|
---|
466 |
|
---|
467 | extern void
|
---|
468 | CloseDownEvents(void);
|
---|
469 |
|
---|
470 | extern void
|
---|
471 | DeleteWindowFromAnyEvents(WindowPtr /* pWin */ ,
|
---|
472 | Bool /* freeResources */ );
|
---|
473 |
|
---|
474 | extern Mask
|
---|
475 | EventMaskForClient(WindowPtr /* pWin */ ,
|
---|
476 | ClientPtr /* client */ );
|
---|
477 |
|
---|
478 | extern _X_EXPORT int
|
---|
479 | DeliverEvents(WindowPtr /*pWin */ ,
|
---|
480 | xEventPtr /*xE */ ,
|
---|
481 | int /*count */ ,
|
---|
482 | WindowPtr /*otherParent */ );
|
---|
483 |
|
---|
484 | extern Bool
|
---|
485 | CheckMotion(DeviceEvent * /* ev */ ,
|
---|
486 | DeviceIntPtr /* pDev */ );
|
---|
487 |
|
---|
488 | extern _X_EXPORT void
|
---|
489 | WriteEventsToClient(ClientPtr /*pClient */ ,
|
---|
490 | int /*count */ ,
|
---|
491 | xEventPtr /*events */ );
|
---|
492 |
|
---|
493 | extern _X_EXPORT int
|
---|
494 | TryClientEvents(ClientPtr /*client */ ,
|
---|
495 | DeviceIntPtr /* device */ ,
|
---|
496 | xEventPtr /*pEvents */ ,
|
---|
497 | int /*count */ ,
|
---|
498 | Mask /*mask */ ,
|
---|
499 | Mask /*filter */ ,
|
---|
500 | GrabPtr /*grab */ );
|
---|
501 |
|
---|
502 | extern _X_EXPORT void
|
---|
503 | WindowsRestructured(void);
|
---|
504 |
|
---|
505 | extern int
|
---|
506 | SetClientPointer(ClientPtr /* client */ ,
|
---|
507 | DeviceIntPtr /* device */ );
|
---|
508 |
|
---|
509 | extern _X_EXPORT DeviceIntPtr
|
---|
510 | PickPointer(ClientPtr /* client */ );
|
---|
511 |
|
---|
512 | extern _X_EXPORT DeviceIntPtr
|
---|
513 | PickKeyboard(ClientPtr /* client */ );
|
---|
514 |
|
---|
515 | extern Bool
|
---|
516 | IsInterferingGrab(ClientPtr /* client */ ,
|
---|
517 | DeviceIntPtr /* dev */ ,
|
---|
518 | xEvent * /* events */ );
|
---|
519 |
|
---|
520 | #ifdef PANORAMIX
|
---|
521 | extern _X_EXPORT void
|
---|
522 | ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
|
---|
523 | #endif
|
---|
524 |
|
---|
525 | #ifdef RANDR
|
---|
526 | extern _X_EXPORT void
|
---|
527 | ScreenRestructured(ScreenPtr pScreen);
|
---|
528 | #endif
|
---|
529 |
|
---|
530 | #ifndef HAVE_FFS
|
---|
531 | extern _X_EXPORT int
|
---|
532 | ffs(int i);
|
---|
533 | #endif
|
---|
534 |
|
---|
535 | /*
|
---|
536 | * ServerGrabCallback stuff
|
---|
537 | */
|
---|
538 |
|
---|
539 | extern _X_EXPORT CallbackListPtr ServerGrabCallback;
|
---|
540 |
|
---|
541 | typedef enum { SERVER_GRABBED, SERVER_UNGRABBED,
|
---|
542 | CLIENT_PERVIOUS, CLIENT_IMPERVIOUS
|
---|
543 | } ServerGrabState;
|
---|
544 |
|
---|
545 | typedef struct {
|
---|
546 | ClientPtr client;
|
---|
547 | ServerGrabState grabstate;
|
---|
548 | } ServerGrabInfoRec;
|
---|
549 |
|
---|
550 | /*
|
---|
551 | * EventCallback stuff
|
---|
552 | */
|
---|
553 |
|
---|
554 | extern _X_EXPORT CallbackListPtr EventCallback;
|
---|
555 |
|
---|
556 | typedef struct {
|
---|
557 | ClientPtr client;
|
---|
558 | xEventPtr events;
|
---|
559 | int count;
|
---|
560 | } EventInfoRec;
|
---|
561 |
|
---|
562 | /*
|
---|
563 | * DeviceEventCallback stuff
|
---|
564 | */
|
---|
565 |
|
---|
566 | extern _X_EXPORT CallbackListPtr DeviceEventCallback;
|
---|
567 |
|
---|
568 | typedef struct {
|
---|
569 | InternalEvent *event;
|
---|
570 | DeviceIntPtr device;
|
---|
571 | } DeviceEventInfoRec;
|
---|
572 |
|
---|
573 | extern int
|
---|
574 | XItoCoreType(int xi_type);
|
---|
575 | extern Bool
|
---|
576 | DevHasCursor(DeviceIntPtr pDev);
|
---|
577 | extern _X_EXPORT Bool
|
---|
578 | IsPointerDevice(DeviceIntPtr dev);
|
---|
579 | extern _X_EXPORT Bool
|
---|
580 | IsKeyboardDevice(DeviceIntPtr dev);
|
---|
581 | extern Bool
|
---|
582 | IsPointerEvent(InternalEvent *event);
|
---|
583 | extern Bool
|
---|
584 | IsTouchEvent(InternalEvent *event);
|
---|
585 | extern _X_EXPORT Bool
|
---|
586 | IsMaster(DeviceIntPtr dev);
|
---|
587 | extern _X_EXPORT Bool
|
---|
588 | IsFloating(DeviceIntPtr dev);
|
---|
589 |
|
---|
590 | extern _X_HIDDEN void
|
---|
591 | CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master);
|
---|
592 | extern _X_HIDDEN int
|
---|
593 | CorePointerProc(DeviceIntPtr dev, int what);
|
---|
594 | extern _X_HIDDEN int
|
---|
595 | CoreKeyboardProc(DeviceIntPtr dev, int what);
|
---|
596 |
|
---|
597 | #endif /* DIX_H */
|
---|