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