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 | typedef void (* WakeupHandlerProcPtr)(
|
---|
233 | pointer /* blockData */,
|
---|
234 | int /* result */,
|
---|
235 | pointer /* pReadmask */);
|
---|
236 |
|
---|
237 | extern Bool RegisterBlockAndWakeupHandlers(
|
---|
238 | BlockHandlerProcPtr /*blockHandler*/,
|
---|
239 | WakeupHandlerProcPtr /*wakeupHandler*/,
|
---|
240 | pointer /*blockData*/);
|
---|
241 |
|
---|
242 | extern void RemoveBlockAndWakeupHandlers(
|
---|
243 | BlockHandlerProcPtr /*blockHandler*/,
|
---|
244 | WakeupHandlerProcPtr /*wakeupHandler*/,
|
---|
245 | pointer /*blockData*/);
|
---|
246 |
|
---|
247 | extern void InitBlockAndWakeupHandlers(void);
|
---|
248 |
|
---|
249 | extern void ProcessWorkQueue(void);
|
---|
250 |
|
---|
251 | extern void ProcessWorkQueueZombies(void);
|
---|
252 |
|
---|
253 | extern Bool QueueWorkProc(
|
---|
254 | Bool (* /*function*/)(
|
---|
255 | ClientPtr /*clientUnused*/,
|
---|
256 | pointer /*closure*/),
|
---|
257 | ClientPtr /*client*/,
|
---|
258 | pointer /*closure*/
|
---|
259 | );
|
---|
260 |
|
---|
261 | typedef Bool (* ClientSleepProcPtr)(
|
---|
262 | ClientPtr /*client*/,
|
---|
263 | pointer /*closure*/);
|
---|
264 |
|
---|
265 | extern Bool ClientSleep(
|
---|
266 | ClientPtr /*client*/,
|
---|
267 | ClientSleepProcPtr /* function */,
|
---|
268 | pointer /*closure*/);
|
---|
269 |
|
---|
270 | #ifndef ___CLIENTSIGNAL_DEFINED___
|
---|
271 | #define ___CLIENTSIGNAL_DEFINED___
|
---|
272 | extern Bool ClientSignal(
|
---|
273 | ClientPtr /*client*/);
|
---|
274 | #endif /* ___CLIENTSIGNAL_DEFINED___ */
|
---|
275 |
|
---|
276 | extern void ClientWakeup(
|
---|
277 | ClientPtr /*client*/);
|
---|
278 |
|
---|
279 | extern Bool ClientIsAsleep(
|
---|
280 | ClientPtr /*client*/);
|
---|
281 |
|
---|
282 | /* atom.c */
|
---|
283 |
|
---|
284 | extern Atom MakeAtom(
|
---|
285 | char * /*string*/,
|
---|
286 | unsigned /*len*/,
|
---|
287 | Bool /*makeit*/);
|
---|
288 |
|
---|
289 | extern Bool ValidAtom(
|
---|
290 | Atom /*atom*/);
|
---|
291 |
|
---|
292 | extern char *NameForAtom(
|
---|
293 | Atom /*atom*/);
|
---|
294 |
|
---|
295 | extern void AtomError(void);
|
---|
296 |
|
---|
297 | extern void FreeAllAtoms(void);
|
---|
298 |
|
---|
299 | extern void InitAtoms(void);
|
---|
300 |
|
---|
301 | /* main.c */
|
---|
302 |
|
---|
303 | extern void SetVendorRelease(int release);
|
---|
304 |
|
---|
305 | extern void SetVendorString(char *string);
|
---|
306 |
|
---|
307 | /* events.c */
|
---|
308 |
|
---|
309 | extern void SetMaskForEvent(
|
---|
310 | int /* deviceid */,
|
---|
311 | Mask /* mask */,
|
---|
312 | int /* event */);
|
---|
313 |
|
---|
314 | extern void ConfineToShape(
|
---|
315 | DeviceIntPtr /* pDev */,
|
---|
316 | RegionPtr /* shape */,
|
---|
317 | int* /* px */,
|
---|
318 | int* /* py */);
|
---|
319 |
|
---|
320 | extern Bool IsParent(
|
---|
321 | WindowPtr /* maybeparent */,
|
---|
322 | WindowPtr /* child */);
|
---|
323 |
|
---|
324 | extern WindowPtr GetCurrentRootWindow(DeviceIntPtr pDev);
|
---|
325 |
|
---|
326 | extern WindowPtr GetSpriteWindow(DeviceIntPtr pDev);
|
---|
327 |
|
---|
328 |
|
---|
329 | extern void NoticeEventTime(xEventPtr /* xE */);
|
---|
330 |
|
---|
331 | extern void EnqueueEvent(
|
---|
332 | xEventPtr /* xE */,
|
---|
333 | DeviceIntPtr /* device */,
|
---|
334 | int /* count */);
|
---|
335 |
|
---|
336 | extern void ActivatePointerGrab(
|
---|
337 | DeviceIntPtr /* mouse */,
|
---|
338 | GrabPtr /* grab */,
|
---|
339 | TimeStamp /* time */,
|
---|
340 | Bool /* autoGrab */);
|
---|
341 |
|
---|
342 | extern void DeactivatePointerGrab(
|
---|
343 | DeviceIntPtr /* mouse */);
|
---|
344 |
|
---|
345 | extern void ActivateKeyboardGrab(
|
---|
346 | DeviceIntPtr /* keybd */,
|
---|
347 | GrabPtr /* grab */,
|
---|
348 | TimeStamp /* time */,
|
---|
349 | Bool /* passive */);
|
---|
350 |
|
---|
351 | extern void DeactivateKeyboardGrab(
|
---|
352 | DeviceIntPtr /* keybd */);
|
---|
353 |
|
---|
354 | extern void AllowSome(
|
---|
355 | ClientPtr /* client */,
|
---|
356 | TimeStamp /* time */,
|
---|
357 | DeviceIntPtr /* thisDev */,
|
---|
358 | int /* newState */,
|
---|
359 | Bool /* core */);
|
---|
360 |
|
---|
361 | extern void ReleaseActiveGrabs(
|
---|
362 | ClientPtr client);
|
---|
363 |
|
---|
364 | extern int DeliverEventsToWindow(
|
---|
365 | DeviceIntPtr /* pWin */,
|
---|
366 | WindowPtr /* pWin */,
|
---|
367 | xEventPtr /* pEvents */,
|
---|
368 | int /* count */,
|
---|
369 | Mask /* filter */,
|
---|
370 | GrabPtr /* grab */,
|
---|
371 | int /* mskidx */);
|
---|
372 |
|
---|
373 | extern int DeliverDeviceEvents(
|
---|
374 | WindowPtr /* pWin */,
|
---|
375 | xEventPtr /* xE */,
|
---|
376 | GrabPtr /* grab */,
|
---|
377 | WindowPtr /* stopAt */,
|
---|
378 | DeviceIntPtr /* dev */,
|
---|
379 | int /* count */);
|
---|
380 |
|
---|
381 | extern void DefineInitialRootWindow(
|
---|
382 | WindowPtr /* win */);
|
---|
383 |
|
---|
384 | extern void SetupSprite(
|
---|
385 | DeviceIntPtr /* pDev */,
|
---|
386 | ScreenPtr /* pScreen */);
|
---|
387 |
|
---|
388 | extern void InitializeSprite(
|
---|
389 | DeviceIntPtr /* pDev */,
|
---|
390 | WindowPtr /* pWin */);
|
---|
391 |
|
---|
392 | extern void UpdateSpriteForScreen(
|
---|
393 | DeviceIntPtr /* pDev */,
|
---|
394 | ScreenPtr /* pScreen */);
|
---|
395 |
|
---|
396 | extern void WindowHasNewCursor(
|
---|
397 | WindowPtr /* pWin */);
|
---|
398 |
|
---|
399 | extern Bool CheckDeviceGrabs(
|
---|
400 | DeviceIntPtr /* device */,
|
---|
401 | xEventPtr /* xE */,
|
---|
402 | int /* checkFirst */,
|
---|
403 | int /* count */);
|
---|
404 |
|
---|
405 | extern void DeliverFocusedEvent(
|
---|
406 | DeviceIntPtr /* keybd */,
|
---|
407 | xEventPtr /* xE */,
|
---|
408 | WindowPtr /* window */,
|
---|
409 | int /* count */);
|
---|
410 |
|
---|
411 | extern void DeliverGrabbedEvent(
|
---|
412 | xEventPtr /* xE */,
|
---|
413 | DeviceIntPtr /* thisDev */,
|
---|
414 | Bool /* deactivateGrab */,
|
---|
415 | int /* count */);
|
---|
416 |
|
---|
417 | #ifdef XKB
|
---|
418 | extern void FixKeyState(
|
---|
419 | xEvent * /* xE */,
|
---|
420 | DeviceIntPtr /* keybd */);
|
---|
421 | #endif /* XKB */
|
---|
422 |
|
---|
423 | extern void RecalculateDeliverableEvents(
|
---|
424 | WindowPtr /* pWin */);
|
---|
425 |
|
---|
426 | extern int OtherClientGone(
|
---|
427 | pointer /* value */,
|
---|
428 | XID /* id */);
|
---|
429 |
|
---|
430 | extern void DoFocusEvents(
|
---|
431 | DeviceIntPtr /* dev */,
|
---|
432 | WindowPtr /* fromWin */,
|
---|
433 | WindowPtr /* toWin */,
|
---|
434 | int /* mode */);
|
---|
435 |
|
---|
436 | extern int SetInputFocus(
|
---|
437 | ClientPtr /* client */,
|
---|
438 | DeviceIntPtr /* dev */,
|
---|
439 | Window /* focusID */,
|
---|
440 | CARD8 /* revertTo */,
|
---|
441 | Time /* ctime */,
|
---|
442 | Bool /* followOK */);
|
---|
443 |
|
---|
444 | extern int GrabDevice(
|
---|
445 | ClientPtr /* client */,
|
---|
446 | DeviceIntPtr /* dev */,
|
---|
447 | unsigned /* this_mode */,
|
---|
448 | unsigned /* other_mode */,
|
---|
449 | Window /* grabWindow */,
|
---|
450 | unsigned /* ownerEvents */,
|
---|
451 | Time /* ctime */,
|
---|
452 | Mask /* mask */,
|
---|
453 | CARD8 * /* status */,
|
---|
454 | Bool /* coreGrab */);
|
---|
455 |
|
---|
456 | extern void InitEvents(void);
|
---|
457 | extern void InitSprite(
|
---|
458 | DeviceIntPtr /* pDev */,
|
---|
459 | Bool /* hasCursor */
|
---|
460 | );
|
---|
461 |
|
---|
462 | extern void CloseDownEvents(void);
|
---|
463 |
|
---|
464 | extern void DeleteWindowFromAnyEvents(
|
---|
465 | WindowPtr /* pWin */,
|
---|
466 | Bool /* freeResources */);
|
---|
467 |
|
---|
468 |
|
---|
469 | extern Mask EventMaskForClient(
|
---|
470 | WindowPtr /* pWin */,
|
---|
471 | ClientPtr /* client */);
|
---|
472 |
|
---|
473 |
|
---|
474 |
|
---|
475 | extern int DeliverEvents(
|
---|
476 | WindowPtr /*pWin*/,
|
---|
477 | xEventPtr /*xE*/,
|
---|
478 | int /*count*/,
|
---|
479 | WindowPtr /*otherParent*/);
|
---|
480 |
|
---|
481 | extern Bool
|
---|
482 | CheckMotion(
|
---|
483 | xEvent* /* xE */,
|
---|
484 | DeviceIntPtr /* pDev */);
|
---|
485 |
|
---|
486 | extern void WriteEventsToClient(
|
---|
487 | ClientPtr /*pClient*/,
|
---|
488 | int /*count*/,
|
---|
489 | xEventPtr /*events*/);
|
---|
490 |
|
---|
491 | extern int TryClientEvents(
|
---|
492 | ClientPtr /*client*/,
|
---|
493 | DeviceIntPtr /* device */,
|
---|
494 | xEventPtr /*pEvents*/,
|
---|
495 | int /*count*/,
|
---|
496 | Mask /*mask*/,
|
---|
497 | Mask /*filter*/,
|
---|
498 | GrabPtr /*grab*/);
|
---|
499 |
|
---|
500 | extern void WindowsRestructured(void);
|
---|
501 |
|
---|
502 | extern Bool SetClientPointer(
|
---|
503 | ClientPtr /* client */,
|
---|
504 | ClientPtr /* setter */,
|
---|
505 | DeviceIntPtr /* device */);
|
---|
506 |
|
---|
507 | extern DeviceIntPtr PickPointer(
|
---|
508 | ClientPtr /* client */);
|
---|
509 |
|
---|
510 | extern DeviceIntPtr PickKeyboard(
|
---|
511 | ClientPtr /* client */);
|
---|
512 |
|
---|
513 | extern Bool IsInterferingGrab(
|
---|
514 | ClientPtr /* client */,
|
---|
515 | DeviceIntPtr /* dev */,
|
---|
516 | xEvent* /* events */);
|
---|
517 |
|
---|
518 | #ifdef PANORAMIX
|
---|
519 | extern void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
|
---|
520 | #endif
|
---|
521 |
|
---|
522 | #ifdef RANDR
|
---|
523 | void
|
---|
524 | ScreenRestructured (ScreenPtr pScreen);
|
---|
525 | #endif
|
---|
526 |
|
---|
527 | extern int ffs(int i);
|
---|
528 |
|
---|
529 | /*
|
---|
530 | * callback manager stuff
|
---|
531 | */
|
---|
532 |
|
---|
533 | #ifndef _XTYPEDEF_CALLBACKLISTPTR
|
---|
534 | typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */
|
---|
535 | #define _XTYPEDEF_CALLBACKLISTPTR
|
---|
536 | #endif
|
---|
537 |
|
---|
538 | typedef void (*CallbackProcPtr) (
|
---|
539 | CallbackListPtr *, pointer, pointer);
|
---|
540 |
|
---|
541 | extern Bool AddCallback(
|
---|
542 | CallbackListPtr * /*pcbl*/,
|
---|
543 | CallbackProcPtr /*callback*/,
|
---|
544 | pointer /*data*/);
|
---|
545 |
|
---|
546 | extern Bool DeleteCallback(
|
---|
547 | CallbackListPtr * /*pcbl*/,
|
---|
548 | CallbackProcPtr /*callback*/,
|
---|
549 | pointer /*data*/);
|
---|
550 |
|
---|
551 | extern void CallCallbacks(
|
---|
552 | CallbackListPtr * /*pcbl*/,
|
---|
553 | pointer /*call_data*/);
|
---|
554 |
|
---|
555 | extern void DeleteCallbackList(
|
---|
556 | CallbackListPtr * /*pcbl*/);
|
---|
557 |
|
---|
558 | extern void InitCallbackManager(void);
|
---|
559 |
|
---|
560 | /*
|
---|
561 | * ServerGrabCallback stuff
|
---|
562 | */
|
---|
563 |
|
---|
564 | extern CallbackListPtr ServerGrabCallback;
|
---|
565 |
|
---|
566 | typedef enum {SERVER_GRABBED, SERVER_UNGRABBED,
|
---|
567 | CLIENT_PERVIOUS, CLIENT_IMPERVIOUS } ServerGrabState;
|
---|
568 |
|
---|
569 | typedef struct {
|
---|
570 | ClientPtr client;
|
---|
571 | ServerGrabState grabstate;
|
---|
572 | } ServerGrabInfoRec;
|
---|
573 |
|
---|
574 | /*
|
---|
575 | * EventCallback stuff
|
---|
576 | */
|
---|
577 |
|
---|
578 | extern CallbackListPtr EventCallback;
|
---|
579 |
|
---|
580 | typedef struct {
|
---|
581 | ClientPtr client;
|
---|
582 | xEventPtr events;
|
---|
583 | int count;
|
---|
584 | } EventInfoRec;
|
---|
585 |
|
---|
586 | /*
|
---|
587 | * DeviceEventCallback stuff
|
---|
588 | */
|
---|
589 |
|
---|
590 | extern CallbackListPtr DeviceEventCallback;
|
---|
591 |
|
---|
592 | typedef struct {
|
---|
593 | xEventPtr events;
|
---|
594 | int count;
|
---|
595 | } DeviceEventInfoRec;
|
---|
596 |
|
---|
597 | extern int XItoCoreType(int xi_type);
|
---|
598 | extern Bool DevHasCursor(DeviceIntPtr pDev);
|
---|
599 | extern Bool IsPointerDevice( DeviceIntPtr dev);
|
---|
600 | extern Bool IsKeyboardDevice(DeviceIntPtr dev);
|
---|
601 | extern Bool IsPointerEvent(xEvent* xE);
|
---|
602 |
|
---|
603 | /*
|
---|
604 | * These are deprecated compatibility functions and will be removed soon!
|
---|
605 | * Please use the noted replacements instead.
|
---|
606 | */
|
---|
607 | /* replaced by dixLookupWindow */
|
---|
608 | extern WindowPtr SecurityLookupWindow(
|
---|
609 | XID id,
|
---|
610 | ClientPtr client,
|
---|
611 | Mask access_mode);
|
---|
612 | /* replaced by dixLookupWindow */
|
---|
613 | extern WindowPtr LookupWindow(
|
---|
614 | XID id,
|
---|
615 | ClientPtr client);
|
---|
616 |
|
---|
617 | /* replaced by dixLookupDrawable */
|
---|
618 | extern pointer SecurityLookupDrawable(
|
---|
619 | XID id,
|
---|
620 | ClientPtr client,
|
---|
621 | Mask access_mode);
|
---|
622 |
|
---|
623 | /* replaced by dixLookupDrawable */
|
---|
624 | extern pointer LookupDrawable(
|
---|
625 | XID id,
|
---|
626 | ClientPtr client);
|
---|
627 |
|
---|
628 | /* replaced by dixLookupClient */
|
---|
629 | extern ClientPtr LookupClient(
|
---|
630 | XID id,
|
---|
631 | ClientPtr client);
|
---|
632 |
|
---|
633 | /* GE stuff */
|
---|
634 | extern void SetGenericFilter(int extension, Mask* filters);
|
---|
635 | extern int ExtGrabDevice(ClientPtr client,
|
---|
636 | DeviceIntPtr dev,
|
---|
637 | int device_mode,
|
---|
638 | WindowPtr grabWindow,
|
---|
639 | WindowPtr confineTo,
|
---|
640 | TimeStamp ctime,
|
---|
641 | Bool ownerEvents,
|
---|
642 | CursorPtr cursor,
|
---|
643 | Mask xi_mask,
|
---|
644 | GenericMaskPtr ge_masks);
|
---|
645 | #endif /* DIX_H */
|
---|