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