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 int CompareISOLatin1Lowered(
|
---|
177 | unsigned char * /*a*/,
|
---|
178 | int alen,
|
---|
179 | unsigned char * /*b*/,
|
---|
180 | int blen);
|
---|
181 |
|
---|
182 | extern _X_EXPORT int dixLookupWindow(
|
---|
183 | WindowPtr *result,
|
---|
184 | XID id,
|
---|
185 | ClientPtr client,
|
---|
186 | Mask access_mode);
|
---|
187 |
|
---|
188 | extern _X_EXPORT int dixLookupDrawable(
|
---|
189 | DrawablePtr *result,
|
---|
190 | XID id,
|
---|
191 | ClientPtr client,
|
---|
192 | Mask type_mask,
|
---|
193 | Mask access_mode);
|
---|
194 |
|
---|
195 | extern _X_EXPORT int dixLookupGC(
|
---|
196 | GCPtr *result,
|
---|
197 | XID id,
|
---|
198 | ClientPtr client,
|
---|
199 | Mask access_mode);
|
---|
200 |
|
---|
201 | extern _X_EXPORT int dixLookupClient(
|
---|
202 | ClientPtr *result,
|
---|
203 | XID id,
|
---|
204 | ClientPtr client,
|
---|
205 | Mask access_mode);
|
---|
206 |
|
---|
207 | extern _X_EXPORT void NoopDDA(void);
|
---|
208 |
|
---|
209 | extern _X_EXPORT int AlterSaveSetForClient(
|
---|
210 | ClientPtr /*client*/,
|
---|
211 | WindowPtr /*pWin*/,
|
---|
212 | unsigned /*mode*/,
|
---|
213 | Bool /*toRoot*/,
|
---|
214 | Bool /*map*/);
|
---|
215 |
|
---|
216 | extern _X_EXPORT void DeleteWindowFromAnySaveSet(
|
---|
217 | WindowPtr /*pWin*/);
|
---|
218 |
|
---|
219 | extern _X_EXPORT void BlockHandler(
|
---|
220 | pointer /*pTimeout*/,
|
---|
221 | pointer /*pReadmask*/);
|
---|
222 |
|
---|
223 | extern _X_EXPORT void WakeupHandler(
|
---|
224 | int /*result*/,
|
---|
225 | pointer /*pReadmask*/);
|
---|
226 |
|
---|
227 | void
|
---|
228 | EnableLimitedSchedulingLatency(void);
|
---|
229 |
|
---|
230 | void
|
---|
231 | DisableLimitedSchedulingLatency(void);
|
---|
232 |
|
---|
233 | typedef void (* WakeupHandlerProcPtr)(
|
---|
234 | pointer /* blockData */,
|
---|
235 | int /* result */,
|
---|
236 | pointer /* pReadmask */);
|
---|
237 |
|
---|
238 | extern _X_EXPORT Bool RegisterBlockAndWakeupHandlers(
|
---|
239 | BlockHandlerProcPtr /*blockHandler*/,
|
---|
240 | WakeupHandlerProcPtr /*wakeupHandler*/,
|
---|
241 | pointer /*blockData*/);
|
---|
242 |
|
---|
243 | extern _X_EXPORT void RemoveBlockAndWakeupHandlers(
|
---|
244 | BlockHandlerProcPtr /*blockHandler*/,
|
---|
245 | WakeupHandlerProcPtr /*wakeupHandler*/,
|
---|
246 | pointer /*blockData*/);
|
---|
247 |
|
---|
248 | extern _X_EXPORT void InitBlockAndWakeupHandlers(void);
|
---|
249 |
|
---|
250 | extern _X_EXPORT void ProcessWorkQueue(void);
|
---|
251 |
|
---|
252 | extern _X_EXPORT void ProcessWorkQueueZombies(void);
|
---|
253 |
|
---|
254 | extern _X_EXPORT Bool QueueWorkProc(
|
---|
255 | Bool (* /*function*/)(
|
---|
256 | ClientPtr /*clientUnused*/,
|
---|
257 | pointer /*closure*/),
|
---|
258 | ClientPtr /*client*/,
|
---|
259 | pointer /*closure*/
|
---|
260 | );
|
---|
261 |
|
---|
262 | typedef Bool (* ClientSleepProcPtr)(
|
---|
263 | ClientPtr /*client*/,
|
---|
264 | pointer /*closure*/);
|
---|
265 |
|
---|
266 | extern _X_EXPORT Bool ClientSleep(
|
---|
267 | ClientPtr /*client*/,
|
---|
268 | ClientSleepProcPtr /* function */,
|
---|
269 | pointer /*closure*/);
|
---|
270 |
|
---|
271 | #ifndef ___CLIENTSIGNAL_DEFINED___
|
---|
272 | #define ___CLIENTSIGNAL_DEFINED___
|
---|
273 | extern _X_EXPORT Bool ClientSignal(
|
---|
274 | ClientPtr /*client*/);
|
---|
275 | #endif /* ___CLIENTSIGNAL_DEFINED___ */
|
---|
276 |
|
---|
277 | extern _X_EXPORT void ClientWakeup(
|
---|
278 | ClientPtr /*client*/);
|
---|
279 |
|
---|
280 | extern _X_EXPORT Bool ClientIsAsleep(
|
---|
281 | ClientPtr /*client*/);
|
---|
282 |
|
---|
283 | /* atom.c */
|
---|
284 |
|
---|
285 | extern _X_EXPORT Atom MakeAtom(
|
---|
286 | const char * /*string*/,
|
---|
287 | unsigned /*len*/,
|
---|
288 | Bool /*makeit*/);
|
---|
289 |
|
---|
290 | extern _X_EXPORT Bool ValidAtom(
|
---|
291 | Atom /*atom*/);
|
---|
292 |
|
---|
293 | extern _X_EXPORT const char *NameForAtom(
|
---|
294 | Atom /*atom*/);
|
---|
295 |
|
---|
296 | extern _X_EXPORT void AtomError(void);
|
---|
297 |
|
---|
298 | extern _X_EXPORT void FreeAllAtoms(void);
|
---|
299 |
|
---|
300 | extern _X_EXPORT void InitAtoms(void);
|
---|
301 |
|
---|
302 | /* main.c */
|
---|
303 |
|
---|
304 | extern _X_EXPORT void SetVendorRelease(int release);
|
---|
305 |
|
---|
306 | extern _X_EXPORT void SetVendorString(char *string);
|
---|
307 |
|
---|
308 | /* events.c */
|
---|
309 |
|
---|
310 | extern void SetMaskForEvent(
|
---|
311 | int /* deviceid */,
|
---|
312 | Mask /* mask */,
|
---|
313 | int /* event */);
|
---|
314 |
|
---|
315 | extern _X_EXPORT void ConfineToShape(
|
---|
316 | DeviceIntPtr /* pDev */,
|
---|
317 | RegionPtr /* shape */,
|
---|
318 | int* /* px */,
|
---|
319 | int* /* py */);
|
---|
320 |
|
---|
321 | extern _X_EXPORT Bool IsParent(
|
---|
322 | WindowPtr /* maybeparent */,
|
---|
323 | WindowPtr /* child */);
|
---|
324 |
|
---|
325 | extern _X_EXPORT WindowPtr GetCurrentRootWindow(DeviceIntPtr pDev);
|
---|
326 |
|
---|
327 | extern _X_EXPORT WindowPtr GetSpriteWindow(DeviceIntPtr pDev);
|
---|
328 |
|
---|
329 |
|
---|
330 | extern _X_EXPORT void NoticeEventTime(InternalEvent *ev);
|
---|
331 |
|
---|
332 | extern void EnqueueEvent(
|
---|
333 | InternalEvent * /* ev */,
|
---|
334 | DeviceIntPtr /* device */);
|
---|
335 |
|
---|
336 | extern void ActivatePointerGrab(
|
---|
337 | DeviceIntPtr /* mouse */,
|
---|
338 | GrabPtr /* grab */,
|
---|
339 | TimeStamp /* time */,
|
---|
340 | Bool /* autoGrab */);
|
---|
341 |
|
---|
342 | extern void DeactivatePointerGrab(
|
---|
343 | DeviceIntPtr /* mouse */);
|
---|
344 |
|
---|
345 | extern void ActivateKeyboardGrab(
|
---|
346 | DeviceIntPtr /* keybd */,
|
---|
347 | GrabPtr /* grab */,
|
---|
348 | TimeStamp /* time */,
|
---|
349 | Bool /* passive */);
|
---|
350 |
|
---|
351 | extern void DeactivateKeyboardGrab(
|
---|
352 | DeviceIntPtr /* keybd */);
|
---|
353 |
|
---|
354 | extern BOOL ActivateFocusInGrab(
|
---|
355 | DeviceIntPtr /* dev */,
|
---|
356 | WindowPtr /* old */,
|
---|
357 | WindowPtr /* win */);
|
---|
358 |
|
---|
359 | extern void AllowSome(
|
---|
360 | ClientPtr /* client */,
|
---|
361 | TimeStamp /* time */,
|
---|
362 | DeviceIntPtr /* thisDev */,
|
---|
363 | int /* newState */);
|
---|
364 |
|
---|
365 | extern void ReleaseActiveGrabs(
|
---|
366 | ClientPtr client);
|
---|
367 |
|
---|
368 | extern _X_EXPORT int DeliverEventsToWindow(
|
---|
369 | DeviceIntPtr /* pWin */,
|
---|
370 | WindowPtr /* pWin */,
|
---|
371 | xEventPtr /* pEvents */,
|
---|
372 | int /* count */,
|
---|
373 | Mask /* filter */,
|
---|
374 | GrabPtr /* grab */);
|
---|
375 |
|
---|
376 | extern int DeliverDeviceEvents(
|
---|
377 | WindowPtr /* pWin */,
|
---|
378 | InternalEvent* /* event */,
|
---|
379 | GrabPtr /* grab */,
|
---|
380 | WindowPtr /* stopAt */,
|
---|
381 | DeviceIntPtr /* dev */);
|
---|
382 |
|
---|
383 | extern void InitializeSprite(
|
---|
384 | DeviceIntPtr /* pDev */,
|
---|
385 | WindowPtr /* pWin */);
|
---|
386 |
|
---|
387 | extern void UpdateSpriteForScreen(
|
---|
388 | DeviceIntPtr /* pDev */,
|
---|
389 | ScreenPtr /* pScreen */);
|
---|
390 |
|
---|
391 | extern _X_EXPORT void WindowHasNewCursor(
|
---|
392 | WindowPtr /* pWin */);
|
---|
393 |
|
---|
394 | extern Bool CheckDeviceGrabs(
|
---|
395 | DeviceIntPtr /* device */,
|
---|
396 | DeviceEvent* /* event */,
|
---|
397 | int /* checkFirst */);
|
---|
398 |
|
---|
399 | extern void DeliverFocusedEvent(
|
---|
400 | DeviceIntPtr /* keybd */,
|
---|
401 | InternalEvent* /* event */,
|
---|
402 | WindowPtr /* window */);
|
---|
403 |
|
---|
404 | extern void DeliverGrabbedEvent(
|
---|
405 | InternalEvent* /* event */,
|
---|
406 | DeviceIntPtr /* thisDev */,
|
---|
407 | Bool /* deactivateGrab */);
|
---|
408 |
|
---|
409 | extern void FixKeyState(
|
---|
410 | DeviceEvent* /* event */,
|
---|
411 | DeviceIntPtr /* keybd */);
|
---|
412 |
|
---|
413 | extern void RecalculateDeliverableEvents(
|
---|
414 | WindowPtr /* pWin */);
|
---|
415 |
|
---|
416 | extern _X_EXPORT int OtherClientGone(
|
---|
417 | pointer /* value */,
|
---|
418 | XID /* id */);
|
---|
419 |
|
---|
420 | extern void DoFocusEvents(
|
---|
421 | DeviceIntPtr /* dev */,
|
---|
422 | WindowPtr /* fromWin */,
|
---|
423 | WindowPtr /* toWin */,
|
---|
424 | int /* mode */);
|
---|
425 |
|
---|
426 | extern int SetInputFocus(
|
---|
427 | ClientPtr /* client */,
|
---|
428 | DeviceIntPtr /* dev */,
|
---|
429 | Window /* focusID */,
|
---|
430 | CARD8 /* revertTo */,
|
---|
431 | Time /* ctime */,
|
---|
432 | Bool /* followOK */);
|
---|
433 |
|
---|
434 | extern int GrabDevice(
|
---|
435 | ClientPtr /* client */,
|
---|
436 | DeviceIntPtr /* dev */,
|
---|
437 | unsigned /* this_mode */,
|
---|
438 | unsigned /* other_mode */,
|
---|
439 | Window /* grabWindow */,
|
---|
440 | unsigned /* ownerEvents */,
|
---|
441 | Time /* ctime */,
|
---|
442 | GrabMask* /* mask */,
|
---|
443 | int /* grabtype */,
|
---|
444 | Cursor /* curs */,
|
---|
445 | Window /* confineToWin */,
|
---|
446 | CARD8 * /* status */);
|
---|
447 |
|
---|
448 | extern void InitEvents(void);
|
---|
449 |
|
---|
450 | extern void CloseDownEvents(void);
|
---|
451 |
|
---|
452 | extern void DeleteWindowFromAnyEvents(
|
---|
453 | WindowPtr /* pWin */,
|
---|
454 | Bool /* freeResources */);
|
---|
455 |
|
---|
456 |
|
---|
457 | extern Mask EventMaskForClient(
|
---|
458 | WindowPtr /* pWin */,
|
---|
459 | ClientPtr /* client */);
|
---|
460 |
|
---|
461 |
|
---|
462 |
|
---|
463 | extern _X_EXPORT int DeliverEvents(
|
---|
464 | WindowPtr /*pWin*/,
|
---|
465 | xEventPtr /*xE*/,
|
---|
466 | int /*count*/,
|
---|
467 | WindowPtr /*otherParent*/);
|
---|
468 |
|
---|
469 | extern Bool CheckMotion(
|
---|
470 | DeviceEvent* /* ev */,
|
---|
471 | DeviceIntPtr /* pDev */);
|
---|
472 |
|
---|
473 | extern _X_EXPORT void WriteEventsToClient(
|
---|
474 | ClientPtr /*pClient*/,
|
---|
475 | int /*count*/,
|
---|
476 | xEventPtr /*events*/);
|
---|
477 |
|
---|
478 | extern _X_EXPORT int TryClientEvents(
|
---|
479 | ClientPtr /*client*/,
|
---|
480 | DeviceIntPtr /* device */,
|
---|
481 | xEventPtr /*pEvents*/,
|
---|
482 | int /*count*/,
|
---|
483 | Mask /*mask*/,
|
---|
484 | Mask /*filter*/,
|
---|
485 | GrabPtr /*grab*/);
|
---|
486 |
|
---|
487 | extern _X_EXPORT void WindowsRestructured(void);
|
---|
488 |
|
---|
489 | extern int SetClientPointer(
|
---|
490 | ClientPtr /* client */,
|
---|
491 | DeviceIntPtr /* device */);
|
---|
492 |
|
---|
493 | extern _X_EXPORT DeviceIntPtr PickPointer(
|
---|
494 | ClientPtr /* client */);
|
---|
495 |
|
---|
496 | extern _X_EXPORT DeviceIntPtr PickKeyboard(
|
---|
497 | ClientPtr /* client */);
|
---|
498 |
|
---|
499 | extern Bool IsInterferingGrab(
|
---|
500 | ClientPtr /* client */,
|
---|
501 | DeviceIntPtr /* dev */,
|
---|
502 | xEvent* /* events */);
|
---|
503 |
|
---|
504 | #ifdef PANORAMIX
|
---|
505 | extern _X_EXPORT void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
|
---|
506 | #endif
|
---|
507 |
|
---|
508 | #ifdef RANDR
|
---|
509 | extern _X_EXPORT void
|
---|
510 | ScreenRestructured (ScreenPtr pScreen);
|
---|
511 | #endif
|
---|
512 |
|
---|
513 | extern _X_EXPORT int ffs(int i);
|
---|
514 |
|
---|
515 | /*
|
---|
516 | * callback manager stuff
|
---|
517 | */
|
---|
518 |
|
---|
519 | #ifndef _XTYPEDEF_CALLBACKLISTPTR
|
---|
520 | typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */
|
---|
521 | #define _XTYPEDEF_CALLBACKLISTPTR
|
---|
522 | #endif
|
---|
523 |
|
---|
524 | typedef void (*CallbackProcPtr) (
|
---|
525 | CallbackListPtr *, pointer, pointer);
|
---|
526 |
|
---|
527 | extern _X_EXPORT Bool AddCallback(
|
---|
528 | CallbackListPtr * /*pcbl*/,
|
---|
529 | CallbackProcPtr /*callback*/,
|
---|
530 | pointer /*data*/);
|
---|
531 |
|
---|
532 | extern _X_EXPORT Bool DeleteCallback(
|
---|
533 | CallbackListPtr * /*pcbl*/,
|
---|
534 | CallbackProcPtr /*callback*/,
|
---|
535 | pointer /*data*/);
|
---|
536 |
|
---|
537 | extern _X_EXPORT void CallCallbacks(
|
---|
538 | CallbackListPtr * /*pcbl*/,
|
---|
539 | pointer /*call_data*/);
|
---|
540 |
|
---|
541 | extern _X_EXPORT void DeleteCallbackList(
|
---|
542 | CallbackListPtr * /*pcbl*/);
|
---|
543 |
|
---|
544 | extern _X_EXPORT void InitCallbackManager(void);
|
---|
545 |
|
---|
546 | /*
|
---|
547 | * ServerGrabCallback stuff
|
---|
548 | */
|
---|
549 |
|
---|
550 | extern _X_EXPORT CallbackListPtr ServerGrabCallback;
|
---|
551 |
|
---|
552 | typedef enum {SERVER_GRABBED, SERVER_UNGRABBED,
|
---|
553 | CLIENT_PERVIOUS, CLIENT_IMPERVIOUS } ServerGrabState;
|
---|
554 |
|
---|
555 | typedef struct {
|
---|
556 | ClientPtr client;
|
---|
557 | ServerGrabState grabstate;
|
---|
558 | } ServerGrabInfoRec;
|
---|
559 |
|
---|
560 | /*
|
---|
561 | * EventCallback stuff
|
---|
562 | */
|
---|
563 |
|
---|
564 | extern _X_EXPORT CallbackListPtr EventCallback;
|
---|
565 |
|
---|
566 | typedef struct {
|
---|
567 | ClientPtr client;
|
---|
568 | xEventPtr events;
|
---|
569 | int count;
|
---|
570 | } EventInfoRec;
|
---|
571 |
|
---|
572 | /*
|
---|
573 | * DeviceEventCallback stuff
|
---|
574 | */
|
---|
575 |
|
---|
576 | extern _X_EXPORT CallbackListPtr DeviceEventCallback;
|
---|
577 |
|
---|
578 | typedef struct {
|
---|
579 | InternalEvent *event;
|
---|
580 | DeviceIntPtr device;
|
---|
581 | } DeviceEventInfoRec;
|
---|
582 |
|
---|
583 | extern int XItoCoreType(int xi_type);
|
---|
584 | extern Bool DevHasCursor(DeviceIntPtr pDev);
|
---|
585 | extern Bool _X_EXPORT IsPointerDevice( DeviceIntPtr dev);
|
---|
586 | extern Bool _X_EXPORT IsKeyboardDevice(DeviceIntPtr dev);
|
---|
587 | extern Bool IsPointerEvent(InternalEvent *event);
|
---|
588 | extern _X_EXPORT Bool IsMaster(DeviceIntPtr dev);
|
---|
589 |
|
---|
590 | extern _X_HIDDEN void CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master);
|
---|
591 | extern _X_HIDDEN int CorePointerProc(DeviceIntPtr dev, int what);
|
---|
592 | extern _X_HIDDEN int CoreKeyboardProc(DeviceIntPtr dev, int what);
|
---|
593 |
|
---|
594 |
|
---|
595 | /*
|
---|
596 | * These are deprecated compatibility functions and will be removed soon!
|
---|
597 | * Please use the noted replacements instead.
|
---|
598 | */
|
---|
599 | /* replaced by dixLookupWindow */
|
---|
600 | extern _X_EXPORT WindowPtr SecurityLookupWindow(
|
---|
601 | XID id,
|
---|
602 | ClientPtr client,
|
---|
603 | Mask access_mode);
|
---|
604 | /* replaced by dixLookupWindow */
|
---|
605 | extern _X_EXPORT WindowPtr LookupWindow(
|
---|
606 | XID id,
|
---|
607 | ClientPtr client);
|
---|
608 |
|
---|
609 | /* replaced by dixLookupDrawable */
|
---|
610 | extern _X_EXPORT pointer SecurityLookupDrawable(
|
---|
611 | XID id,
|
---|
612 | ClientPtr client,
|
---|
613 | Mask access_mode);
|
---|
614 |
|
---|
615 | /* replaced by dixLookupDrawable */
|
---|
616 | extern _X_EXPORT pointer LookupDrawable(
|
---|
617 | XID id,
|
---|
618 | ClientPtr client);
|
---|
619 |
|
---|
620 | /* replaced by dixLookupClient */
|
---|
621 | extern _X_EXPORT ClientPtr LookupClient(
|
---|
622 | XID id,
|
---|
623 | ClientPtr client);
|
---|
624 |
|
---|
625 | #endif /* DIX_H */
|
---|