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