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 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
---|
26 |
|
---|
27 | All Rights Reserved
|
---|
28 |
|
---|
29 | Permission to use, copy, modify, and distribute this software and its
|
---|
30 | documentation for any purpose and without fee is hereby granted,
|
---|
31 | provided that the above copyright notice appear in all copies and that
|
---|
32 | both that copyright notice and this permission notice appear in
|
---|
33 | supporting documentation, and that the name of Digital not be
|
---|
34 | used in advertising or publicity pertaining to distribution of the
|
---|
35 | software without specific, written prior permission.
|
---|
36 |
|
---|
37 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
---|
38 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
---|
39 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
---|
40 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
---|
41 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
---|
42 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
---|
43 | SOFTWARE.
|
---|
44 |
|
---|
45 | ******************************************************************/
|
---|
46 |
|
---|
47 | #ifndef DIX_H
|
---|
48 | #define DIX_H
|
---|
49 |
|
---|
50 | #include "callback.h"
|
---|
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 | #define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0]))
|
---|
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_AT_LEAST_EXTRA_SIZE(req, extra) \
|
---|
78 | if (((sizeof(req) + ((uint64_t) extra)) >> 2) > client->req_len ) \
|
---|
79 | return(BadLength)
|
---|
80 |
|
---|
81 | #define REQUEST_FIXED_SIZE(req, n)\
|
---|
82 | if (((sizeof(req) >> 2) > client->req_len) || \
|
---|
83 | (((n) >> 2) >= client->req_len) || \
|
---|
84 | ((((uint64_t) sizeof(req) + (n) + 3) >> 2) != (uint64_t) client->req_len)) \
|
---|
85 | return(BadLength)
|
---|
86 |
|
---|
87 | #define LEGAL_NEW_RESOURCE(id,client)\
|
---|
88 | if (!LegalNewID(id,client)) \
|
---|
89 | {\
|
---|
90 | client->errorValue = id;\
|
---|
91 | return BadIDChoice;\
|
---|
92 | }
|
---|
93 |
|
---|
94 | #define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\
|
---|
95 | {\
|
---|
96 | int tmprc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode);\
|
---|
97 | if (tmprc != Success)\
|
---|
98 | return tmprc;\
|
---|
99 | tmprc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);\
|
---|
100 | if (tmprc != Success)\
|
---|
101 | return tmprc;\
|
---|
102 | if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
|
---|
103 | return BadMatch;\
|
---|
104 | }\
|
---|
105 | if (pGC->serialNumber != pDraw->serialNumber)\
|
---|
106 | ValidateGC(pDraw, pGC);
|
---|
107 |
|
---|
108 | #define WriteReplyToClient(pClient, size, pReply) { \
|
---|
109 | if ((pClient)->swapped) \
|
---|
110 | (*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \
|
---|
111 | (pClient, (int)(size), pReply); \
|
---|
112 | else WriteToClient(pClient, (int)(size), (pReply)); }
|
---|
113 |
|
---|
114 | #define WriteSwappedDataToClient(pClient, size, pbuf) \
|
---|
115 | if ((pClient)->swapped) \
|
---|
116 | (*(pClient)->pSwapReplyFunc)(pClient, (int)(size), pbuf); \
|
---|
117 | else WriteToClient(pClient, (int)(size), (pbuf));
|
---|
118 |
|
---|
119 | typedef struct _TimeStamp *TimeStampPtr;
|
---|
120 |
|
---|
121 | #ifndef _XTYPEDEF_CLIENTPTR
|
---|
122 | typedef struct _Client *ClientPtr; /* also in misc.h */
|
---|
123 |
|
---|
124 | #define _XTYPEDEF_CLIENTPTR
|
---|
125 | #endif
|
---|
126 |
|
---|
127 | typedef struct _WorkQueue *WorkQueuePtr;
|
---|
128 |
|
---|
129 | extern _X_EXPORT ClientPtr clients[MAXCLIENTS];
|
---|
130 | extern _X_EXPORT ClientPtr serverClient;
|
---|
131 | extern _X_EXPORT int currentMaxClients;
|
---|
132 | extern _X_EXPORT char dispatchExceptionAtReset;
|
---|
133 |
|
---|
134 | typedef int HWEventQueueType;
|
---|
135 | typedef HWEventQueueType *HWEventQueuePtr;
|
---|
136 |
|
---|
137 | extern _X_EXPORT HWEventQueuePtr checkForInput[2];
|
---|
138 |
|
---|
139 | typedef struct _TimeStamp {
|
---|
140 | CARD32 months; /* really ~49.7 days */
|
---|
141 | CARD32 milliseconds;
|
---|
142 | } TimeStamp;
|
---|
143 |
|
---|
144 | /* dispatch.c */
|
---|
145 |
|
---|
146 | extern _X_EXPORT void SetInputCheck(HWEventQueuePtr /*c0 */ ,
|
---|
147 | HWEventQueuePtr /*c1 */ );
|
---|
148 |
|
---|
149 | extern _X_EXPORT void CloseDownClient(ClientPtr /*client */ );
|
---|
150 |
|
---|
151 | extern _X_EXPORT void UpdateCurrentTime(void);
|
---|
152 |
|
---|
153 | extern _X_EXPORT void UpdateCurrentTimeIf(void);
|
---|
154 |
|
---|
155 | extern _X_EXPORT int dixDestroyPixmap(void *value,
|
---|
156 | XID pid);
|
---|
157 |
|
---|
158 | extern _X_EXPORT void InitClient(ClientPtr client,
|
---|
159 | int i,
|
---|
160 | void *ospriv);
|
---|
161 |
|
---|
162 | extern _X_EXPORT ClientPtr NextAvailableClient(void *ospriv);
|
---|
163 |
|
---|
164 | extern _X_EXPORT void SendErrorToClient(ClientPtr /*client */ ,
|
---|
165 | unsigned int /*majorCode */ ,
|
---|
166 | unsigned int /*minorCode */ ,
|
---|
167 | XID /*resId */ ,
|
---|
168 | int /*errorCode */ );
|
---|
169 |
|
---|
170 | extern _X_EXPORT void MarkClientException(ClientPtr /*client */ );
|
---|
171 |
|
---|
172 | extern _X_HIDDEN Bool CreateConnectionBlock(void);
|
---|
173 |
|
---|
174 | /* dixutils.c */
|
---|
175 |
|
---|
176 | extern _X_EXPORT int CompareISOLatin1Lowered(const unsigned char * /*a */ ,
|
---|
177 | int alen,
|
---|
178 | const unsigned char * /*b */ ,
|
---|
179 | int blen);
|
---|
180 |
|
---|
181 | extern _X_EXPORT int dixLookupWindow(WindowPtr *result,
|
---|
182 | XID id,
|
---|
183 | ClientPtr client, Mask access_mode);
|
---|
184 |
|
---|
185 | extern _X_EXPORT int dixLookupDrawable(DrawablePtr *result,
|
---|
186 | XID id,
|
---|
187 | ClientPtr client,
|
---|
188 | Mask type_mask, Mask access_mode);
|
---|
189 |
|
---|
190 | extern _X_EXPORT int dixLookupGC(GCPtr *result,
|
---|
191 | XID id, ClientPtr client, Mask access_mode);
|
---|
192 |
|
---|
193 | extern _X_EXPORT int dixLookupFontable(FontPtr *result,
|
---|
194 | XID id,
|
---|
195 | ClientPtr client, Mask access_mode);
|
---|
196 |
|
---|
197 | extern _X_EXPORT int dixLookupClient(ClientPtr *result,
|
---|
198 | XID id,
|
---|
199 | ClientPtr client, Mask access_mode);
|
---|
200 |
|
---|
201 | extern _X_EXPORT void NoopDDA(void);
|
---|
202 |
|
---|
203 | extern _X_EXPORT int AlterSaveSetForClient(ClientPtr /*client */ ,
|
---|
204 | WindowPtr /*pWin */ ,
|
---|
205 | unsigned /*mode */ ,
|
---|
206 | Bool /*toRoot */ ,
|
---|
207 | Bool /*map */ );
|
---|
208 |
|
---|
209 | extern _X_EXPORT void DeleteWindowFromAnySaveSet(WindowPtr /*pWin */ );
|
---|
210 |
|
---|
211 | extern _X_EXPORT void BlockHandler(void *pTimeout,
|
---|
212 | void *pReadmask);
|
---|
213 |
|
---|
214 | extern _X_EXPORT void WakeupHandler(int result,
|
---|
215 | void *pReadmask);
|
---|
216 |
|
---|
217 | void
|
---|
218 | EnableLimitedSchedulingLatency(void);
|
---|
219 |
|
---|
220 | void
|
---|
221 | DisableLimitedSchedulingLatency(void);
|
---|
222 |
|
---|
223 | typedef void (*WakeupHandlerProcPtr) (void *blockData,
|
---|
224 | int result,
|
---|
225 | void *pReadmask);
|
---|
226 |
|
---|
227 | extern _X_EXPORT Bool RegisterBlockAndWakeupHandlers(BlockHandlerProcPtr blockHandler,
|
---|
228 | WakeupHandlerProcPtr wakeupHandler,
|
---|
229 | void *blockData);
|
---|
230 |
|
---|
231 | extern _X_EXPORT void RemoveBlockAndWakeupHandlers(BlockHandlerProcPtr blockHandler,
|
---|
232 | WakeupHandlerProcPtr wakeupHandler,
|
---|
233 | void *blockData);
|
---|
234 |
|
---|
235 | extern _X_EXPORT void InitBlockAndWakeupHandlers(void);
|
---|
236 |
|
---|
237 | extern _X_EXPORT void ProcessWorkQueue(void);
|
---|
238 |
|
---|
239 | extern _X_EXPORT void ProcessWorkQueueZombies(void);
|
---|
240 |
|
---|
241 | extern _X_EXPORT Bool QueueWorkProc(Bool (*function)(ClientPtr clientUnused,
|
---|
242 | void *closure),
|
---|
243 | ClientPtr client,
|
---|
244 | void *closure);
|
---|
245 |
|
---|
246 | typedef Bool (*ClientSleepProcPtr) (ClientPtr client,
|
---|
247 | void *closure);
|
---|
248 |
|
---|
249 | extern _X_EXPORT Bool ClientSleep(ClientPtr client,
|
---|
250 | ClientSleepProcPtr function,
|
---|
251 | void *closure);
|
---|
252 |
|
---|
253 | #ifndef ___CLIENTSIGNAL_DEFINED___
|
---|
254 | #define ___CLIENTSIGNAL_DEFINED___
|
---|
255 | extern _X_EXPORT Bool ClientSignal(ClientPtr /*client */ );
|
---|
256 | #endif /* ___CLIENTSIGNAL_DEFINED___ */
|
---|
257 |
|
---|
258 | extern _X_EXPORT void ClientWakeup(ClientPtr /*client */ );
|
---|
259 |
|
---|
260 | extern _X_EXPORT Bool ClientIsAsleep(ClientPtr /*client */ );
|
---|
261 |
|
---|
262 | extern _X_EXPORT void SendGraphicsExpose(ClientPtr /*client */ ,
|
---|
263 | RegionPtr /*pRgn */ ,
|
---|
264 | XID /*drawable */ ,
|
---|
265 | int /*major */ ,
|
---|
266 | int /*minor */);
|
---|
267 |
|
---|
268 | /* atom.c */
|
---|
269 |
|
---|
270 | extern _X_EXPORT Atom MakeAtom(const char * /*string */ ,
|
---|
271 | unsigned /*len */ ,
|
---|
272 | Bool /*makeit */ );
|
---|
273 |
|
---|
274 | extern _X_EXPORT Bool ValidAtom(Atom /*atom */ );
|
---|
275 |
|
---|
276 | extern _X_EXPORT const char *NameForAtom(Atom /*atom */ );
|
---|
277 |
|
---|
278 | extern _X_EXPORT void
|
---|
279 | AtomError(void)
|
---|
280 | _X_NORETURN;
|
---|
281 |
|
---|
282 | extern _X_EXPORT void
|
---|
283 | FreeAllAtoms(void);
|
---|
284 |
|
---|
285 | extern _X_EXPORT void
|
---|
286 | InitAtoms(void);
|
---|
287 |
|
---|
288 | /* main.c */
|
---|
289 |
|
---|
290 | extern _X_EXPORT void
|
---|
291 | SetVendorRelease(int release);
|
---|
292 |
|
---|
293 | extern _X_EXPORT void
|
---|
294 | SetVendorString(const char *string);
|
---|
295 |
|
---|
296 | int
|
---|
297 | dix_main(int argc, char *argv[], char *envp[]);
|
---|
298 |
|
---|
299 | /* events.c */
|
---|
300 |
|
---|
301 | extern void
|
---|
302 | SetMaskForEvent(int /* deviceid */ ,
|
---|
303 | Mask /* mask */ ,
|
---|
304 | int /* event */ );
|
---|
305 |
|
---|
306 | extern _X_EXPORT void
|
---|
307 | ConfineToShape(DeviceIntPtr /* pDev */ ,
|
---|
308 | RegionPtr /* shape */ ,
|
---|
309 | int * /* px */ ,
|
---|
310 | int * /* py */ );
|
---|
311 |
|
---|
312 | extern _X_EXPORT Bool
|
---|
313 | IsParent(WindowPtr /* maybeparent */ ,
|
---|
314 | WindowPtr /* child */ );
|
---|
315 |
|
---|
316 | extern _X_EXPORT WindowPtr
|
---|
317 | GetCurrentRootWindow(DeviceIntPtr pDev);
|
---|
318 |
|
---|
319 | extern _X_EXPORT WindowPtr
|
---|
320 | GetSpriteWindow(DeviceIntPtr pDev);
|
---|
321 |
|
---|
322 | extern _X_EXPORT void
|
---|
323 | NoticeTime(const DeviceIntPtr dev,
|
---|
324 | TimeStamp time);
|
---|
325 | extern _X_EXPORT void
|
---|
326 | NoticeEventTime(InternalEvent *ev,
|
---|
327 | DeviceIntPtr dev);
|
---|
328 | extern _X_EXPORT TimeStamp
|
---|
329 | LastEventTime(int deviceid);
|
---|
330 | extern _X_EXPORT Bool
|
---|
331 | LastEventTimeWasReset(int deviceid);
|
---|
332 | extern _X_EXPORT void
|
---|
333 | LastEventTimeToggleResetFlag(int deviceid, Bool state);
|
---|
334 | extern _X_EXPORT void
|
---|
335 | LastEventTimeToggleResetAll(Bool state);
|
---|
336 |
|
---|
337 | extern void
|
---|
338 | EnqueueEvent(InternalEvent * /* ev */ ,
|
---|
339 | DeviceIntPtr /* device */ );
|
---|
340 | extern void
|
---|
341 | PlayReleasedEvents(void);
|
---|
342 |
|
---|
343 | extern void
|
---|
344 | ActivatePointerGrab(DeviceIntPtr /* mouse */ ,
|
---|
345 | GrabPtr /* grab */ ,
|
---|
346 | TimeStamp /* time */ ,
|
---|
347 | Bool /* autoGrab */ );
|
---|
348 |
|
---|
349 | extern void
|
---|
350 | DeactivatePointerGrab(DeviceIntPtr /* mouse */ );
|
---|
351 |
|
---|
352 | extern void
|
---|
353 | ActivateKeyboardGrab(DeviceIntPtr /* keybd */ ,
|
---|
354 | GrabPtr /* grab */ ,
|
---|
355 | TimeStamp /* time */ ,
|
---|
356 | Bool /* passive */ );
|
---|
357 |
|
---|
358 | extern void
|
---|
359 | DeactivateKeyboardGrab(DeviceIntPtr /* keybd */ );
|
---|
360 |
|
---|
361 | extern BOOL
|
---|
362 | ActivateFocusInGrab(DeviceIntPtr /* dev */ ,
|
---|
363 | WindowPtr /* old */ ,
|
---|
364 | WindowPtr /* win */ );
|
---|
365 |
|
---|
366 | extern void
|
---|
367 | AllowSome(ClientPtr /* client */ ,
|
---|
368 | TimeStamp /* time */ ,
|
---|
369 | DeviceIntPtr /* thisDev */ ,
|
---|
370 | int /* newState */ );
|
---|
371 |
|
---|
372 | extern void
|
---|
373 | ReleaseActiveGrabs(ClientPtr client);
|
---|
374 |
|
---|
375 | extern GrabPtr
|
---|
376 | CheckPassiveGrabsOnWindow(WindowPtr /* pWin */ ,
|
---|
377 | DeviceIntPtr /* device */ ,
|
---|
378 | InternalEvent * /* event */ ,
|
---|
379 | BOOL /* checkCore */ ,
|
---|
380 | BOOL /* activate */ );
|
---|
381 |
|
---|
382 | extern _X_EXPORT int
|
---|
383 | DeliverEventsToWindow(DeviceIntPtr /* pWin */ ,
|
---|
384 | WindowPtr /* pWin */ ,
|
---|
385 | xEventPtr /* pEvents */ ,
|
---|
386 | int /* count */ ,
|
---|
387 | Mask /* filter */ ,
|
---|
388 | GrabPtr /* grab */ );
|
---|
389 |
|
---|
390 | extern _X_EXPORT void
|
---|
391 | DeliverRawEvent(RawDeviceEvent * /* ev */ ,
|
---|
392 | DeviceIntPtr /* dev */
|
---|
393 | );
|
---|
394 |
|
---|
395 | extern int
|
---|
396 | DeliverDeviceEvents(WindowPtr /* pWin */ ,
|
---|
397 | InternalEvent * /* event */ ,
|
---|
398 | GrabPtr /* grab */ ,
|
---|
399 | WindowPtr /* stopAt */ ,
|
---|
400 | DeviceIntPtr /* dev */ );
|
---|
401 |
|
---|
402 | extern int
|
---|
403 | DeliverOneGrabbedEvent(InternalEvent * /* event */ ,
|
---|
404 | DeviceIntPtr /* dev */ ,
|
---|
405 | enum InputLevel /* level */ );
|
---|
406 |
|
---|
407 | extern void
|
---|
408 | DeliverTouchEvents(DeviceIntPtr /* dev */ ,
|
---|
409 | TouchPointInfoPtr /* ti */ ,
|
---|
410 | InternalEvent * /* ev */ ,
|
---|
411 | XID /* resource */ );
|
---|
412 |
|
---|
413 | extern void
|
---|
414 | InitializeSprite(DeviceIntPtr /* pDev */ ,
|
---|
415 | WindowPtr /* pWin */ );
|
---|
416 | extern void
|
---|
417 | FreeSprite(DeviceIntPtr pDev);
|
---|
418 |
|
---|
419 | extern void
|
---|
420 | UpdateSpriteForScreen(DeviceIntPtr /* pDev */ ,
|
---|
421 | ScreenPtr /* pScreen */ );
|
---|
422 |
|
---|
423 | extern _X_EXPORT void
|
---|
424 | WindowHasNewCursor(WindowPtr /* pWin */ );
|
---|
425 |
|
---|
426 | extern Bool
|
---|
427 | CheckDeviceGrabs(DeviceIntPtr /* device */ ,
|
---|
428 | DeviceEvent * /* event */ ,
|
---|
429 | WindowPtr /* ancestor */ );
|
---|
430 |
|
---|
431 | extern void
|
---|
432 | DeliverFocusedEvent(DeviceIntPtr /* keybd */ ,
|
---|
433 | InternalEvent * /* event */ ,
|
---|
434 | WindowPtr /* window */ );
|
---|
435 |
|
---|
436 | extern int
|
---|
437 | DeliverGrabbedEvent(InternalEvent * /* event */ ,
|
---|
438 | DeviceIntPtr /* thisDev */ ,
|
---|
439 | Bool /* deactivateGrab */ );
|
---|
440 |
|
---|
441 | extern void
|
---|
442 | FixKeyState(DeviceEvent * /* event */ ,
|
---|
443 | DeviceIntPtr /* keybd */ );
|
---|
444 |
|
---|
445 | extern void
|
---|
446 | RecalculateDeliverableEvents(WindowPtr /* pWin */ );
|
---|
447 |
|
---|
448 | extern _X_EXPORT int
|
---|
449 | OtherClientGone(void *value,
|
---|
450 | XID id);
|
---|
451 |
|
---|
452 | extern void
|
---|
453 | DoFocusEvents(DeviceIntPtr /* dev */ ,
|
---|
454 | WindowPtr /* fromWin */ ,
|
---|
455 | WindowPtr /* toWin */ ,
|
---|
456 | int /* mode */ );
|
---|
457 |
|
---|
458 | extern int
|
---|
459 | SetInputFocus(ClientPtr /* client */ ,
|
---|
460 | DeviceIntPtr /* dev */ ,
|
---|
461 | Window /* focusID */ ,
|
---|
462 | CARD8 /* revertTo */ ,
|
---|
463 | Time /* ctime */ ,
|
---|
464 | Bool /* followOK */ );
|
---|
465 |
|
---|
466 | extern int
|
---|
467 | GrabDevice(ClientPtr /* client */ ,
|
---|
468 | DeviceIntPtr /* dev */ ,
|
---|
469 | unsigned /* this_mode */ ,
|
---|
470 | unsigned /* other_mode */ ,
|
---|
471 | Window /* grabWindow */ ,
|
---|
472 | unsigned /* ownerEvents */ ,
|
---|
473 | Time /* ctime */ ,
|
---|
474 | GrabMask * /* mask */ ,
|
---|
475 | int /* grabtype */ ,
|
---|
476 | Cursor /* curs */ ,
|
---|
477 | Window /* confineToWin */ ,
|
---|
478 | CARD8 * /* status */ );
|
---|
479 |
|
---|
480 | extern void
|
---|
481 | InitEvents(void);
|
---|
482 |
|
---|
483 | extern void
|
---|
484 | CloseDownEvents(void);
|
---|
485 |
|
---|
486 | extern void
|
---|
487 | DeleteWindowFromAnyEvents(WindowPtr /* pWin */ ,
|
---|
488 | Bool /* freeResources */ );
|
---|
489 |
|
---|
490 | extern Mask
|
---|
491 | EventMaskForClient(WindowPtr /* pWin */ ,
|
---|
492 | ClientPtr /* client */ );
|
---|
493 |
|
---|
494 | extern _X_EXPORT int
|
---|
495 | DeliverEvents(WindowPtr /*pWin */ ,
|
---|
496 | xEventPtr /*xE */ ,
|
---|
497 | int /*count */ ,
|
---|
498 | WindowPtr /*otherParent */ );
|
---|
499 |
|
---|
500 | extern Bool
|
---|
501 | CheckMotion(DeviceEvent * /* ev */ ,
|
---|
502 | DeviceIntPtr /* pDev */ );
|
---|
503 |
|
---|
504 | extern _X_EXPORT void
|
---|
505 | WriteEventsToClient(ClientPtr /*pClient */ ,
|
---|
506 | int /*count */ ,
|
---|
507 | xEventPtr /*events */ );
|
---|
508 |
|
---|
509 | extern _X_EXPORT int
|
---|
510 | TryClientEvents(ClientPtr /*client */ ,
|
---|
511 | DeviceIntPtr /* device */ ,
|
---|
512 | xEventPtr /*pEvents */ ,
|
---|
513 | int /*count */ ,
|
---|
514 | Mask /*mask */ ,
|
---|
515 | Mask /*filter */ ,
|
---|
516 | GrabPtr /*grab */ );
|
---|
517 |
|
---|
518 | extern _X_EXPORT void
|
---|
519 | WindowsRestructured(void);
|
---|
520 |
|
---|
521 | extern int
|
---|
522 | SetClientPointer(ClientPtr /* client */ ,
|
---|
523 | DeviceIntPtr /* device */ );
|
---|
524 |
|
---|
525 | extern _X_EXPORT DeviceIntPtr
|
---|
526 | PickPointer(ClientPtr /* client */ );
|
---|
527 |
|
---|
528 | extern _X_EXPORT DeviceIntPtr
|
---|
529 | PickKeyboard(ClientPtr /* client */ );
|
---|
530 |
|
---|
531 | extern Bool
|
---|
532 | IsInterferingGrab(ClientPtr /* client */ ,
|
---|
533 | DeviceIntPtr /* dev */ ,
|
---|
534 | xEvent * /* events */ );
|
---|
535 |
|
---|
536 | #ifdef PANORAMIX
|
---|
537 | extern _X_EXPORT void
|
---|
538 | ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
|
---|
539 | #endif
|
---|
540 |
|
---|
541 | #ifdef RANDR
|
---|
542 | extern _X_EXPORT void
|
---|
543 | ScreenRestructured(ScreenPtr pScreen);
|
---|
544 | #endif
|
---|
545 |
|
---|
546 | #ifndef HAVE_FFS
|
---|
547 | extern _X_EXPORT int
|
---|
548 | ffs(int i);
|
---|
549 | #endif
|
---|
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
|
---|
559 | } ServerGrabState;
|
---|
560 |
|
---|
561 | typedef struct {
|
---|
562 | ClientPtr client;
|
---|
563 | ServerGrabState grabstate;
|
---|
564 | } ServerGrabInfoRec;
|
---|
565 |
|
---|
566 | /*
|
---|
567 | * EventCallback stuff
|
---|
568 | */
|
---|
569 |
|
---|
570 | extern _X_EXPORT CallbackListPtr EventCallback;
|
---|
571 |
|
---|
572 | typedef struct {
|
---|
573 | ClientPtr client;
|
---|
574 | xEventPtr events;
|
---|
575 | int count;
|
---|
576 | } EventInfoRec;
|
---|
577 |
|
---|
578 | /*
|
---|
579 | * DeviceEventCallback stuff
|
---|
580 | */
|
---|
581 |
|
---|
582 | extern _X_EXPORT CallbackListPtr DeviceEventCallback;
|
---|
583 |
|
---|
584 | typedef struct {
|
---|
585 | InternalEvent *event;
|
---|
586 | DeviceIntPtr device;
|
---|
587 | } DeviceEventInfoRec;
|
---|
588 |
|
---|
589 | extern int
|
---|
590 | XItoCoreType(int xi_type);
|
---|
591 | extern Bool
|
---|
592 | DevHasCursor(DeviceIntPtr pDev);
|
---|
593 | extern _X_EXPORT Bool
|
---|
594 | IsPointerDevice(DeviceIntPtr dev);
|
---|
595 | extern _X_EXPORT Bool
|
---|
596 | IsKeyboardDevice(DeviceIntPtr dev);
|
---|
597 | extern Bool
|
---|
598 | IsPointerEvent(InternalEvent *event);
|
---|
599 | extern Bool
|
---|
600 | IsTouchEvent(InternalEvent *event);
|
---|
601 | extern _X_EXPORT Bool
|
---|
602 | IsMaster(DeviceIntPtr dev);
|
---|
603 | extern _X_EXPORT Bool
|
---|
604 | IsFloating(DeviceIntPtr dev);
|
---|
605 |
|
---|
606 | extern _X_HIDDEN void
|
---|
607 | CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master);
|
---|
608 | extern _X_HIDDEN int
|
---|
609 | CorePointerProc(DeviceIntPtr dev, int what);
|
---|
610 | extern _X_HIDDEN int
|
---|
611 | CoreKeyboardProc(DeviceIntPtr dev, int what);
|
---|
612 |
|
---|
613 | extern _X_EXPORT void *lastGLContext;
|
---|
614 |
|
---|
615 | #endif /* DIX_H */
|
---|