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 |
|
---|
55 | #define EARLIER -1
|
---|
56 | #define SAMETIME 0
|
---|
57 | #define LATER 1
|
---|
58 |
|
---|
59 | #define NullClient ((ClientPtr) 0)
|
---|
60 | #define REQUEST(type) \
|
---|
61 | register type *stuff = (type *)client->requestBuffer
|
---|
62 |
|
---|
63 |
|
---|
64 | #define REQUEST_SIZE_MATCH(req)\
|
---|
65 | if ((sizeof(req) >> 2) != client->req_len)\
|
---|
66 | return(BadLength)
|
---|
67 |
|
---|
68 | #define REQUEST_AT_LEAST_SIZE(req) \
|
---|
69 | if ((sizeof(req) >> 2) > client->req_len )\
|
---|
70 | return(BadLength)
|
---|
71 |
|
---|
72 | #define REQUEST_FIXED_SIZE(req, n)\
|
---|
73 | if (((sizeof(req) >> 2) > client->req_len) || \
|
---|
74 | (((sizeof(req) + (n) + 3) >> 2) != client->req_len)) \
|
---|
75 | return(BadLength)
|
---|
76 |
|
---|
77 | #define LEGAL_NEW_RESOURCE(id,client)\
|
---|
78 | if (!LegalNewID(id,client)) \
|
---|
79 | {\
|
---|
80 | client->errorValue = id;\
|
---|
81 | return(BadIDChoice);\
|
---|
82 | }
|
---|
83 |
|
---|
84 | #define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\
|
---|
85 | {\
|
---|
86 | int rc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode);\
|
---|
87 | if (rc != Success)\
|
---|
88 | return rc;\
|
---|
89 | rc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);\
|
---|
90 | if (rc != Success)\
|
---|
91 | return rc;\
|
---|
92 | if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
|
---|
93 | return (BadMatch);\
|
---|
94 | }\
|
---|
95 | if (pGC->serialNumber != pDraw->serialNumber)\
|
---|
96 | ValidateGC(pDraw, pGC);
|
---|
97 |
|
---|
98 |
|
---|
99 | #define WriteReplyToClient(pClient, size, pReply) { \
|
---|
100 | if ((pClient)->swapped) \
|
---|
101 | (*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \
|
---|
102 | (pClient, (int)(size), pReply); \
|
---|
103 | else (void) WriteToClient(pClient, (int)(size), (char *)(pReply)); }
|
---|
104 |
|
---|
105 | #define WriteSwappedDataToClient(pClient, size, pbuf) \
|
---|
106 | if ((pClient)->swapped) \
|
---|
107 | (*(pClient)->pSwapReplyFunc)(pClient, (int)(size), pbuf); \
|
---|
108 | else (void) WriteToClient (pClient, (int)(size), (char *)(pbuf));
|
---|
109 |
|
---|
110 | typedef struct _TimeStamp *TimeStampPtr;
|
---|
111 |
|
---|
112 | #ifndef _XTYPEDEF_CLIENTPTR
|
---|
113 | typedef struct _Client *ClientPtr; /* also in misc.h */
|
---|
114 | #define _XTYPEDEF_CLIENTPTR
|
---|
115 | #endif
|
---|
116 |
|
---|
117 | typedef struct _WorkQueue *WorkQueuePtr;
|
---|
118 |
|
---|
119 | #ifdef XPRINT
|
---|
120 | extern ClientPtr requestingClient;
|
---|
121 | #endif
|
---|
122 | extern ClientPtr *clients;
|
---|
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 | #if defined(DDXBEFORERESET)
|
---|
173 | extern void ddxBeforeReset (void);
|
---|
174 | #endif
|
---|
175 |
|
---|
176 | /* dixutils.c */
|
---|
177 |
|
---|
178 | extern void CopyISOLatin1Lowered(
|
---|
179 | unsigned char * /*dest*/,
|
---|
180 | unsigned char * /*source*/,
|
---|
181 | int /*length*/);
|
---|
182 |
|
---|
183 | extern int CompareISOLatin1Lowered(
|
---|
184 | unsigned char * /*a*/,
|
---|
185 | int alen,
|
---|
186 | unsigned char * /*b*/,
|
---|
187 | int blen);
|
---|
188 |
|
---|
189 | extern int dixLookupWindow(
|
---|
190 | WindowPtr *result,
|
---|
191 | XID id,
|
---|
192 | ClientPtr client,
|
---|
193 | Mask access_mode);
|
---|
194 |
|
---|
195 | extern int dixLookupDrawable(
|
---|
196 | DrawablePtr *result,
|
---|
197 | XID id,
|
---|
198 | ClientPtr client,
|
---|
199 | Mask type_mask,
|
---|
200 | Mask access_mode);
|
---|
201 |
|
---|
202 | extern int dixLookupGC(
|
---|
203 | GCPtr *result,
|
---|
204 | XID id,
|
---|
205 | ClientPtr client,
|
---|
206 | Mask access_mode);
|
---|
207 |
|
---|
208 | extern int dixLookupClient(
|
---|
209 | ClientPtr *result,
|
---|
210 | XID id,
|
---|
211 | ClientPtr client,
|
---|
212 | Mask access_mode);
|
---|
213 |
|
---|
214 | extern void NoopDDA(void);
|
---|
215 |
|
---|
216 | extern int AlterSaveSetForClient(
|
---|
217 | ClientPtr /*client*/,
|
---|
218 | WindowPtr /*pWin*/,
|
---|
219 | unsigned /*mode*/,
|
---|
220 | Bool /*toRoot*/,
|
---|
221 | Bool /*remap*/);
|
---|
222 |
|
---|
223 | extern void DeleteWindowFromAnySaveSet(
|
---|
224 | WindowPtr /*pWin*/);
|
---|
225 |
|
---|
226 | extern void BlockHandler(
|
---|
227 | pointer /*pTimeout*/,
|
---|
228 | pointer /*pReadmask*/);
|
---|
229 |
|
---|
230 | extern void WakeupHandler(
|
---|
231 | int /*result*/,
|
---|
232 | pointer /*pReadmask*/);
|
---|
233 |
|
---|
234 | typedef void (* WakeupHandlerProcPtr)(
|
---|
235 | pointer /* blockData */,
|
---|
236 | int /* result */,
|
---|
237 | pointer /* pReadmask */);
|
---|
238 |
|
---|
239 | extern Bool RegisterBlockAndWakeupHandlers(
|
---|
240 | BlockHandlerProcPtr /*blockHandler*/,
|
---|
241 | WakeupHandlerProcPtr /*wakeupHandler*/,
|
---|
242 | pointer /*blockData*/);
|
---|
243 |
|
---|
244 | extern void RemoveBlockAndWakeupHandlers(
|
---|
245 | BlockHandlerProcPtr /*blockHandler*/,
|
---|
246 | WakeupHandlerProcPtr /*wakeupHandler*/,
|
---|
247 | pointer /*blockData*/);
|
---|
248 |
|
---|
249 | extern void InitBlockAndWakeupHandlers(void);
|
---|
250 |
|
---|
251 | extern void ProcessWorkQueue(void);
|
---|
252 |
|
---|
253 | extern void ProcessWorkQueueZombies(void);
|
---|
254 |
|
---|
255 | extern Bool QueueWorkProc(
|
---|
256 | Bool (* /*function*/)(
|
---|
257 | ClientPtr /*clientUnused*/,
|
---|
258 | pointer /*closure*/),
|
---|
259 | ClientPtr /*client*/,
|
---|
260 | pointer /*closure*/
|
---|
261 | );
|
---|
262 |
|
---|
263 | typedef Bool (* ClientSleepProcPtr)(
|
---|
264 | ClientPtr /*client*/,
|
---|
265 | pointer /*closure*/);
|
---|
266 |
|
---|
267 | extern Bool ClientSleep(
|
---|
268 | ClientPtr /*client*/,
|
---|
269 | ClientSleepProcPtr /* function */,
|
---|
270 | pointer /*closure*/);
|
---|
271 |
|
---|
272 | #ifndef ___CLIENTSIGNAL_DEFINED___
|
---|
273 | #define ___CLIENTSIGNAL_DEFINED___
|
---|
274 | extern Bool ClientSignal(
|
---|
275 | ClientPtr /*client*/);
|
---|
276 | #endif /* ___CLIENTSIGNAL_DEFINED___ */
|
---|
277 |
|
---|
278 | extern void ClientWakeup(
|
---|
279 | ClientPtr /*client*/);
|
---|
280 |
|
---|
281 | extern Bool ClientIsAsleep(
|
---|
282 | ClientPtr /*client*/);
|
---|
283 |
|
---|
284 | /* atom.c */
|
---|
285 |
|
---|
286 | extern Atom MakeAtom(
|
---|
287 | char * /*string*/,
|
---|
288 | unsigned /*len*/,
|
---|
289 | Bool /*makeit*/);
|
---|
290 |
|
---|
291 | extern Bool ValidAtom(
|
---|
292 | Atom /*atom*/);
|
---|
293 |
|
---|
294 | extern char *NameForAtom(
|
---|
295 | Atom /*atom*/);
|
---|
296 |
|
---|
297 | extern void AtomError(void);
|
---|
298 |
|
---|
299 | extern void FreeAllAtoms(void);
|
---|
300 |
|
---|
301 | extern void InitAtoms(void);
|
---|
302 |
|
---|
303 | /* main.c */
|
---|
304 |
|
---|
305 | extern void SetVendorRelease(int release);
|
---|
306 |
|
---|
307 | extern void SetVendorString(char *string);
|
---|
308 |
|
---|
309 | /* events.c */
|
---|
310 |
|
---|
311 | extern void SetMaskForEvent(
|
---|
312 | Mask /* mask */,
|
---|
313 | int /* event */);
|
---|
314 |
|
---|
315 |
|
---|
316 | extern Bool IsParent(
|
---|
317 | WindowPtr /* maybeparent */,
|
---|
318 | WindowPtr /* child */);
|
---|
319 |
|
---|
320 | extern WindowPtr GetCurrentRootWindow(void);
|
---|
321 |
|
---|
322 | extern WindowPtr GetSpriteWindow(void);
|
---|
323 |
|
---|
324 |
|
---|
325 | extern void NoticeEventTime(xEventPtr /* xE */);
|
---|
326 |
|
---|
327 | extern void EnqueueEvent(
|
---|
328 | xEventPtr /* xE */,
|
---|
329 | DeviceIntPtr /* device */,
|
---|
330 | int /* count */);
|
---|
331 |
|
---|
332 | extern void ActivatePointerGrab(
|
---|
333 | DeviceIntPtr /* mouse */,
|
---|
334 | GrabPtr /* grab */,
|
---|
335 | TimeStamp /* time */,
|
---|
336 | Bool /* autoGrab */);
|
---|
337 |
|
---|
338 | extern void DeactivatePointerGrab(
|
---|
339 | DeviceIntPtr /* mouse */);
|
---|
340 |
|
---|
341 | extern void ActivateKeyboardGrab(
|
---|
342 | DeviceIntPtr /* keybd */,
|
---|
343 | GrabPtr /* grab */,
|
---|
344 | TimeStamp /* time */,
|
---|
345 | Bool /* passive */);
|
---|
346 |
|
---|
347 | extern void DeactivateKeyboardGrab(
|
---|
348 | DeviceIntPtr /* keybd */);
|
---|
349 |
|
---|
350 | extern void AllowSome(
|
---|
351 | ClientPtr /* client */,
|
---|
352 | TimeStamp /* time */,
|
---|
353 | DeviceIntPtr /* thisDev */,
|
---|
354 | int /* newState */);
|
---|
355 |
|
---|
356 | extern void ReleaseActiveGrabs(
|
---|
357 | ClientPtr client);
|
---|
358 |
|
---|
359 | extern int DeliverEventsToWindow(
|
---|
360 | WindowPtr /* pWin */,
|
---|
361 | xEventPtr /* pEvents */,
|
---|
362 | int /* count */,
|
---|
363 | Mask /* filter */,
|
---|
364 | GrabPtr /* grab */,
|
---|
365 | int /* mskidx */);
|
---|
366 |
|
---|
367 | extern int DeliverDeviceEvents(
|
---|
368 | WindowPtr /* pWin */,
|
---|
369 | xEventPtr /* xE */,
|
---|
370 | GrabPtr /* grab */,
|
---|
371 | WindowPtr /* stopAt */,
|
---|
372 | DeviceIntPtr /* dev */,
|
---|
373 | int /* count */);
|
---|
374 |
|
---|
375 | extern void DefineInitialRootWindow(
|
---|
376 | WindowPtr /* win */);
|
---|
377 |
|
---|
378 | extern void UpdateSpriteForScreen(
|
---|
379 | ScreenPtr /* pScreen */);
|
---|
380 |
|
---|
381 | extern void WindowHasNewCursor(
|
---|
382 | WindowPtr /* pWin */);
|
---|
383 |
|
---|
384 | extern Bool CheckDeviceGrabs(
|
---|
385 | DeviceIntPtr /* device */,
|
---|
386 | xEventPtr /* xE */,
|
---|
387 | int /* checkFirst */,
|
---|
388 | int /* count */);
|
---|
389 |
|
---|
390 | extern void DeliverFocusedEvent(
|
---|
391 | DeviceIntPtr /* keybd */,
|
---|
392 | xEventPtr /* xE */,
|
---|
393 | WindowPtr /* window */,
|
---|
394 | int /* count */);
|
---|
395 |
|
---|
396 | extern void DeliverGrabbedEvent(
|
---|
397 | xEventPtr /* xE */,
|
---|
398 | DeviceIntPtr /* thisDev */,
|
---|
399 | Bool /* deactivateGrab */,
|
---|
400 | int /* count */);
|
---|
401 |
|
---|
402 | #ifdef XKB
|
---|
403 | extern void FixKeyState(
|
---|
404 | xEvent * /* xE */,
|
---|
405 | DeviceIntPtr /* keybd */);
|
---|
406 | #endif /* XKB */
|
---|
407 |
|
---|
408 | extern void RecalculateDeliverableEvents(
|
---|
409 | WindowPtr /* pWin */);
|
---|
410 |
|
---|
411 | extern int OtherClientGone(
|
---|
412 | pointer /* value */,
|
---|
413 | XID /* id */);
|
---|
414 |
|
---|
415 | extern void DoFocusEvents(
|
---|
416 | DeviceIntPtr /* dev */,
|
---|
417 | WindowPtr /* fromWin */,
|
---|
418 | WindowPtr /* toWin */,
|
---|
419 | int /* mode */);
|
---|
420 |
|
---|
421 | extern int SetInputFocus(
|
---|
422 | ClientPtr /* client */,
|
---|
423 | DeviceIntPtr /* dev */,
|
---|
424 | Window /* focusID */,
|
---|
425 | CARD8 /* revertTo */,
|
---|
426 | Time /* ctime */,
|
---|
427 | Bool /* followOK */);
|
---|
428 |
|
---|
429 | extern int GrabDevice(
|
---|
430 | ClientPtr /* client */,
|
---|
431 | DeviceIntPtr /* dev */,
|
---|
432 | unsigned /* this_mode */,
|
---|
433 | unsigned /* other_mode */,
|
---|
434 | Window /* grabWindow */,
|
---|
435 | unsigned /* ownerEvents */,
|
---|
436 | Time /* ctime */,
|
---|
437 | Mask /* mask */,
|
---|
438 | CARD8 * /* status */);
|
---|
439 |
|
---|
440 | extern void InitEvents(void);
|
---|
441 |
|
---|
442 | extern void CloseDownEvents(void);
|
---|
443 |
|
---|
444 | extern void DeleteWindowFromAnyEvents(
|
---|
445 | WindowPtr /* pWin */,
|
---|
446 | Bool /* freeResources */);
|
---|
447 |
|
---|
448 |
|
---|
449 | extern Mask EventMaskForClient(
|
---|
450 | WindowPtr /* pWin */,
|
---|
451 | ClientPtr /* client */);
|
---|
452 |
|
---|
453 |
|
---|
454 |
|
---|
455 | extern int DeliverEvents(
|
---|
456 | WindowPtr /*pWin*/,
|
---|
457 | xEventPtr /*xE*/,
|
---|
458 | int /*count*/,
|
---|
459 | WindowPtr /*otherParent*/);
|
---|
460 |
|
---|
461 |
|
---|
462 | extern void WriteEventsToClient(
|
---|
463 | ClientPtr /*pClient*/,
|
---|
464 | int /*count*/,
|
---|
465 | xEventPtr /*events*/);
|
---|
466 |
|
---|
467 | extern int TryClientEvents(
|
---|
468 | ClientPtr /*client*/,
|
---|
469 | xEventPtr /*pEvents*/,
|
---|
470 | int /*count*/,
|
---|
471 | Mask /*mask*/,
|
---|
472 | Mask /*filter*/,
|
---|
473 | GrabPtr /*grab*/);
|
---|
474 |
|
---|
475 | extern void WindowsRestructured(void);
|
---|
476 |
|
---|
477 | #ifdef PANORAMIX
|
---|
478 | extern void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
|
---|
479 | #endif
|
---|
480 |
|
---|
481 | #ifdef RANDR
|
---|
482 | void
|
---|
483 | ScreenRestructured (ScreenPtr pScreen);
|
---|
484 | #endif
|
---|
485 |
|
---|
486 | extern int ffs(int i);
|
---|
487 |
|
---|
488 | /*
|
---|
489 | * callback manager stuff
|
---|
490 | */
|
---|
491 |
|
---|
492 | #ifndef _XTYPEDEF_CALLBACKLISTPTR
|
---|
493 | typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */
|
---|
494 | #define _XTYPEDEF_CALLBACKLISTPTR
|
---|
495 | #endif
|
---|
496 |
|
---|
497 | typedef void (*CallbackProcPtr) (
|
---|
498 | CallbackListPtr *, pointer, pointer);
|
---|
499 |
|
---|
500 | extern Bool AddCallback(
|
---|
501 | CallbackListPtr * /*pcbl*/,
|
---|
502 | CallbackProcPtr /*callback*/,
|
---|
503 | pointer /*data*/);
|
---|
504 |
|
---|
505 | extern Bool DeleteCallback(
|
---|
506 | CallbackListPtr * /*pcbl*/,
|
---|
507 | CallbackProcPtr /*callback*/,
|
---|
508 | pointer /*data*/);
|
---|
509 |
|
---|
510 | extern void CallCallbacks(
|
---|
511 | CallbackListPtr * /*pcbl*/,
|
---|
512 | pointer /*call_data*/);
|
---|
513 |
|
---|
514 | extern void DeleteCallbackList(
|
---|
515 | CallbackListPtr * /*pcbl*/);
|
---|
516 |
|
---|
517 | extern void InitCallbackManager(void);
|
---|
518 |
|
---|
519 | /*
|
---|
520 | * ServerGrabCallback stuff
|
---|
521 | */
|
---|
522 |
|
---|
523 | extern CallbackListPtr ServerGrabCallback;
|
---|
524 |
|
---|
525 | typedef enum {SERVER_GRABBED, SERVER_UNGRABBED,
|
---|
526 | CLIENT_PERVIOUS, CLIENT_IMPERVIOUS } ServerGrabState;
|
---|
527 |
|
---|
528 | typedef struct {
|
---|
529 | ClientPtr client;
|
---|
530 | ServerGrabState grabstate;
|
---|
531 | } ServerGrabInfoRec;
|
---|
532 |
|
---|
533 | /*
|
---|
534 | * EventCallback stuff
|
---|
535 | */
|
---|
536 |
|
---|
537 | extern CallbackListPtr EventCallback;
|
---|
538 |
|
---|
539 | typedef struct {
|
---|
540 | ClientPtr client;
|
---|
541 | xEventPtr events;
|
---|
542 | int count;
|
---|
543 | } EventInfoRec;
|
---|
544 |
|
---|
545 | /*
|
---|
546 | * DeviceEventCallback stuff
|
---|
547 | */
|
---|
548 |
|
---|
549 | extern CallbackListPtr DeviceEventCallback;
|
---|
550 |
|
---|
551 | typedef struct {
|
---|
552 | xEventPtr events;
|
---|
553 | int count;
|
---|
554 | } DeviceEventInfoRec;
|
---|
555 |
|
---|
556 | /* strcasecmp.c */
|
---|
557 | #if NEED_STRCASECMP
|
---|
558 | #define strcasecmp xstrcasecmp
|
---|
559 | extern int xstrcasecmp(char *s1, char *s2);
|
---|
560 | #endif
|
---|
561 |
|
---|
562 | /*
|
---|
563 | * These are deprecated compatibility functions and will be removed soon!
|
---|
564 | * Please use the noted replacements instead.
|
---|
565 | */
|
---|
566 |
|
---|
567 | /* replaced by dixLookupWindow */
|
---|
568 | extern WindowPtr SecurityLookupWindow(
|
---|
569 | XID id,
|
---|
570 | ClientPtr client,
|
---|
571 | Mask access_mode);
|
---|
572 |
|
---|
573 | /* replaced by dixLookupWindow */
|
---|
574 | extern WindowPtr LookupWindow(
|
---|
575 | XID id,
|
---|
576 | ClientPtr client);
|
---|
577 |
|
---|
578 | /* replaced by dixLookupDrawable */
|
---|
579 | extern pointer SecurityLookupDrawable(
|
---|
580 | XID id,
|
---|
581 | ClientPtr client,
|
---|
582 | Mask access_mode);
|
---|
583 |
|
---|
584 | /* replaced by dixLookupDrawable */
|
---|
585 | extern pointer LookupDrawable(
|
---|
586 | XID id,
|
---|
587 | ClientPtr client);
|
---|
588 |
|
---|
589 | /* replaced by dixLookupClient */
|
---|
590 | extern ClientPtr LookupClient(
|
---|
591 | XID id,
|
---|
592 | ClientPtr client);
|
---|
593 |
|
---|
594 | #endif /* DIX_H */
|
---|