Add patch that contain Mali fixes.
[deb_xorg-server.git] / include / xkbsrv.h
CommitLineData
a09e091a
JB
1/************************************************************
2Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
3
4Permission to use, copy, modify, and distribute this
5software and its documentation for any purpose and without
6fee is hereby granted, provided that the above copyright
7notice appear in all copies and that both that copyright
8notice and this permission notice appear in supporting
9documentation, and that the name of Silicon Graphics not be
10used in advertising or publicity pertaining to distribution
11of the software without specific prior written permission.
12Silicon Graphics makes no representation about the suitability
13of this software for any purpose. It is provided "as is"
14without any express or implied warranty.
15
16SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
17SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
19GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
20DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
21DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
22OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
23THE USE OR PERFORMANCE OF THIS SOFTWARE.
24
25********************************************************/
26
27#ifndef _XKBSRV_H_
28#define _XKBSRV_H_
29
30#define XkbAllocClientMap SrvXkbAllocClientMap
31#define XkbAllocServerMap SrvXkbAllocServerMap
32#define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey
33#define XkbCopyKeyTypes SrvXkbCopyKeyTypes
34#define XkbFreeClientMap SrvXkbFreeClientMap
35#define XkbFreeServerMap SrvXkbFreeServerMap
36#define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols
37#define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey
38#define XkbResizeKeyActions SrvXkbResizeKeyActions
39#define XkbResizeKeySyms SrvXkbResizeKeySyms
40#define XkbResizeKeyType SrvXkbResizeKeyType
41#define XkbAllocCompatMap SrvXkbAllocCompatMap
42#define XkbAllocControls SrvXkbAllocControls
43#define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps
44#define XkbAllocKeyboard SrvXkbAllocKeyboard
45#define XkbAllocNames SrvXkbAllocNames
46#define XkbFreeCompatMap SrvXkbFreeCompatMap
47#define XkbFreeKeyboard SrvXkbFreeKeyboard
48#define XkbFreeNames SrvXkbFreeNames
49#define XkbLatchModifiers SrvXkbLatchModifiers
50#define XkbLatchGroup SrvXkbLatchGroup
51#define XkbVirtualModsToReal SrvXkbVirtualModsToReal
52#define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange
53#define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges
54
55#include <X11/extensions/XKBproto.h>
56#include "xkbstr.h"
57#include "xkbrules.h"
58#include "inputstr.h"
59#include "events.h"
60
61typedef struct _XkbInterest {
62 DeviceIntPtr dev;
63 ClientPtr client;
64 XID resource;
65 struct _XkbInterest *next;
66 CARD16 extDevNotifyMask;
67 CARD16 stateNotifyMask;
68 CARD16 namesNotifyMask;
69 CARD32 ctrlsNotifyMask;
70 CARD8 compatNotifyMask;
71 BOOL bellNotifyMask;
72 BOOL actionMessageMask;
73 CARD16 accessXNotifyMask;
74 CARD32 iStateNotifyMask;
75 CARD32 iMapNotifyMask;
76 CARD16 altSymsNotifyMask;
77 CARD32 autoCtrls;
78 CARD32 autoCtrlValues;
79} XkbInterestRec, *XkbInterestPtr;
80
81typedef struct _XkbRadioGroup {
82 CARD8 flags;
83 CARD8 nMembers;
84 CARD8 dfltDown;
85 CARD8 currentDown;
86 CARD8 members[XkbRGMaxMembers];
87} XkbRadioGroupRec, *XkbRadioGroupPtr;
88
89typedef struct _XkbEventCause {
90 CARD8 kc;
91 CARD8 event;
92 CARD8 mjr;
93 CARD8 mnr;
94 ClientPtr client;
95} XkbEventCauseRec, *XkbEventCausePtr;
96
97#define XkbSetCauseKey(c,k,e) { (c)->kc= (k),(c)->event= (e),\
98 (c)->mjr= (c)->mnr= 0; \
99 (c)->client= NULL; }
100#define XkbSetCauseReq(c,j,n,cl) { (c)->kc= (c)->event= 0,\
101 (c)->mjr= (j),(c)->mnr= (n);\
102 (c)->client= (cl); }
103#define XkbSetCauseCoreReq(c,e,cl) XkbSetCauseReq(c,e,0,cl)
104#define XkbSetCauseXkbReq(c,e,cl) XkbSetCauseReq(c,XkbReqCode,e,cl)
105#define XkbSetCauseUnknown(c) XkbSetCauseKey(c,0,0)
106
107#define _OFF_TIMER 0
108#define _KRG_WARN_TIMER 1
109#define _KRG_TIMER 2
110#define _SK_TIMEOUT_TIMER 3
111#define _ALL_TIMEOUT_TIMER 4
112
113#define _BEEP_NONE 0
114#define _BEEP_FEATURE_ON 1
115#define _BEEP_FEATURE_OFF 2
116#define _BEEP_FEATURE_CHANGE 3
117#define _BEEP_SLOW_WARN 4
118#define _BEEP_SLOW_PRESS 5
119#define _BEEP_SLOW_ACCEPT 6
120#define _BEEP_SLOW_REJECT 7
121#define _BEEP_SLOW_RELEASE 8
122#define _BEEP_STICKY_LATCH 9
123#define _BEEP_STICKY_LOCK 10
124#define _BEEP_STICKY_UNLOCK 11
125#define _BEEP_LED_ON 12
126#define _BEEP_LED_OFF 13
127#define _BEEP_LED_CHANGE 14
128#define _BEEP_BOUNCE_REJECT 15
129
130typedef struct _XkbFilter {
131 CARD16 keycode;
132 CARD8 what;
133 CARD8 active;
134 CARD8 filterOthers;
135 CARD32 priv;
136 XkbAction upAction;
137 int (*filter) (struct _XkbSrvInfo * /* xkbi */ ,
138 struct _XkbFilter * /* filter */ ,
139 unsigned /* keycode */ ,
140 XkbAction * /* action */
141 );
142 struct _XkbFilter *next;
143} XkbFilterRec, *XkbFilterPtr;
144
145typedef struct _XkbSrvInfo {
146 XkbStateRec prev_state;
147 XkbStateRec state;
148 XkbDescPtr desc;
149
150 DeviceIntPtr device;
151 KbdCtrlProcPtr kbdProc;
152
153 XkbRadioGroupPtr radioGroups;
154 CARD8 nRadioGroups;
155 CARD8 clearMods;
156 CARD8 setMods;
157 INT16 groupChange;
158
159 CARD16 dfltPtrDelta;
160
161 double mouseKeysCurve;
162 double mouseKeysCurveFactor;
163 INT16 mouseKeysDX;
164 INT16 mouseKeysDY;
165 CARD8 mouseKeysFlags;
166 Bool mouseKeysAccel;
167 CARD8 mouseKeysCounter;
168
169 CARD8 lockedPtrButtons;
170 CARD8 shiftKeyCount;
171 KeyCode mouseKey;
172 KeyCode inactiveKey;
173 KeyCode slowKey;
174 KeyCode slowKeyEnableKey;
175 KeyCode repeatKey;
176 CARD8 krgTimerActive;
177 CARD8 beepType;
178 CARD8 beepCount;
179
180 CARD32 flags;
181 CARD32 lastPtrEventTime;
182 CARD32 lastShiftEventTime;
183 OsTimerPtr beepTimer;
184 OsTimerPtr mouseKeyTimer;
185 OsTimerPtr slowKeysTimer;
186 OsTimerPtr bounceKeysTimer;
187 OsTimerPtr repeatKeyTimer;
188 OsTimerPtr krgTimer;
189
190 int szFilters;
191 XkbFilterPtr filters;
192} XkbSrvInfoRec, *XkbSrvInfoPtr;
193
194#define XkbSLI_IsDefault (1L<<0)
195#define XkbSLI_HasOwnState (1L<<1)
196
197typedef struct _XkbSrvLedInfo {
198 CARD16 flags;
199 CARD16 class;
200 CARD16 id;
201 union {
202 KbdFeedbackPtr kf;
203 LedFeedbackPtr lf;
204 } fb;
205
206 CARD32 physIndicators;
207 CARD32 autoState;
208 CARD32 explicitState;
209 CARD32 effectiveState;
210
211 CARD32 mapsPresent;
212 CARD32 namesPresent;
213 XkbIndicatorMapPtr maps;
214 Atom *names;
215
216 CARD32 usesBase;
217 CARD32 usesLatched;
218 CARD32 usesLocked;
219 CARD32 usesEffective;
220 CARD32 usesCompat;
221 CARD32 usesControls;
222
223 CARD32 usedComponents;
224} XkbSrvLedInfoRec, *XkbSrvLedInfoPtr;
225
226/*
227 * Settings for xkbClientFlags field (used by DIX)
228 * These flags _must_ not overlap with XkbPCF_*
229 */
230#define _XkbClientInitialized (1<<15)
231
232#define _XkbWantsDetectableAutoRepeat(c)\
233 ((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask)
234
235/*
236 * Settings for flags field
237 */
238#define _XkbStateNotifyInProgress (1<<0)
239
240typedef struct {
241 ProcessInputProc processInputProc;
242 /* If processInputProc is set to something different than realInputProc,
243 * UNWRAP and COND_WRAP will not touch processInputProc and update only
244 * realInputProc. This ensures that
245 * processInputProc == (frozen ? EnqueueEvent : realInputProc)
246 *
247 * WRAP_PROCESS_INPUT_PROC should only be called during initialization,
248 * since it may destroy this invariant.
249 */
250 ProcessInputProc realInputProc;
251 DeviceUnwrapProc unwrapProc;
252} xkbDeviceInfoRec, *xkbDeviceInfoPtr;
253
254#define WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
255 device->public.processInputProc = proc; \
256 oldprocs->processInputProc = \
257 oldprocs->realInputProc = device->public.realInputProc; \
258 device->public.realInputProc = proc; \
259 oldprocs->unwrapProc = device->unwrapProc; \
260 device->unwrapProc = unwrapproc;
261
262#define COND_WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
263 if (device->public.processInputProc == device->public.realInputProc)\
264 device->public.processInputProc = proc; \
265 oldprocs->processInputProc = \
266 oldprocs->realInputProc = device->public.realInputProc; \
267 device->public.realInputProc = proc; \
268 oldprocs->unwrapProc = device->unwrapProc; \
269 device->unwrapProc = unwrapproc;
270
271#define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs, backupproc) \
272 backupproc = device->public.realInputProc; \
273 if (device->public.processInputProc == device->public.realInputProc)\
274 device->public.processInputProc = oldprocs->realInputProc; \
275 device->public.realInputProc = oldprocs->realInputProc; \
276 device->unwrapProc = oldprocs->unwrapProc;
277
278extern _X_EXPORT DevPrivateKeyRec xkbDevicePrivateKeyRec;
279
280#define xkbDevicePrivateKey (&xkbDevicePrivateKeyRec)
281
282#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr)dixLookupPrivate(&(dev)->devPrivates, xkbDevicePrivateKey))
283
284extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
285
286/***====================================================================***/
287
288/***====================================================================***/
289
290#define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask)
291#define XkbAllFilteredEventsMask \
292 (XkbAccessXKeysMask|XkbRepeatKeysMask|XkbMouseKeysAccelMask|XkbAX_KRGMask)
293
294/***====================================================================***/
295
296extern _X_EXPORT int XkbReqCode;
297extern _X_EXPORT int XkbEventBase;
298extern _X_EXPORT int XkbKeyboardErrorCode;
299extern _X_EXPORT const char *XkbBaseDirectory;
300extern _X_EXPORT const char *XkbBinDirectory;
301
302extern _X_EXPORT CARD32 xkbDebugFlags;
303
304#define _XkbLibError(c,l,d) /* Epoch fail */
305
306/* "a" is a "unique" numeric identifier that just defines which error
307 * code statement it is. _XkbErrCode2(4, foo) means "this is the 4th error
308 * statement in this function". lovely.
309 */
310#define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
311#define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
312#define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
313
314#define Status int
315
316extern _X_EXPORT void XkbUseMsg(void
317 );
318
319extern _X_EXPORT int XkbProcessArguments(int /* argc */ ,
320 char ** /* argv */ ,
321 int /* i */
322 );
323
324extern _X_EXPORT Bool XkbInitPrivates(void);
325
326extern _X_EXPORT void XkbSetExtension(DeviceIntPtr device,
327 ProcessInputProc proc);
328
329extern _X_EXPORT void XkbFreeCompatMap(XkbDescPtr /* xkb */ ,
330 unsigned int /* which */ ,
331 Bool /* freeMap */
332 );
333
334extern _X_EXPORT void XkbFreeNames(XkbDescPtr /* xkb */ ,
335 unsigned int /* which */ ,
336 Bool /* freeMap */
337 );
338
339extern _X_EXPORT int _XkbLookupAnyDevice(DeviceIntPtr *pDev,
340 int id,
341 ClientPtr client,
342 Mask access_mode, int *xkb_err);
343
344extern _X_EXPORT int _XkbLookupKeyboard(DeviceIntPtr *pDev,
345 int id,
346 ClientPtr client,
347 Mask access_mode, int *xkb_err);
348
349extern _X_EXPORT int _XkbLookupBellDevice(DeviceIntPtr *pDev,
350 int id,
351 ClientPtr client,
352 Mask access_mode, int *xkb_err);
353
354extern _X_EXPORT int _XkbLookupLedDevice(DeviceIntPtr *pDev,
355 int id,
356 ClientPtr client,
357 Mask access_mode, int *xkb_err);
358
359extern _X_EXPORT int _XkbLookupButtonDevice(DeviceIntPtr *pDev,
360 int id,
361 ClientPtr client,
362 Mask access_mode, int *xkb_err);
363
364extern _X_EXPORT XkbDescPtr XkbAllocKeyboard(void
365 );
366
367extern _X_EXPORT Status XkbAllocClientMap(XkbDescPtr /* xkb */ ,
368 unsigned int /* which */ ,
369 unsigned int /* nTypes */
370 );
371
372extern _X_EXPORT Status XkbAllocServerMap(XkbDescPtr /* xkb */ ,
373 unsigned int /* which */ ,
374 unsigned int /* nNewActions */
375 );
376
377extern _X_EXPORT void XkbFreeClientMap(XkbDescPtr /* xkb */ ,
378 unsigned int /* what */ ,
379 Bool /* freeMap */
380 );
381
382extern _X_EXPORT void XkbFreeServerMap(XkbDescPtr /* xkb */ ,
383 unsigned int /* what */ ,
384 Bool /* freeMap */
385 );
386
387extern _X_EXPORT Status XkbAllocIndicatorMaps(XkbDescPtr /* xkb */
388 );
389
390extern _X_EXPORT Status XkbAllocCompatMap(XkbDescPtr /* xkb */ ,
391 unsigned int /* which */ ,
392 unsigned int /* nInterpret */
393 );
394
395extern _X_EXPORT Status XkbAllocNames(XkbDescPtr /* xkb */ ,
396 unsigned int /* which */ ,
397 int /* nTotalRG */ ,
398 int /* nTotalAliases */
399 );
400
401extern _X_EXPORT Status XkbAllocControls(XkbDescPtr /* xkb */ ,
402 unsigned int /* which */
403 );
404
405extern _X_EXPORT Status XkbCopyKeyTypes(XkbKeyTypePtr /* from */ ,
406 XkbKeyTypePtr /* into */ ,
407 int /* num_types */
408 );
409
410extern _X_EXPORT Status XkbResizeKeyType(XkbDescPtr /* xkb */ ,
411 int /* type_ndx */ ,
412 int /* map_count */ ,
413 Bool /* want_preserve */ ,
414 int /* new_num_lvls */
415 );
416
417extern _X_EXPORT void XkbFreeKeyboard(XkbDescPtr /* xkb */ ,
418 unsigned int /* which */ ,
419 Bool /* freeDesc */
420 );
421
422extern _X_EXPORT void XkbFreeComponentNames(XkbComponentNamesPtr /* names */ ,
423 Bool /* freeNames */
424 );
425
426extern _X_EXPORT void XkbSetActionKeyMods(XkbDescPtr /* xkb */ ,
427 XkbAction * /* act */ ,
428 unsigned int /* mods */
429 );
430
431extern _X_EXPORT unsigned int XkbMaskForVMask(XkbDescPtr /* xkb */ ,
432 unsigned int /* vmask */
433 );
434
435extern _X_EXPORT Bool XkbVirtualModsToReal(XkbDescPtr /* xkb */ ,
436 unsigned int /* virtua_mask */ ,
437 unsigned int * /* mask_rtrn */
438 );
439
440extern _X_EXPORT unsigned int XkbAdjustGroup(int /* group */ ,
441 XkbControlsPtr /* ctrls */
442 );
443
444extern _X_EXPORT KeySym *XkbResizeKeySyms(XkbDescPtr /* xkb */ ,
445 int /* key */ ,
446 int /* needed */
447 );
448
449extern _X_EXPORT XkbAction *XkbResizeKeyActions(XkbDescPtr /* xkb */ ,
450 int /* key */ ,
451 int /* needed */
452 );
453
454extern _X_EXPORT void XkbUpdateKeyTypesFromCore(DeviceIntPtr /* pXDev */ ,
455 KeySymsPtr /* syms */ ,
456 KeyCode /* first */ ,
457 CARD8 /* num */ ,
458 XkbChangesPtr /* pChanges */
459 );
460
461extern _X_EXPORT void XkbUpdateDescActions(XkbDescPtr /* xkb */ ,
462 KeyCode /* first */ ,
463 CARD8 /* num */ ,
464 XkbChangesPtr /* changes */
465 );
466
467extern _X_EXPORT void XkbUpdateActions(DeviceIntPtr /* pXDev */ ,
468 KeyCode /* first */ ,
469 CARD8 /* num */ ,
470 XkbChangesPtr /* pChanges */ ,
471 unsigned int * /* needChecksRtrn */ ,
472 XkbEventCausePtr /* cause */
473 );
474
475extern _X_EXPORT KeySymsPtr XkbGetCoreMap(DeviceIntPtr /* keybd */
476 );
477
478extern _X_EXPORT void XkbApplyMappingChange(DeviceIntPtr /* pXDev */ ,
479 KeySymsPtr /* map */ ,
480 KeyCode /* firstKey */ ,
481 CARD8 /* num */ ,
482 CARD8 * /* modmap */ ,
483 ClientPtr /* client */
484 );
485
486extern _X_EXPORT void XkbSetIndicators(DeviceIntPtr /* pXDev */ ,
487 CARD32 /* affect */ ,
488 CARD32 /* values */ ,
489 XkbEventCausePtr /* cause */
490 );
491
492extern _X_EXPORT void XkbUpdateIndicators(DeviceIntPtr /* keybd */ ,
493 CARD32 /* changed */ ,
494 Bool /* check_edevs */ ,
495 XkbChangesPtr /* pChanges */ ,
496 XkbEventCausePtr /* cause */
497 );
498
499extern _X_EXPORT XkbSrvLedInfoPtr XkbAllocSrvLedInfo(DeviceIntPtr /* dev */ ,
500 KbdFeedbackPtr /* kf */ ,
501 LedFeedbackPtr /* lf */ ,
502 unsigned int /* needed_parts */
503 );
504
505extern _X_EXPORT XkbSrvLedInfoPtr XkbCopySrvLedInfo(DeviceIntPtr /* dev */ ,
506 XkbSrvLedInfoPtr /* src */ ,
507 KbdFeedbackPtr /* kf */ ,
508 LedFeedbackPtr /* lf */
509 );
510
511extern _X_EXPORT XkbSrvLedInfoPtr XkbFindSrvLedInfo(DeviceIntPtr /* dev */ ,
512 unsigned int /* class */ ,
513 unsigned int /* id */ ,
514 unsigned int /* needed_parts */
515 );
516
517extern _X_EXPORT void XkbApplyLedNameChanges(DeviceIntPtr /* dev */ ,
518 XkbSrvLedInfoPtr /* sli */ ,
519 unsigned int /* changed_names */ ,
520 xkbExtensionDeviceNotify * /* ed */
521 ,
522 XkbChangesPtr /* changes */ ,
523 XkbEventCausePtr /* cause */
524 );
525
526extern _X_EXPORT void XkbApplyLedMapChanges(DeviceIntPtr /* dev */ ,
527 XkbSrvLedInfoPtr /* sli */ ,
528 unsigned int /* changed_maps */ ,
529 xkbExtensionDeviceNotify * /* ed */
530 ,
531 XkbChangesPtr /* changes */ ,
532 XkbEventCausePtr /* cause */
533 );
534
535extern _X_EXPORT void XkbApplyLedStateChanges(DeviceIntPtr /* dev */ ,
536 XkbSrvLedInfoPtr /* sli */ ,
537 unsigned int /* changed_leds */ ,
538 xkbExtensionDeviceNotify *
539 /* ed */ ,
540 XkbChangesPtr /* changes */ ,
541 XkbEventCausePtr /* cause */
542 );
543
544extern _X_EXPORT void XkbFlushLedEvents(DeviceIntPtr /* dev */ ,
545 DeviceIntPtr /* kbd */ ,
546 XkbSrvLedInfoPtr /* sli */ ,
547 xkbExtensionDeviceNotify * /* ed */ ,
548 XkbChangesPtr /* changes */ ,
549 XkbEventCausePtr /* cause */
550 );
551
552extern _X_EXPORT unsigned int XkbIndicatorsToUpdate(DeviceIntPtr /* dev */ ,
553 unsigned long
554 /* state_changes */ ,
555 Bool /* enabled_ctrl_changes */
556 );
557
558extern _X_EXPORT void XkbComputeDerivedState(XkbSrvInfoPtr /* xkbi */
559 );
560
561extern _X_EXPORT void XkbCheckSecondaryEffects(XkbSrvInfoPtr /* xkbi */ ,
562 unsigned int /* which */ ,
563 XkbChangesPtr /* changes */ ,
564 XkbEventCausePtr /* cause */
565 );
566
567extern _X_EXPORT void XkbCheckIndicatorMaps(DeviceIntPtr /* dev */ ,
568 XkbSrvLedInfoPtr /* sli */ ,
569 unsigned int /* which */
570 );
571
572extern _X_EXPORT unsigned int XkbStateChangedFlags(XkbStatePtr /* old */ ,
573 XkbStatePtr /* new */
574 );
575
576extern _X_EXPORT void XkbSendStateNotify(DeviceIntPtr /* kbd */ ,
577 xkbStateNotify * /* pSN */
578 );
579
580extern _X_EXPORT void XkbSendMapNotify(DeviceIntPtr /* kbd */ ,
581 xkbMapNotify * /* ev */
582 );
583
584extern _X_EXPORT int XkbComputeControlsNotify(DeviceIntPtr /* kbd */ ,
585 XkbControlsPtr /* old */ ,
586 XkbControlsPtr /* new */ ,
587 xkbControlsNotify * /* pCN */ ,
588 Bool /* forceCtrlProc */
589 );
590
591extern _X_EXPORT void XkbSendControlsNotify(DeviceIntPtr /* kbd */ ,
592 xkbControlsNotify * /* ev */
593 );
594
595extern _X_EXPORT void XkbSendCompatMapNotify(DeviceIntPtr /* kbd */ ,
596 xkbCompatMapNotify * /* ev */
597 );
598
599extern _X_EXPORT void XkbHandleBell(BOOL /* force */ ,
600 BOOL /* eventOnly */ ,
601 DeviceIntPtr /* kbd */ ,
602 CARD8 /* percent */ ,
603 pointer /* ctrl */ ,
604 CARD8 /* class */ ,
605 Atom /* name */ ,
606 WindowPtr /* pWin */ ,
607 ClientPtr /* pClient */
608 );
609
610extern _X_EXPORT void XkbSendAccessXNotify(DeviceIntPtr /* kbd */ ,
611 xkbAccessXNotify * /* pEv */
612 );
613
614extern _X_EXPORT void XkbSendNamesNotify(DeviceIntPtr /* kbd */ ,
615 xkbNamesNotify * /* ev */
616 );
617
618extern _X_EXPORT void XkbSendActionMessage(DeviceIntPtr /* kbd */ ,
619 xkbActionMessage * /* ev */
620 );
621
622extern _X_EXPORT void XkbSendExtensionDeviceNotify(DeviceIntPtr /* kbd */ ,
623 ClientPtr /* client */ ,
624 xkbExtensionDeviceNotify * /* ev */
625 );
626
627extern _X_EXPORT void XkbSendNotification(DeviceIntPtr /* kbd */ ,
628 XkbChangesPtr /* pChanges */ ,
629 XkbEventCausePtr /* cause */
630 );
631
632extern _X_EXPORT void XkbProcessKeyboardEvent(DeviceEvent * /* event */ ,
633 DeviceIntPtr /* keybd */
634 );
635
636extern _X_EXPORT void XkbHandleActions(DeviceIntPtr /* dev */ ,
637 DeviceIntPtr /* kbd */ ,
638 DeviceEvent * /* event */
639 );
640
641extern _X_EXPORT Bool XkbEnableDisableControls(XkbSrvInfoPtr /* xkbi */ ,
642 unsigned long /* change */ ,
643 unsigned long /* newValues */ ,
644 XkbChangesPtr /* changes */ ,
645 XkbEventCausePtr /* cause */
646 );
647
648extern _X_EXPORT void AccessXInit(DeviceIntPtr /* dev */
649 );
650
651extern _X_EXPORT Bool AccessXFilterPressEvent(DeviceEvent * /* event */ ,
652 DeviceIntPtr /* keybd */
653 );
654
655extern _X_EXPORT Bool AccessXFilterReleaseEvent(DeviceEvent * /* event */ ,
656 DeviceIntPtr /* keybd */
657 );
658
659extern _X_EXPORT void AccessXCancelRepeatKey(XkbSrvInfoPtr /* xkbi */ ,
660 KeyCode /* key */
661 );
662
663extern _X_EXPORT void AccessXComputeCurveFactor(XkbSrvInfoPtr /* xkbi */ ,
664 XkbControlsPtr /* ctrls */
665 );
666
667extern _X_EXPORT XkbInterestPtr XkbFindClientResource(DevicePtr /* inDev */ ,
668 ClientPtr /* client */
669 );
670
671extern _X_EXPORT XkbInterestPtr XkbAddClientResource(DevicePtr /* inDev */ ,
672 ClientPtr /* client */ ,
673 XID /* id */
674 );
675
676extern _X_EXPORT int XkbRemoveResourceClient(DevicePtr /* inDev */ ,
677 XID /* id */
678 );
679
680extern _X_EXPORT int XkbDDXAccessXBeep(DeviceIntPtr /* dev */ ,
681 unsigned int /* what */ ,
682 unsigned int /* which */
683 );
684
685extern _X_EXPORT int XkbDDXUsesSoftRepeat(DeviceIntPtr /* dev */
686 );
687
688extern _X_EXPORT void XkbDDXKeybdCtrlProc(DeviceIntPtr /* dev */ ,
689 KeybdCtrl * /* ctrl */
690 );
691
692extern _X_EXPORT void XkbDDXChangeControls(DeviceIntPtr /* dev */ ,
693 XkbControlsPtr /* old */ ,
694 XkbControlsPtr /* new */
695 );
696
697extern _X_EXPORT void XkbDDXUpdateDeviceIndicators(DeviceIntPtr /* dev */ ,
698 XkbSrvLedInfoPtr /* sli */ ,
699 CARD32 /* newState */
700 );
701
702extern _X_EXPORT int XkbDDXTerminateServer(DeviceIntPtr /* dev */ ,
703 KeyCode /* key */ ,
704 XkbAction * /* act */
705 );
706
707extern _X_EXPORT int XkbDDXSwitchScreen(DeviceIntPtr /* dev */ ,
708 KeyCode /* key */ ,
709 XkbAction * /* act */
710 );
711
712extern _X_EXPORT int XkbDDXPrivate(DeviceIntPtr /* dev */ ,
713 KeyCode /* key */ ,
714 XkbAction * /* act */
715 );
716
717extern _X_EXPORT void XkbDisableComputedAutoRepeats(DeviceIntPtr /* pXDev */ ,
718 unsigned int /* key */
719 );
720
721extern _X_EXPORT void XkbSetRepeatKeys(DeviceIntPtr /* pXDev */ ,
722 int /* key */ ,
723 int /* onoff */
724 );
725
726extern _X_EXPORT int XkbLatchModifiers(DeviceIntPtr /* pXDev */ ,
727 CARD8 /* mask */ ,
728 CARD8 /* latches */
729 );
730
731extern _X_EXPORT int XkbLatchGroup(DeviceIntPtr /* pXDev */ ,
732 int /* group */
733 );
734
735extern _X_EXPORT void XkbClearAllLatchesAndLocks(DeviceIntPtr /* dev */ ,
736 XkbSrvInfoPtr /* xkbi */ ,
737 Bool /* genEv */ ,
738 XkbEventCausePtr /* cause */
739 );
740
741extern _X_EXPORT void XkbGetRulesDflts(XkbRMLVOSet * /* rmlvo */
742 );
743
744extern _X_EXPORT void XkbFreeRMLVOSet(XkbRMLVOSet * /* rmlvo */ ,
745 Bool /* freeRMLVO */
746 );
747
748extern _X_EXPORT void XkbSetRulesDflts(XkbRMLVOSet * /* rmlvo */
749 );
750
751extern _X_EXPORT void XkbDeleteRulesDflts(void
752 );
753
754extern _X_EXPORT void XkbDeleteRulesUsed(void
755 );
756
757extern _X_EXPORT int SProcXkbDispatch(ClientPtr /* client */
758 );
759
760extern _X_EXPORT XkbGeometryPtr XkbLookupNamedGeometry(DeviceIntPtr /* dev */ ,
761 Atom /* name */ ,
762 Bool * /* shouldFree */
763 );
764
765extern _X_EXPORT void XkbConvertCase(KeySym /* sym */ ,
766 KeySym * /* lower */ ,
767 KeySym * /* upper */
768 );
769
770extern _X_EXPORT Status XkbChangeKeycodeRange(XkbDescPtr /* xkb */ ,
771 int /* minKC */ ,
772 int /* maxKC */ ,
773 XkbChangesPtr /* changes */
774 );
775
776extern _X_EXPORT void XkbFreeSrvLedInfo(XkbSrvLedInfoPtr /* sli */
777 );
778
779extern _X_EXPORT void XkbFreeInfo(XkbSrvInfoPtr /* xkbi */
780 );
781
782extern _X_EXPORT Status XkbChangeTypesOfKey(XkbDescPtr /* xkb */ ,
783 int /* key */ ,
784 int /* nGroups */ ,
785 unsigned int /* groups */ ,
786 int * /* newTypesIn */ ,
787 XkbMapChangesPtr /* changes */
788 );
789
790extern _X_EXPORT int XkbKeyTypesForCoreSymbols(XkbDescPtr /* xkb */ ,
791 int /* map_width */ ,
792 KeySym * /* core_syms */ ,
793 unsigned int /* protected */ ,
794 int * /* types_inout */ ,
795 KeySym * /* xkb_syms_rtrn */
796 );
797
798extern _X_EXPORT Bool XkbApplyCompatMapToKey(XkbDescPtr /* xkb */ ,
799 KeyCode /* key */ ,
800 XkbChangesPtr /* changes */
801 );
802
803extern _X_EXPORT Bool XkbApplyVirtualModChanges(XkbDescPtr /* xkb */ ,
804 unsigned int /* changed */ ,
805 XkbChangesPtr /* changes */
806 );
807
808extern _X_EXPORT void XkbSendNewKeyboardNotify(DeviceIntPtr /* kbd */ ,
809 xkbNewKeyboardNotify * /* pNKN */
810 );
811
812extern Bool XkbCopyKeymap(XkbDescPtr /* dst */ ,
813 XkbDescPtr /* src */ );
814
815extern _X_EXPORT Bool XkbCopyDeviceKeymap(DeviceIntPtr /* dst */ ,
816 DeviceIntPtr /* src */ );
817
818extern void XkbFilterEvents(ClientPtr /* pClient */ ,
819 int /* nEvents */ ,
820 xEvent * /* xE */ );
821
822extern int XkbGetEffectiveGroup(XkbSrvInfoPtr /* xkbi */ ,
823 XkbStatePtr /* xkbstate */ ,
824 CARD8 /* keycode */ );
825
826extern void XkbMergeLockedPtrBtns(DeviceIntPtr /* master */ );
827
828extern void XkbFakeDeviceButton(DeviceIntPtr /* dev */ ,
829 int /* press */ ,
830 int /* button */ );
831
832#include "xkbfile.h"
833#include "xkbrules.h"
834
835#define _XkbListKeycodes 0
836#define _XkbListTypes 1
837#define _XkbListCompat 2
838#define _XkbListSymbols 3
839#define _XkbListGeometry 4
840#define _XkbListNumComponents 5
841
842extern _X_EXPORT unsigned int XkbDDXLoadKeymapByNames(DeviceIntPtr /* keybd */ ,
843 XkbComponentNamesPtr
844 /* names */ ,
845 unsigned int /* want */ ,
846 unsigned int /* need */ ,
847 XkbDescPtr *
848 /* finfoRtrn */ ,
849 char *
850 /* keymapNameRtrn */ ,
851 int /* keymapNameRtrnLen */
852 );
853
854extern _X_EXPORT Bool XkbDDXNamesFromRules(DeviceIntPtr /* keybd */ ,
855 char * /* rules */ ,
856 XkbRF_VarDefsPtr /* defs */ ,
857 XkbComponentNamesPtr /* names */
858 );
859
860extern _X_EXPORT XkbDescPtr XkbCompileKeymap(DeviceIntPtr /* dev */ ,
861 XkbRMLVOSet * /* rmlvo */
862 );
863
864#endif /* _XKBSRV_H_ */