VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/7.0/xorg/dix.h@ 17234

最後變更 在這個檔案從17234是 17234,由 vboxsync 提交於 16 年 前

Additions/x11/x11include: blast! Corrected svn:keywords property on all files as per http://linserv.germany/vbox/wiki/SvnKeywords

  • 屬性 svn:eol-style 設為 native
檔案大小: 20.4 KB
 
1/* $XFree86: xc/programs/Xserver/include/dix.h,v 3.26 2003/01/12 02:44:27 dawes Exp $ */
2/***********************************************************
3
4Copyright 1987, 1998 The Open Group
5
6Permission to use, copy, modify, distribute, and sell this software and its
7documentation for any purpose is hereby granted without fee, provided that
8the above copyright notice appear in all copies and that both that
9copyright notice and this permission notice appear in supporting
10documentation.
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall not be
23used in advertising or otherwise to promote the sale, use or other dealings
24in this Software without prior written authorization from The Open Group.
25
26
27Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
28
29 All Rights Reserved
30
31Permission to use, copy, modify, and distribute this software and its
32documentation for any purpose and without fee is hereby granted,
33provided that the above copyright notice appear in all copies and that
34both that copyright notice and this permission notice appear in
35supporting documentation, and that the name of Digital not be
36used in advertising or publicity pertaining to distribution of the
37software without specific, written prior permission.
38
39DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
40ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
41DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
42ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
43WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
44ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
45SOFTWARE.
46
47******************************************************************/
48/* $Xorg: dix.h,v 1.4 2001/02/09 02:05:15 xorgcvs Exp $ */
49
50#ifndef DIX_H
51#define DIX_H
52
53#include "gc.h"
54#include "window.h"
55#include "input.h"
56
57#define EARLIER -1
58#define SAMETIME 0
59#define LATER 1
60
61#define NullClient ((ClientPtr) 0)
62#define REQUEST(type) \
63 register type *stuff = (type *)client->requestBuffer
64
65
66#define REQUEST_SIZE_MATCH(req)\
67 if ((sizeof(req) >> 2) != client->req_len)\
68 return(BadLength)
69
70#define REQUEST_AT_LEAST_SIZE(req) \
71 if ((sizeof(req) >> 2) > client->req_len )\
72 return(BadLength)
73
74#define REQUEST_FIXED_SIZE(req, n)\
75 if (((sizeof(req) >> 2) > client->req_len) || \
76 (((sizeof(req) + (n) + 3) >> 2) != client->req_len)) \
77 return(BadLength)
78
79#define LEGAL_NEW_RESOURCE(id,client)\
80 if (!LegalNewID(id,client)) \
81 {\
82 client->errorValue = id;\
83 return(BadIDChoice);\
84 }
85
86/* XXX if you are using this macro, you are probably not generating Match
87 * errors where appropriate */
88#define LOOKUP_DRAWABLE(did, client)\
89 ((client->lastDrawableID == did) ? \
90 client->lastDrawable : (DrawablePtr)LookupDrawable(did, client))
91
92#ifdef XCSECURITY
93
94#define SECURITY_VERIFY_DRAWABLE(pDraw, did, client, mode)\
95 if (client->lastDrawableID == did && !client->trustLevel)\
96 pDraw = client->lastDrawable;\
97 else \
98 {\
99 pDraw = (DrawablePtr) SecurityLookupIDByClass(client, did, \
100 RC_DRAWABLE, mode);\
101 if (!pDraw) \
102 {\
103 client->errorValue = did; \
104 return BadDrawable;\
105 }\
106 if (pDraw->type == UNDRAWABLE_WINDOW)\
107 return BadMatch;\
108 }
109
110#define SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, mode)\
111 if (client->lastDrawableID == did && !client->trustLevel)\
112 pDraw = client->lastDrawable;\
113 else \
114 {\
115 pDraw = (DrawablePtr) SecurityLookupIDByClass(client, did, \
116 RC_DRAWABLE, mode);\
117 if (!pDraw) \
118 {\
119 client->errorValue = did; \
120 return BadDrawable;\
121 }\
122 }
123
124#define SECURITY_VERIFY_GC(pGC, rid, client, mode)\
125 if (client->lastGCID == rid && !client->trustLevel)\
126 pGC = client->lastGC;\
127 else\
128 pGC = (GC *) SecurityLookupIDByType(client, rid, RT_GC, mode);\
129 if (!pGC)\
130 {\
131 client->errorValue = rid;\
132 return (BadGC);\
133 }
134
135#define VERIFY_DRAWABLE(pDraw, did, client)\
136 SECURITY_VERIFY_DRAWABLE(pDraw, did, client, SecurityUnknownAccess)
137
138#define VERIFY_GEOMETRABLE(pDraw, did, client)\
139 SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, SecurityUnknownAccess)
140
141#define VERIFY_GC(pGC, rid, client)\
142 SECURITY_VERIFY_GC(pGC, rid, client, SecurityUnknownAccess)
143
144#else /* not XCSECURITY */
145
146#define VERIFY_DRAWABLE(pDraw, did, client)\
147 if (client->lastDrawableID == did)\
148 pDraw = client->lastDrawable;\
149 else \
150 {\
151 pDraw = (DrawablePtr) LookupIDByClass(did, RC_DRAWABLE);\
152 if (!pDraw) \
153 {\
154 client->errorValue = did; \
155 return BadDrawable;\
156 }\
157 if (pDraw->type == UNDRAWABLE_WINDOW)\
158 return BadMatch;\
159 }
160
161#define VERIFY_GEOMETRABLE(pDraw, did, client)\
162 if (client->lastDrawableID == did)\
163 pDraw = client->lastDrawable;\
164 else \
165 {\
166 pDraw = (DrawablePtr) LookupIDByClass(did, RC_DRAWABLE);\
167 if (!pDraw) \
168 {\
169 client->errorValue = did; \
170 return BadDrawable;\
171 }\
172 }
173
174#define VERIFY_GC(pGC, rid, client)\
175 if (client->lastGCID == rid)\
176 pGC = client->lastGC;\
177 else\
178 pGC = (GC *)LookupIDByType(rid, RT_GC);\
179 if (!pGC)\
180 {\
181 client->errorValue = rid;\
182 return (BadGC);\
183 }
184
185#define SECURITY_VERIFY_DRAWABLE(pDraw, did, client, mode)\
186 VERIFY_DRAWABLE(pDraw, did, client)
187
188#define SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, mode)\
189 VERIFY_GEOMETRABLE(pDraw, did, client)
190
191#define SECURITY_VERIFY_GC(pGC, rid, client, mode)\
192 VERIFY_GC(pGC, rid, client)
193
194#endif /* XCSECURITY */
195
196/*
197 * We think that most hardware implementations of DBE will want
198 * LookupID*(dbe_back_buffer_id) to return the window structure that the
199 * id is a back buffer for. Since both front and back buffers will
200 * return the same structure, you need to be able to distinguish
201 * somewhere what kind of buffer (front/back) was being asked for, so
202 * that ddx can render to the right place. That's the problem that the
203 * following code solves. Note: we couldn't embed this in the LookupID*
204 * functions because the VALIDATE_DRAWABLE_AND_GC macro often circumvents
205 * those functions by checking a one-element cache. That's why we're
206 * mucking with VALIDATE_DRAWABLE_AND_GC.
207 *
208 * If you put -DNEED_DBE_BUF_BITS into PervasiveDBEDefines, the window
209 * structure will have two additional bits defined, srcBuffer and
210 * dstBuffer, and their values will be maintained via the macros
211 * SET_DBE_DSTBUF and SET_DBE_SRCBUF (below). If you also
212 * put -DNEED_DBE_BUF_VALIDATE into PervasiveDBEDefines, the function
213 * DbeValidateBuffer will be called any time the bits change to give you
214 * a chance to do some setup. See the DBE code for more details on this
215 * function. We put in these levels of conditionality so that you can do
216 * just what you need to do, and no more. If neither of these defines
217 * are used, the bits won't be there, and VALIDATE_DRAWABLE_AND_GC will
218 * be unchanged. dpw
219 */
220
221#if defined(NEED_DBE_BUF_BITS)
222#define SET_DBE_DSTBUF(_pDraw, _drawID) \
223 SET_DBE_BUF(_pDraw, _drawID, dstBuffer, TRUE)
224#define SET_DBE_SRCBUF(_pDraw, _drawID) \
225 SET_DBE_BUF(_pDraw, _drawID, srcBuffer, FALSE)
226#if defined (NEED_DBE_BUF_VALIDATE)
227#define SET_DBE_BUF(_pDraw, _drawID, _whichBuffer, _dstbuf) \
228 if (_pDraw->type == DRAWABLE_WINDOW)\
229 {\
230 int thisbuf = (_pDraw->id == _drawID);\
231 if (thisbuf != ((WindowPtr)_pDraw)->_whichBuffer)\
232 {\
233 ((WindowPtr)_pDraw)->_whichBuffer = thisbuf;\
234 DbeValidateBuffer((WindowPtr)_pDraw, _drawID, _dstbuf);\
235 }\
236 }
237#else /* want buffer bits, but don't need to call DbeValidateBuffer */
238#define SET_DBE_BUF(_pDraw, _drawID, _whichBuffer, _dstbuf) \
239 if (_pDraw->type == DRAWABLE_WINDOW)\
240 {\
241 ((WindowPtr)_pDraw)->_whichBuffer = (_pDraw->id == _drawID);\
242 }
243#endif /* NEED_DBE_BUF_VALIDATE */
244#else /* don't want buffer bits in window */
245#define SET_DBE_DSTBUF(_pDraw, _drawID) /**/
246#define SET_DBE_SRCBUF(_pDraw, _drawID) /**/
247#endif /* NEED_DBE_BUF_BITS */
248
249#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, pGC, client)\
250 if ((stuff->gc == INVALID) || (client->lastGCID != stuff->gc) ||\
251 (client->lastDrawableID != drawID))\
252 {\
253 SECURITY_VERIFY_GEOMETRABLE(pDraw, drawID, client, SecurityWriteAccess);\
254 SECURITY_VERIFY_GC(pGC, stuff->gc, client, SecurityReadAccess);\
255 if ((pGC->depth != pDraw->depth) ||\
256 (pGC->pScreen != pDraw->pScreen))\
257 return (BadMatch);\
258 client->lastDrawable = pDraw;\
259 client->lastDrawableID = drawID;\
260 client->lastGC = pGC;\
261 client->lastGCID = stuff->gc;\
262 }\
263 else\
264 {\
265 pGC = client->lastGC;\
266 pDraw = client->lastDrawable;\
267 }\
268 SET_DBE_DSTBUF(pDraw, drawID);\
269 if (pGC->serialNumber != pDraw->serialNumber)\
270 ValidateGC(pDraw, pGC);
271
272
273#define WriteReplyToClient(pClient, size, pReply) { \
274 if ((pClient)->swapped) \
275 (*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \
276 (pClient, (int)(size), pReply); \
277 else (void) WriteToClient(pClient, (int)(size), (char *)(pReply)); }
278
279#define WriteSwappedDataToClient(pClient, size, pbuf) \
280 if ((pClient)->swapped) \
281 (*(pClient)->pSwapReplyFunc)(pClient, (int)(size), pbuf); \
282 else (void) WriteToClient (pClient, (int)(size), (char *)(pbuf));
283
284typedef struct _TimeStamp *TimeStampPtr;
285
286#ifndef _XTYPEDEF_CLIENTPTR
287typedef struct _Client *ClientPtr; /* also in misc.h */
288#define _XTYPEDEF_CLIENTPTR
289#endif
290
291typedef struct _WorkQueue *WorkQueuePtr;
292
293extern ClientPtr requestingClient;
294extern ClientPtr *clients;
295extern ClientPtr serverClient;
296extern int currentMaxClients;
297
298typedef int HWEventQueueType;
299typedef HWEventQueueType* HWEventQueuePtr;
300
301extern HWEventQueuePtr checkForInput[2];
302
303typedef struct _TimeStamp {
304 CARD32 months; /* really ~49.7 days */
305 CARD32 milliseconds;
306} TimeStamp;
307
308/* dispatch.c */
309
310extern void SetInputCheck(
311 HWEventQueuePtr /*c0*/,
312 HWEventQueuePtr /*c1*/);
313
314extern void CloseDownClient(
315 ClientPtr /*client*/);
316
317extern void UpdateCurrentTime(void);
318
319extern void UpdateCurrentTimeIf(void);
320
321extern void InitSelections(void);
322
323extern void FlushClientCaches(XID /*id*/);
324
325extern int dixDestroyPixmap(
326 pointer /*value*/,
327 XID /*pid*/);
328
329extern void CloseDownRetainedResources(void);
330
331extern void InitClient(
332 ClientPtr /*client*/,
333 int /*i*/,
334 pointer /*ospriv*/);
335
336extern ClientPtr NextAvailableClient(
337 pointer /*ospriv*/);
338
339extern void SendErrorToClient(
340 ClientPtr /*client*/,
341 unsigned int /*majorCode*/,
342 unsigned int /*minorCode*/,
343 XID /*resId*/,
344 int /*errorCode*/);
345
346extern void DeleteWindowFromAnySelections(
347 WindowPtr /*pWin*/);
348
349extern void MarkClientException(
350 ClientPtr /*client*/);
351
352extern int GetGeometry(
353 ClientPtr /*client*/,
354 xGetGeometryReply* /* wa */);
355
356extern int SendConnSetup(
357 ClientPtr /*client*/,
358 char* /*reason*/);
359
360extern int DoGetImage(
361 ClientPtr /*client*/,
362 int /*format*/,
363 Drawable /*drawable*/,
364 int /*x*/,
365 int /*y*/,
366 int /*width*/,
367 int /*height*/,
368 Mask /*planemask*/,
369 xGetImageReply ** /*im_return*/);
370
371#ifdef LBX
372extern void IncrementClientCount(void);
373#endif /* LBX */
374
375#if defined(DDXBEFORERESET)
376extern void ddxBeforeReset (void);
377#endif
378
379/* dixutils.c */
380
381extern void CopyISOLatin1Lowered(
382 unsigned char * /*dest*/,
383 unsigned char * /*source*/,
384 int /*length*/);
385
386extern int CompareISOLatin1Lowered(
387 unsigned char * /*a*/,
388 int alen,
389 unsigned char * /*b*/,
390 int blen);
391
392#ifdef XCSECURITY
393
394extern WindowPtr SecurityLookupWindow(
395 XID /*rid*/,
396 ClientPtr /*client*/,
397 Mask /*access_mode*/);
398
399extern pointer SecurityLookupDrawable(
400 XID /*rid*/,
401 ClientPtr /*client*/,
402 Mask /*access_mode*/);
403
404extern WindowPtr LookupWindow(
405 XID /*rid*/,
406 ClientPtr /*client*/);
407
408extern pointer LookupDrawable(
409 XID /*rid*/,
410 ClientPtr /*client*/);
411
412#else
413
414extern WindowPtr LookupWindow(
415 XID /*rid*/,
416 ClientPtr /*client*/);
417
418extern pointer LookupDrawable(
419 XID /*rid*/,
420 ClientPtr /*client*/);
421
422#define SecurityLookupWindow(rid, client, access_mode) \
423 LookupWindow(rid, client)
424
425#define SecurityLookupDrawable(rid, client, access_mode) \
426 LookupDrawable(rid, client)
427
428#endif /* XCSECURITY */
429
430extern ClientPtr LookupClient(
431 XID /*rid*/,
432 ClientPtr /*client*/);
433
434extern void NoopDDA(void);
435
436extern int AlterSaveSetForClient(
437 ClientPtr /*client*/,
438 WindowPtr /*pWin*/,
439 unsigned /*mode*/,
440 Bool /*toRoot*/,
441 Bool /*remap*/);
442
443extern void DeleteWindowFromAnySaveSet(
444 WindowPtr /*pWin*/);
445
446extern void BlockHandler(
447 pointer /*pTimeout*/,
448 pointer /*pReadmask*/);
449
450extern void WakeupHandler(
451 int /*result*/,
452 pointer /*pReadmask*/);
453
454typedef void (* WakeupHandlerProcPtr)(
455 pointer /* blockData */,
456 int /* result */,
457 pointer /* pReadmask */);
458
459extern Bool RegisterBlockAndWakeupHandlers(
460 BlockHandlerProcPtr /*blockHandler*/,
461 WakeupHandlerProcPtr /*wakeupHandler*/,
462 pointer /*blockData*/);
463
464extern void RemoveBlockAndWakeupHandlers(
465 BlockHandlerProcPtr /*blockHandler*/,
466 WakeupHandlerProcPtr /*wakeupHandler*/,
467 pointer /*blockData*/);
468
469extern void InitBlockAndWakeupHandlers(void);
470
471extern void ProcessWorkQueue(void);
472
473extern void ProcessWorkQueueZombies(void);
474
475extern Bool QueueWorkProc(
476 Bool (* /*function*/)(
477 ClientPtr /*clientUnused*/,
478 pointer /*closure*/),
479 ClientPtr /*client*/,
480 pointer /*closure*/
481);
482
483typedef Bool (* ClientSleepProcPtr)(
484 ClientPtr /*client*/,
485 pointer /*closure*/);
486
487extern Bool ClientSleep(
488 ClientPtr /*client*/,
489 ClientSleepProcPtr /* function */,
490 pointer /*closure*/);
491
492#ifndef ___CLIENTSIGNAL_DEFINED___
493#define ___CLIENTSIGNAL_DEFINED___
494extern Bool ClientSignal(
495 ClientPtr /*client*/);
496#endif /* ___CLIENTSIGNAL_DEFINED___ */
497
498extern void ClientWakeup(
499 ClientPtr /*client*/);
500
501extern Bool ClientIsAsleep(
502 ClientPtr /*client*/);
503
504/* atom.c */
505
506extern Atom MakeAtom(
507 char * /*string*/,
508 unsigned /*len*/,
509 Bool /*makeit*/);
510
511extern Bool ValidAtom(
512 Atom /*atom*/);
513
514extern char *NameForAtom(
515 Atom /*atom*/);
516
517extern void AtomError(void);
518
519extern void FreeAllAtoms(void);
520
521extern void InitAtoms(void);
522
523/* events.c */
524
525extern void SetMaskForEvent(
526 Mask /* mask */,
527 int /* event */);
528
529
530extern Bool IsParent(
531 WindowPtr /* maybeparent */,
532 WindowPtr /* child */);
533
534extern WindowPtr GetCurrentRootWindow(void);
535
536extern WindowPtr GetSpriteWindow(void);
537
538
539extern void NoticeEventTime(xEventPtr /* xE */);
540
541extern void EnqueueEvent(
542 xEventPtr /* xE */,
543 DeviceIntPtr /* device */,
544 int /* count */);
545
546extern void ComputeFreezes(void);
547
548extern void CheckGrabForSyncs(
549 DeviceIntPtr /* dev */,
550 Bool /* thisMode */,
551 Bool /* otherMode */);
552
553extern void ActivatePointerGrab(
554 DeviceIntPtr /* mouse */,
555 GrabPtr /* grab */,
556 TimeStamp /* time */,
557 Bool /* autoGrab */);
558
559extern void DeactivatePointerGrab(
560 DeviceIntPtr /* mouse */);
561
562extern void ActivateKeyboardGrab(
563 DeviceIntPtr /* keybd */,
564 GrabPtr /* grab */,
565 TimeStamp /* time */,
566 Bool /* passive */);
567
568extern void DeactivateKeyboardGrab(
569 DeviceIntPtr /* keybd */);
570
571extern void AllowSome(
572 ClientPtr /* client */,
573 TimeStamp /* time */,
574 DeviceIntPtr /* thisDev */,
575 int /* newState */);
576
577extern void ReleaseActiveGrabs(
578 ClientPtr client);
579
580extern int DeliverEventsToWindow(
581 WindowPtr /* pWin */,
582 xEventPtr /* pEvents */,
583 int /* count */,
584 Mask /* filter */,
585 GrabPtr /* grab */,
586 int /* mskidx */);
587
588extern int DeliverDeviceEvents(
589 WindowPtr /* pWin */,
590 xEventPtr /* xE */,
591 GrabPtr /* grab */,
592 WindowPtr /* stopAt */,
593 DeviceIntPtr /* dev */,
594 int /* count */);
595
596extern void DefineInitialRootWindow(
597 WindowPtr /* win */);
598
599extern void WindowHasNewCursor(
600 WindowPtr /* pWin */);
601
602extern Bool CheckDeviceGrabs(
603 DeviceIntPtr /* device */,
604 xEventPtr /* xE */,
605 int /* checkFirst */,
606 int /* count */);
607
608extern void DeliverFocusedEvent(
609 DeviceIntPtr /* keybd */,
610 xEventPtr /* xE */,
611 WindowPtr /* window */,
612 int /* count */);
613
614extern void DeliverGrabbedEvent(
615 xEventPtr /* xE */,
616 DeviceIntPtr /* thisDev */,
617 Bool /* deactivateGrab */,
618 int /* count */);
619
620#ifdef XKB
621extern void FixKeyState(
622 xEvent * /* xE */,
623 DeviceIntPtr /* keybd */);
624#endif /* XKB */
625
626extern void RecalculateDeliverableEvents(
627 WindowPtr /* pWin */);
628
629extern int OtherClientGone(
630 pointer /* value */,
631 XID /* id */);
632
633extern void DoFocusEvents(
634 DeviceIntPtr /* dev */,
635 WindowPtr /* fromWin */,
636 WindowPtr /* toWin */,
637 int /* mode */);
638
639extern int SetInputFocus(
640 ClientPtr /* client */,
641 DeviceIntPtr /* dev */,
642 Window /* focusID */,
643 CARD8 /* revertTo */,
644 Time /* ctime */,
645 Bool /* followOK */);
646
647extern int GrabDevice(
648 ClientPtr /* client */,
649 DeviceIntPtr /* dev */,
650 unsigned /* this_mode */,
651 unsigned /* other_mode */,
652 Window /* grabWindow */,
653 unsigned /* ownerEvents */,
654 Time /* ctime */,
655 Mask /* mask */,
656 CARD8 * /* status */);
657
658extern void InitEvents(void);
659
660extern void CloseDownEvents(void);
661
662extern void DeleteWindowFromAnyEvents(
663 WindowPtr /* pWin */,
664 Bool /* freeResources */);
665
666
667extern Mask EventMaskForClient(
668 WindowPtr /* pWin */,
669 ClientPtr /* client */);
670
671
672
673extern int DeliverEvents(
674 WindowPtr /*pWin*/,
675 xEventPtr /*xE*/,
676 int /*count*/,
677 WindowPtr /*otherParent*/);
678
679
680extern void WriteEventsToClient(
681 ClientPtr /*pClient*/,
682 int /*count*/,
683 xEventPtr /*events*/);
684
685extern int TryClientEvents(
686 ClientPtr /*client*/,
687 xEventPtr /*pEvents*/,
688 int /*count*/,
689 Mask /*mask*/,
690 Mask /*filter*/,
691 GrabPtr /*grab*/);
692
693extern void WindowsRestructured(void);
694
695
696#ifdef RANDR
697void
698ScreenRestructured (ScreenPtr pScreen);
699#endif
700
701extern void ResetClientPrivates(void);
702
703extern int AllocateClientPrivateIndex(void);
704
705extern Bool AllocateClientPrivate(
706 int /*index*/,
707 unsigned /*amount*/);
708
709/*
710 * callback manager stuff
711 */
712
713#ifndef _XTYPEDEF_CALLBACKLISTPTR
714typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */
715#define _XTYPEDEF_CALLBACKLISTPTR
716#endif
717
718typedef void (*CallbackProcPtr) (
719 CallbackListPtr *, pointer, pointer);
720
721typedef Bool (*AddCallbackProcPtr) (
722 CallbackListPtr *, CallbackProcPtr, pointer);
723
724typedef Bool (*DeleteCallbackProcPtr) (
725 CallbackListPtr *, CallbackProcPtr, pointer);
726
727typedef void (*CallCallbacksProcPtr) (
728 CallbackListPtr *, pointer);
729
730typedef void (*DeleteCallbackListProcPtr) (
731 CallbackListPtr *);
732
733typedef struct _CallbackProcs {
734 AddCallbackProcPtr AddCallback;
735 DeleteCallbackProcPtr DeleteCallback;
736 CallCallbacksProcPtr CallCallbacks;
737 DeleteCallbackListProcPtr DeleteCallbackList;
738} CallbackFuncsRec, *CallbackFuncsPtr;
739
740extern Bool CreateCallbackList(
741 CallbackListPtr * /*pcbl*/,
742 CallbackFuncsPtr /*cbfuncs*/);
743
744extern Bool AddCallback(
745 CallbackListPtr * /*pcbl*/,
746 CallbackProcPtr /*callback*/,
747 pointer /*data*/);
748
749extern Bool DeleteCallback(
750 CallbackListPtr * /*pcbl*/,
751 CallbackProcPtr /*callback*/,
752 pointer /*data*/);
753
754extern void CallCallbacks(
755 CallbackListPtr * /*pcbl*/,
756 pointer /*call_data*/);
757
758extern void DeleteCallbackList(
759 CallbackListPtr * /*pcbl*/);
760
761extern void InitCallbackManager(void);
762
763/*
764 * ServerGrabCallback stuff
765 */
766
767extern CallbackListPtr ServerGrabCallback;
768
769typedef enum {SERVER_GRABBED, SERVER_UNGRABBED,
770 CLIENT_PERVIOUS, CLIENT_IMPERVIOUS } ServerGrabState;
771
772typedef struct {
773 ClientPtr client;
774 ServerGrabState grabstate;
775} ServerGrabInfoRec;
776
777/*
778 * EventCallback stuff
779 */
780
781extern CallbackListPtr EventCallback;
782
783typedef struct {
784 ClientPtr client;
785 xEventPtr events;
786 int count;
787} EventInfoRec;
788
789/*
790 * DeviceEventCallback stuff
791 */
792
793extern CallbackListPtr DeviceEventCallback;
794
795typedef struct {
796 xEventPtr events;
797 int count;
798} DeviceEventInfoRec;
799
800/*
801 * SelectionCallback stuff
802 */
803
804extern CallbackListPtr SelectionCallback;
805
806typedef enum {
807 SelectionSetOwner,
808 SelectionWindowDestroy,
809 SelectionClientClose
810} SelectionCallbackKind;
811
812typedef struct {
813 struct _Selection *selection;
814 SelectionCallbackKind kind;
815} SelectionInfoRec;
816
817#endif /* DIX_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette