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, pGC, client)\
|
---|
85 | if ((stuff->gc == INVALID) || (client->lastGCID != stuff->gc) ||\
|
---|
86 | (client->lastDrawableID != drawID))\
|
---|
87 | {\
|
---|
88 | int rc;\
|
---|
89 | rc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY,\
|
---|
90 | DixWriteAccess);\
|
---|
91 | if (rc != Success)\
|
---|
92 | return rc;\
|
---|
93 | rc = dixLookupGC(&(pGC), stuff->gc, client, DixReadAccess);\
|
---|
94 | if (rc != Success)\
|
---|
95 | return rc;\
|
---|
96 | if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
|
---|
97 | return (BadMatch);\
|
---|
98 | client->lastDrawable = pDraw;\
|
---|
99 | client->lastDrawableID = drawID;\
|
---|
100 | client->lastGC = pGC;\
|
---|
101 | client->lastGCID = stuff->gc;\
|
---|
102 | }\
|
---|
103 | else\
|
---|
104 | {\
|
---|
105 | pGC = client->lastGC;\
|
---|
106 | pDraw = client->lastDrawable;\
|
---|
107 | }\
|
---|
108 | if (pGC->serialNumber != pDraw->serialNumber)\
|
---|
109 | ValidateGC(pDraw, pGC);
|
---|
110 |
|
---|
111 |
|
---|
112 | #define WriteReplyToClient(pClient, size, pReply) { \
|
---|
113 | if ((pClient)->swapped) \
|
---|
114 | (*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \
|
---|
115 | (pClient, (int)(size), pReply); \
|
---|
116 | else (void) WriteToClient(pClient, (int)(size), (char *)(pReply)); }
|
---|
117 |
|
---|
118 | #define WriteSwappedDataToClient(pClient, size, pbuf) \
|
---|
119 | if ((pClient)->swapped) \
|
---|
120 | (*(pClient)->pSwapReplyFunc)(pClient, (int)(size), pbuf); \
|
---|
121 | else (void) WriteToClient (pClient, (int)(size), (char *)(pbuf));
|
---|
122 |
|
---|
123 | typedef struct _TimeStamp *TimeStampPtr;
|
---|
124 |
|
---|
125 | #ifndef _XTYPEDEF_CLIENTPTR
|
---|
126 | typedef struct _Client *ClientPtr; /* also in misc.h */
|
---|
127 | #define _XTYPEDEF_CLIENTPTR
|
---|
128 | #endif
|
---|
129 |
|
---|
130 | typedef struct _WorkQueue *WorkQueuePtr;
|
---|
131 |
|
---|
132 | extern ClientPtr requestingClient;
|
---|
133 | extern ClientPtr *clients;
|
---|
134 | extern ClientPtr serverClient;
|
---|
135 | extern int currentMaxClients;
|
---|
136 | extern char dispatchExceptionAtReset;
|
---|
137 |
|
---|
138 | typedef int HWEventQueueType;
|
---|
139 | typedef HWEventQueueType* HWEventQueuePtr;
|
---|
140 |
|
---|
141 | extern HWEventQueuePtr checkForInput[2];
|
---|
142 |
|
---|
143 | typedef struct _TimeStamp {
|
---|
144 | CARD32 months; /* really ~49.7 days */
|
---|
145 | CARD32 milliseconds;
|
---|
146 | } TimeStamp;
|
---|
147 |
|
---|
148 | /* dispatch.c */
|
---|
149 |
|
---|
150 | extern void SetInputCheck(
|
---|
151 | HWEventQueuePtr /*c0*/,
|
---|
152 | HWEventQueuePtr /*c1*/);
|
---|
153 |
|
---|
154 | extern void CloseDownClient(
|
---|
155 | ClientPtr /*client*/);
|
---|
156 |
|
---|
157 | extern void UpdateCurrentTime(void);
|
---|
158 |
|
---|
159 | extern void UpdateCurrentTimeIf(void);
|
---|
160 |
|
---|
161 | extern void InitSelections(void);
|
---|
162 |
|
---|
163 | extern void FlushClientCaches(XID /*id*/);
|
---|
164 |
|
---|
165 | extern int dixDestroyPixmap(
|
---|
166 | pointer /*value*/,
|
---|
167 | XID /*pid*/);
|
---|
168 |
|
---|
169 | extern void InitClient(
|
---|
170 | ClientPtr /*client*/,
|
---|
171 | int /*i*/,
|
---|
172 | pointer /*ospriv*/);
|
---|
173 |
|
---|
174 | extern ClientPtr NextAvailableClient(
|
---|
175 | pointer /*ospriv*/);
|
---|
176 |
|
---|
177 | extern void SendErrorToClient(
|
---|
178 | ClientPtr /*client*/,
|
---|
179 | unsigned int /*majorCode*/,
|
---|
180 | unsigned int /*minorCode*/,
|
---|
181 | XID /*resId*/,
|
---|
182 | int /*errorCode*/);
|
---|
183 |
|
---|
184 | extern void DeleteWindowFromAnySelections(
|
---|
185 | WindowPtr /*pWin*/);
|
---|
186 |
|
---|
187 | extern void MarkClientException(
|
---|
188 | ClientPtr /*client*/);
|
---|
189 |
|
---|
190 | extern int SendConnSetup(
|
---|
191 | ClientPtr /*client*/,
|
---|
192 | char* /*reason*/);
|
---|
193 |
|
---|
194 | #if defined(DDXBEFORERESET)
|
---|
195 | extern void ddxBeforeReset (void);
|
---|
196 | #endif
|
---|
197 |
|
---|
198 | /* dixutils.c */
|
---|
199 |
|
---|
200 | extern void CopyISOLatin1Lowered(
|
---|
201 | unsigned char * /*dest*/,
|
---|
202 | unsigned char * /*source*/,
|
---|
203 | int /*length*/);
|
---|
204 |
|
---|
205 | extern int CompareISOLatin1Lowered(
|
---|
206 | unsigned char * /*a*/,
|
---|
207 | int alen,
|
---|
208 | unsigned char * /*b*/,
|
---|
209 | int blen);
|
---|
210 |
|
---|
211 | extern int dixLookupWindow(
|
---|
212 | WindowPtr *result,
|
---|
213 | XID id,
|
---|
214 | ClientPtr client,
|
---|
215 | Mask access_mode);
|
---|
216 |
|
---|
217 | extern int dixLookupDrawable(
|
---|
218 | DrawablePtr *result,
|
---|
219 | XID id,
|
---|
220 | ClientPtr client,
|
---|
221 | Mask type_mask,
|
---|
222 | Mask access_mode);
|
---|
223 |
|
---|
224 | extern int dixLookupGC(
|
---|
225 | GCPtr *result,
|
---|
226 | XID id,
|
---|
227 | ClientPtr client,
|
---|
228 | Mask access_mode);
|
---|
229 |
|
---|
230 | extern int dixLookupClient(
|
---|
231 | ClientPtr *result,
|
---|
232 | XID id,
|
---|
233 | ClientPtr client,
|
---|
234 | Mask access_mode);
|
---|
235 |
|
---|
236 | /*
|
---|
237 | * These are deprecated compatibility functions and will be removed soon!
|
---|
238 | * Please use the new dixLookup*() functions above.
|
---|
239 | */
|
---|
240 | extern WindowPtr SecurityLookupWindow(XID, ClientPtr, Mask);
|
---|
241 | extern WindowPtr LookupWindow(XID, ClientPtr);
|
---|
242 | extern pointer SecurityLookupDrawable(XID, ClientPtr, Mask);
|
---|
243 | extern pointer LookupDrawable(XID, ClientPtr);
|
---|
244 | extern ClientPtr LookupClient(XID, ClientPtr);
|
---|
245 | /* end deprecated functions */
|
---|
246 |
|
---|
247 | extern void NoopDDA(void);
|
---|
248 |
|
---|
249 | extern int AlterSaveSetForClient(
|
---|
250 | ClientPtr /*client*/,
|
---|
251 | WindowPtr /*pWin*/,
|
---|
252 | unsigned /*mode*/,
|
---|
253 | Bool /*toRoot*/,
|
---|
254 | Bool /*remap*/);
|
---|
255 |
|
---|
256 | extern void DeleteWindowFromAnySaveSet(
|
---|
257 | WindowPtr /*pWin*/);
|
---|
258 |
|
---|
259 | extern void BlockHandler(
|
---|
260 | pointer /*pTimeout*/,
|
---|
261 | pointer /*pReadmask*/);
|
---|
262 |
|
---|
263 | extern void WakeupHandler(
|
---|
264 | int /*result*/,
|
---|
265 | pointer /*pReadmask*/);
|
---|
266 |
|
---|
267 | typedef void (* WakeupHandlerProcPtr)(
|
---|
268 | pointer /* blockData */,
|
---|
269 | int /* result */,
|
---|
270 | pointer /* pReadmask */);
|
---|
271 |
|
---|
272 | extern Bool RegisterBlockAndWakeupHandlers(
|
---|
273 | BlockHandlerProcPtr /*blockHandler*/,
|
---|
274 | WakeupHandlerProcPtr /*wakeupHandler*/,
|
---|
275 | pointer /*blockData*/);
|
---|
276 |
|
---|
277 | extern void RemoveBlockAndWakeupHandlers(
|
---|
278 | BlockHandlerProcPtr /*blockHandler*/,
|
---|
279 | WakeupHandlerProcPtr /*wakeupHandler*/,
|
---|
280 | pointer /*blockData*/);
|
---|
281 |
|
---|
282 | extern void InitBlockAndWakeupHandlers(void);
|
---|
283 |
|
---|
284 | extern void ProcessWorkQueue(void);
|
---|
285 |
|
---|
286 | extern void ProcessWorkQueueZombies(void);
|
---|
287 |
|
---|
288 | extern Bool QueueWorkProc(
|
---|
289 | Bool (* /*function*/)(
|
---|
290 | ClientPtr /*clientUnused*/,
|
---|
291 | pointer /*closure*/),
|
---|
292 | ClientPtr /*client*/,
|
---|
293 | pointer /*closure*/
|
---|
294 | );
|
---|
295 |
|
---|
296 | typedef Bool (* ClientSleepProcPtr)(
|
---|
297 | ClientPtr /*client*/,
|
---|
298 | pointer /*closure*/);
|
---|
299 |
|
---|
300 | extern Bool ClientSleep(
|
---|
301 | ClientPtr /*client*/,
|
---|
302 | ClientSleepProcPtr /* function */,
|
---|
303 | pointer /*closure*/);
|
---|
304 |
|
---|
305 | #ifndef ___CLIENTSIGNAL_DEFINED___
|
---|
306 | #define ___CLIENTSIGNAL_DEFINED___
|
---|
307 | extern Bool ClientSignal(
|
---|
308 | ClientPtr /*client*/);
|
---|
309 | #endif /* ___CLIENTSIGNAL_DEFINED___ */
|
---|
310 |
|
---|
311 | extern void ClientWakeup(
|
---|
312 | ClientPtr /*client*/);
|
---|
313 |
|
---|
314 | extern Bool ClientIsAsleep(
|
---|
315 | ClientPtr /*client*/);
|
---|
316 |
|
---|
317 | /* atom.c */
|
---|
318 |
|
---|
319 | extern Atom MakeAtom(
|
---|
320 | char * /*string*/,
|
---|
321 | unsigned /*len*/,
|
---|
322 | Bool /*makeit*/);
|
---|
323 |
|
---|
324 | extern Bool ValidAtom(
|
---|
325 | Atom /*atom*/);
|
---|
326 |
|
---|
327 | extern char *NameForAtom(
|
---|
328 | Atom /*atom*/);
|
---|
329 |
|
---|
330 | extern void AtomError(void);
|
---|
331 |
|
---|
332 | extern void FreeAllAtoms(void);
|
---|
333 |
|
---|
334 | extern void InitAtoms(void);
|
---|
335 |
|
---|
336 | /* main.c */
|
---|
337 |
|
---|
338 | extern void SetVendorRelease(int release);
|
---|
339 |
|
---|
340 | extern void SetVendorString(char *string);
|
---|
341 |
|
---|
342 | /* events.c */
|
---|
343 |
|
---|
344 | extern void SetMaskForEvent(
|
---|
345 | Mask /* mask */,
|
---|
346 | int /* event */);
|
---|
347 |
|
---|
348 |
|
---|
349 | extern Bool IsParent(
|
---|
350 | WindowPtr /* maybeparent */,
|
---|
351 | WindowPtr /* child */);
|
---|
352 |
|
---|
353 | extern WindowPtr GetCurrentRootWindow(void);
|
---|
354 |
|
---|
355 | extern WindowPtr GetSpriteWindow(void);
|
---|
356 |
|
---|
357 |
|
---|
358 | extern void NoticeEventTime(xEventPtr /* xE */);
|
---|
359 |
|
---|
360 | extern void EnqueueEvent(
|
---|
361 | xEventPtr /* xE */,
|
---|
362 | DeviceIntPtr /* device */,
|
---|
363 | int /* count */);
|
---|
364 |
|
---|
365 | extern void ComputeFreezes(void);
|
---|
366 |
|
---|
367 | extern void CheckGrabForSyncs(
|
---|
368 | DeviceIntPtr /* dev */,
|
---|
369 | Bool /* thisMode */,
|
---|
370 | Bool /* otherMode */);
|
---|
371 |
|
---|
372 | extern void ActivatePointerGrab(
|
---|
373 | DeviceIntPtr /* mouse */,
|
---|
374 | GrabPtr /* grab */,
|
---|
375 | TimeStamp /* time */,
|
---|
376 | Bool /* autoGrab */);
|
---|
377 |
|
---|
378 | extern void DeactivatePointerGrab(
|
---|
379 | DeviceIntPtr /* mouse */);
|
---|
380 |
|
---|
381 | extern void ActivateKeyboardGrab(
|
---|
382 | DeviceIntPtr /* keybd */,
|
---|
383 | GrabPtr /* grab */,
|
---|
384 | TimeStamp /* time */,
|
---|
385 | Bool /* passive */);
|
---|
386 |
|
---|
387 | extern void DeactivateKeyboardGrab(
|
---|
388 | DeviceIntPtr /* keybd */);
|
---|
389 |
|
---|
390 | extern void AllowSome(
|
---|
391 | ClientPtr /* client */,
|
---|
392 | TimeStamp /* time */,
|
---|
393 | DeviceIntPtr /* thisDev */,
|
---|
394 | int /* newState */);
|
---|
395 |
|
---|
396 | extern void ReleaseActiveGrabs(
|
---|
397 | ClientPtr client);
|
---|
398 |
|
---|
399 | extern int DeliverEventsToWindow(
|
---|
400 | WindowPtr /* pWin */,
|
---|
401 | xEventPtr /* pEvents */,
|
---|
402 | int /* count */,
|
---|
403 | Mask /* filter */,
|
---|
404 | GrabPtr /* grab */,
|
---|
405 | int /* mskidx */);
|
---|
406 |
|
---|
407 | extern int DeliverDeviceEvents(
|
---|
408 | WindowPtr /* pWin */,
|
---|
409 | xEventPtr /* xE */,
|
---|
410 | GrabPtr /* grab */,
|
---|
411 | WindowPtr /* stopAt */,
|
---|
412 | DeviceIntPtr /* dev */,
|
---|
413 | int /* count */);
|
---|
414 |
|
---|
415 | extern void DefineInitialRootWindow(
|
---|
416 | WindowPtr /* win */);
|
---|
417 |
|
---|
418 | extern void WindowHasNewCursor(
|
---|
419 | WindowPtr /* pWin */);
|
---|
420 |
|
---|
421 | extern Bool CheckDeviceGrabs(
|
---|
422 | DeviceIntPtr /* device */,
|
---|
423 | xEventPtr /* xE */,
|
---|
424 | int /* checkFirst */,
|
---|
425 | int /* count */);
|
---|
426 |
|
---|
427 | extern void DeliverFocusedEvent(
|
---|
428 | DeviceIntPtr /* keybd */,
|
---|
429 | xEventPtr /* xE */,
|
---|
430 | WindowPtr /* window */,
|
---|
431 | int /* count */);
|
---|
432 |
|
---|
433 | extern void DeliverGrabbedEvent(
|
---|
434 | xEventPtr /* xE */,
|
---|
435 | DeviceIntPtr /* thisDev */,
|
---|
436 | Bool /* deactivateGrab */,
|
---|
437 | int /* count */);
|
---|
438 |
|
---|
439 | #ifdef XKB
|
---|
440 | extern void FixKeyState(
|
---|
441 | xEvent * /* xE */,
|
---|
442 | DeviceIntPtr /* keybd */);
|
---|
443 | #endif /* XKB */
|
---|
444 |
|
---|
445 | extern void RecalculateDeliverableEvents(
|
---|
446 | WindowPtr /* pWin */);
|
---|
447 |
|
---|
448 | extern int OtherClientGone(
|
---|
449 | pointer /* value */,
|
---|
450 | XID /* id */);
|
---|
451 |
|
---|
452 | extern void DoFocusEvents(
|
---|
453 | DeviceIntPtr /* dev */,
|
---|
454 | WindowPtr /* fromWin */,
|
---|
455 | WindowPtr /* toWin */,
|
---|
456 | int /* mode */);
|
---|
457 |
|
---|
458 | extern int SetInputFocus(
|
---|
459 | ClientPtr /* client */,
|
---|
460 | DeviceIntPtr /* dev */,
|
---|
461 | Window /* focusID */,
|
---|
462 | CARD8 /* revertTo */,
|
---|
463 | Time /* ctime */,
|
---|
464 | Bool /* followOK */);
|
---|
465 |
|
---|
466 | extern int GrabDevice(
|
---|
467 | ClientPtr /* client */,
|
---|
468 | DeviceIntPtr /* dev */,
|
---|
469 | unsigned /* this_mode */,
|
---|
470 | unsigned /* other_mode */,
|
---|
471 | Window /* grabWindow */,
|
---|
472 | unsigned /* ownerEvents */,
|
---|
473 | Time /* ctime */,
|
---|
474 | Mask /* mask */,
|
---|
475 | CARD8 * /* status */);
|
---|
476 |
|
---|
477 | extern void InitEvents(void);
|
---|
478 |
|
---|
479 | extern void CloseDownEvents(void);
|
---|
480 |
|
---|
481 | extern void DeleteWindowFromAnyEvents(
|
---|
482 | WindowPtr /* pWin */,
|
---|
483 | Bool /* freeResources */);
|
---|
484 |
|
---|
485 |
|
---|
486 | extern Mask EventMaskForClient(
|
---|
487 | WindowPtr /* pWin */,
|
---|
488 | ClientPtr /* client */);
|
---|
489 |
|
---|
490 |
|
---|
491 |
|
---|
492 | extern int DeliverEvents(
|
---|
493 | WindowPtr /*pWin*/,
|
---|
494 | xEventPtr /*xE*/,
|
---|
495 | int /*count*/,
|
---|
496 | WindowPtr /*otherParent*/);
|
---|
497 |
|
---|
498 |
|
---|
499 | extern void WriteEventsToClient(
|
---|
500 | ClientPtr /*pClient*/,
|
---|
501 | int /*count*/,
|
---|
502 | xEventPtr /*events*/);
|
---|
503 |
|
---|
504 | extern int TryClientEvents(
|
---|
505 | ClientPtr /*client*/,
|
---|
506 | xEventPtr /*pEvents*/,
|
---|
507 | int /*count*/,
|
---|
508 | Mask /*mask*/,
|
---|
509 | Mask /*filter*/,
|
---|
510 | GrabPtr /*grab*/);
|
---|
511 |
|
---|
512 | extern void WindowsRestructured(void);
|
---|
513 |
|
---|
514 | #ifdef PANORAMIX
|
---|
515 | extern void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
|
---|
516 | #endif
|
---|
517 |
|
---|
518 | #ifdef RANDR
|
---|
519 | void
|
---|
520 | ScreenRestructured (ScreenPtr pScreen);
|
---|
521 | #endif
|
---|
522 |
|
---|
523 | extern void ResetClientPrivates(void);
|
---|
524 |
|
---|
525 | extern int AllocateClientPrivateIndex(void);
|
---|
526 |
|
---|
527 | extern Bool AllocateClientPrivate(
|
---|
528 | int /*index*/,
|
---|
529 | unsigned /*amount*/);
|
---|
530 |
|
---|
531 | extern int ffs(int i);
|
---|
532 |
|
---|
533 | /*
|
---|
534 | * callback manager stuff
|
---|
535 | */
|
---|
536 |
|
---|
537 | #ifndef _XTYPEDEF_CALLBACKLISTPTR
|
---|
538 | typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */
|
---|
539 | #define _XTYPEDEF_CALLBACKLISTPTR
|
---|
540 | #endif
|
---|
541 |
|
---|
542 | typedef void (*CallbackProcPtr) (
|
---|
543 | CallbackListPtr *, pointer, pointer);
|
---|
544 |
|
---|
545 | typedef Bool (*AddCallbackProcPtr) (
|
---|
546 | CallbackListPtr *, CallbackProcPtr, pointer);
|
---|
547 |
|
---|
548 | typedef Bool (*DeleteCallbackProcPtr) (
|
---|
549 | CallbackListPtr *, CallbackProcPtr, pointer);
|
---|
550 |
|
---|
551 | typedef void (*CallCallbacksProcPtr) (
|
---|
552 | CallbackListPtr *, pointer);
|
---|
553 |
|
---|
554 | typedef void (*DeleteCallbackListProcPtr) (
|
---|
555 | CallbackListPtr *);
|
---|
556 |
|
---|
557 | typedef struct _CallbackProcs {
|
---|
558 | AddCallbackProcPtr AddCallback;
|
---|
559 | DeleteCallbackProcPtr DeleteCallback;
|
---|
560 | CallCallbacksProcPtr CallCallbacks;
|
---|
561 | DeleteCallbackListProcPtr DeleteCallbackList;
|
---|
562 | } CallbackFuncsRec, *CallbackFuncsPtr;
|
---|
563 |
|
---|
564 | extern Bool AddCallback(
|
---|
565 | CallbackListPtr * /*pcbl*/,
|
---|
566 | CallbackProcPtr /*callback*/,
|
---|
567 | pointer /*data*/);
|
---|
568 |
|
---|
569 | extern Bool DeleteCallback(
|
---|
570 | CallbackListPtr * /*pcbl*/,
|
---|
571 | CallbackProcPtr /*callback*/,
|
---|
572 | pointer /*data*/);
|
---|
573 |
|
---|
574 | extern void CallCallbacks(
|
---|
575 | CallbackListPtr * /*pcbl*/,
|
---|
576 | pointer /*call_data*/);
|
---|
577 |
|
---|
578 | extern void DeleteCallbackList(
|
---|
579 | CallbackListPtr * /*pcbl*/);
|
---|
580 |
|
---|
581 | extern void InitCallbackManager(void);
|
---|
582 |
|
---|
583 | /*
|
---|
584 | * ServerGrabCallback stuff
|
---|
585 | */
|
---|
586 |
|
---|
587 | extern CallbackListPtr ServerGrabCallback;
|
---|
588 |
|
---|
589 | typedef enum {SERVER_GRABBED, SERVER_UNGRABBED,
|
---|
590 | CLIENT_PERVIOUS, CLIENT_IMPERVIOUS } ServerGrabState;
|
---|
591 |
|
---|
592 | typedef struct {
|
---|
593 | ClientPtr client;
|
---|
594 | ServerGrabState grabstate;
|
---|
595 | } ServerGrabInfoRec;
|
---|
596 |
|
---|
597 | /*
|
---|
598 | * EventCallback stuff
|
---|
599 | */
|
---|
600 |
|
---|
601 | extern CallbackListPtr EventCallback;
|
---|
602 |
|
---|
603 | typedef struct {
|
---|
604 | ClientPtr client;
|
---|
605 | xEventPtr events;
|
---|
606 | int count;
|
---|
607 | } EventInfoRec;
|
---|
608 |
|
---|
609 | /*
|
---|
610 | * DeviceEventCallback stuff
|
---|
611 | */
|
---|
612 |
|
---|
613 | extern CallbackListPtr DeviceEventCallback;
|
---|
614 |
|
---|
615 | typedef struct {
|
---|
616 | xEventPtr events;
|
---|
617 | int count;
|
---|
618 | } DeviceEventInfoRec;
|
---|
619 |
|
---|
620 | /*
|
---|
621 | * SelectionCallback stuff
|
---|
622 | */
|
---|
623 |
|
---|
624 | extern CallbackListPtr SelectionCallback;
|
---|
625 |
|
---|
626 | typedef enum {
|
---|
627 | SelectionSetOwner,
|
---|
628 | SelectionWindowDestroy,
|
---|
629 | SelectionClientClose
|
---|
630 | } SelectionCallbackKind;
|
---|
631 |
|
---|
632 | typedef struct {
|
---|
633 | struct _Selection *selection;
|
---|
634 | SelectionCallbackKind kind;
|
---|
635 | } SelectionInfoRec;
|
---|
636 |
|
---|
637 | /* strcasecmp.c */
|
---|
638 | #if NEED_STRCASECMP
|
---|
639 | #define strcasecmp xstrcasecmp
|
---|
640 | extern int xstrcasecmp(char *s1, char *s2);
|
---|
641 | #endif
|
---|
642 |
|
---|
643 | #endif /* DIX_H */
|
---|