1 /************************************************************
2 Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
4 Permission to use, copy, modify, and distribute this
5 software and its documentation for any purpose and without
6 fee is hereby granted, provided that the above copyright
7 notice appear in all copies and that both that copyright
8 notice and this permission notice appear in supporting
9 documentation, and that the name of Silicon Graphics not be
10 used in advertising or publicity pertaining to distribution
11 of the software without specific prior written permission.
12 Silicon Graphics makes no representation about the suitability
13 of this software for any purpose. It is provided "as is"
14 without any express or implied warranty.
16 SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
17 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18 AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
19 GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
20 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
21 DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
22 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
23 THE USE OR PERFORMANCE OF THIS SOFTWARE.
25 ********************************************************/
31 #define XkbAllocClientMap SrvXkbAllocClientMap
32 #define XkbAllocServerMap SrvXkbAllocServerMap
33 #define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey
34 #define XkbCopyKeyTypes SrvXkbCopyKeyTypes
35 #define XkbFreeClientMap SrvXkbFreeClientMap
36 #define XkbFreeServerMap SrvXkbFreeServerMap
37 #define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols
38 #define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey
39 #define XkbResizeKeyActions SrvXkbResizeKeyActions
40 #define XkbResizeKeySyms SrvXkbResizeKeySyms
41 #define XkbResizeKeyType SrvXkbResizeKeyType
42 #define XkbAllocCompatMap SrvXkbAllocCompatMap
43 #define XkbAllocControls SrvXkbAllocControls
44 #define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps
45 #define XkbAllocKeyboard SrvXkbAllocKeyboard
46 #define XkbAllocNames SrvXkbAllocNames
47 #define XkbFreeCompatMap SrvXkbFreeCompatMap
48 #define XkbFreeKeyboard SrvXkbFreeKeyboard
49 #define XkbFreeNames SrvXkbFreeNames
50 #define XkbLatchModifiers SrvXkbLatchModifiers
51 #define XkbLatchGroup SrvXkbLatchGroup
52 #define XkbVirtualModsToReal SrvXkbVirtualModsToReal
53 #define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange
54 #define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges
57 #include <X11/extensions/XKBstr.h>
58 #include <X11/extensions/XKBproto.h>
61 typedef struct _XkbInterest
{
65 struct _XkbInterest
* next
;
66 CARD16 extDevNotifyMask
;
67 CARD16 stateNotifyMask
;
68 CARD16 namesNotifyMask
;
69 CARD32 ctrlsNotifyMask
;
70 CARD8 compatNotifyMask
;
72 BOOL actionMessageMask
;
73 CARD16 accessXNotifyMask
;
74 CARD32 iStateNotifyMask
;
75 CARD32 iMapNotifyMask
;
76 CARD16 altSymsNotifyMask
;
78 CARD32 autoCtrlValues
;
79 } XkbInterestRec
,*XkbInterestPtr
;
81 typedef struct _XkbRadioGroup
{
86 CARD8 members
[XkbRGMaxMembers
];
87 } XkbRadioGroupRec
, *XkbRadioGroupPtr
;
89 typedef struct _XkbEventCause
{
95 } XkbEventCauseRec
,*XkbEventCausePtr
;
96 #define XkbSetCauseKey(c,k,e) { (c)->kc= (k),(c)->event= (e),\
97 (c)->mjr= (c)->mnr= 0; \
99 #define XkbSetCauseReq(c,j,n,cl) { (c)->kc= (c)->event= 0,\
100 (c)->mjr= (j),(c)->mnr= (n);\
102 #define XkbSetCauseCoreReq(c,e,cl) XkbSetCauseReq(c,e,0,cl)
103 #define XkbSetCauseXkbReq(c,e,cl) XkbSetCauseReq(c,XkbReqCode,e,cl)
104 #define XkbSetCauseUnknown(c) XkbSetCauseKey(c,0,0)
107 #define _KRG_WARN_TIMER 1
109 #define _SK_TIMEOUT_TIMER 3
110 #define _ALL_TIMEOUT_TIMER 4
113 #define _BEEP_FEATURE_ON 1
114 #define _BEEP_FEATURE_OFF 2
115 #define _BEEP_FEATURE_CHANGE 3
116 #define _BEEP_SLOW_WARN 4
117 #define _BEEP_SLOW_PRESS 5
118 #define _BEEP_SLOW_ACCEPT 6
119 #define _BEEP_SLOW_REJECT 7
120 #define _BEEP_SLOW_RELEASE 8
121 #define _BEEP_STICKY_LATCH 9
122 #define _BEEP_STICKY_LOCK 10
123 #define _BEEP_STICKY_UNLOCK 11
124 #define _BEEP_LED_ON 12
125 #define _BEEP_LED_OFF 13
126 #define _BEEP_LED_CHANGE 14
127 #define _BEEP_BOUNCE_REJECT 15
129 typedef struct _XkbSrvInfo
{
130 XkbStateRec prev_state
;
135 KbdCtrlProcPtr kbdProc
;
137 XkbRadioGroupPtr radioGroups
;
145 double mouseKeysCurve
;
146 double mouseKeysCurveFactor
;
149 CARD8 mouseKeysFlags
;
151 CARD8 mouseKeysCounter
;
153 CARD8 lockedPtrButtons
;
159 CARD8 krgTimerActive
;
164 CARD32 lastPtrEventTime
;
165 CARD32 lastShiftEventTime
;
166 OsTimerPtr beepTimer
;
167 OsTimerPtr mouseKeyTimer
;
168 OsTimerPtr slowKeysTimer
;
169 OsTimerPtr bounceKeysTimer
;
170 OsTimerPtr repeatKeyTimer
;
172 } XkbSrvInfoRec
, *XkbSrvInfoPtr
;
174 #define XkbSLI_IsDefault (1L<<0)
175 #define XkbSLI_HasOwnState (1L<<1)
177 typedef struct _XkbSrvLedInfo
{
186 CARD32 physIndicators
;
188 CARD32 explicitState
;
189 CARD32 effectiveState
;
193 XkbIndicatorMapPtr maps
;
199 CARD32 usesEffective
;
203 CARD32 usedComponents
;
204 } XkbSrvLedInfoRec
, *XkbSrvLedInfoPtr
;
207 * Settings for xkbClientFlags field (used by DIX)
208 * These flags _must_ not overlap with XkbPCF_*
210 #define _XkbClientInitialized (1<<15)
212 #define _XkbWantsDetectableAutoRepeat(c)\
213 ((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask)
216 * Settings for flags field
218 #define _XkbStateNotifyInProgress (1<<0)
222 ProcessInputProc processInputProc
;
223 ProcessInputProc realInputProc
;
224 DeviceUnwrapProc unwrapProc
;
225 } xkbDeviceInfoRec
, *xkbDeviceInfoPtr
;
227 #define WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
228 device->public.processInputProc = proc; \
229 oldprocs->processInputProc = \
230 oldprocs->realInputProc = device->public.realInputProc; \
231 device->public.realInputProc = proc; \
232 oldprocs->unwrapProc = device->unwrapProc; \
233 device->unwrapProc = unwrapproc;
235 #define COND_WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
236 if (device->public.processInputProc == device->public.realInputProc)\
237 device->public.processInputProc = proc; \
238 oldprocs->processInputProc = \
239 oldprocs->realInputProc = device->public.realInputProc; \
240 device->public.realInputProc = proc; \
241 oldprocs->unwrapProc = device->unwrapProc; \
242 device->unwrapProc = unwrapproc;
244 #define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs) \
245 device->public.processInputProc = oldprocs->processInputProc; \
246 device->public.realInputProc = oldprocs->realInputProc; \
247 device->unwrapProc = oldprocs->unwrapProc;
249 #define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr) (dev)->devPrivates[xkbDevicePrivateIndex].ptr)
251 /***====================================================================***/
254 /***====================================================================***/
256 #define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask)
257 #define XkbAllFilteredEventsMask \
258 (XkbAccessXKeysMask|XkbRepeatKeysMask|XkbMouseKeysAccelMask|XkbAX_KRGMask)
260 /***====================================================================***/
262 extern int XkbReqCode
;
263 extern int XkbEventBase
;
264 extern int XkbDisableLockActions
;
265 extern char * XkbBaseDirectory
;
266 extern char * XkbBinDirectory
;
267 extern char * XkbInitialMap
;
268 extern unsigned int XkbXIUnsupported
;
270 extern Bool noXkbExtension
;
272 extern pointer XkbLastRepeatEvent
;
274 extern CARD32 xkbDebugFlags
;
276 #define _XkbAlloc(s) xalloc((s))
277 #define _XkbCalloc(n,s) Xcalloc((n)*(s))
278 #define _XkbRealloc(o,s) Xrealloc((o),(s))
279 #define _XkbTypedAlloc(t) ((t *)xalloc(sizeof(t)))
280 #define _XkbTypedCalloc(n,t) ((t *)Xcalloc((n)*sizeof(t)))
281 #define _XkbTypedRealloc(o,n,t) \
282 ((o)?(t *)Xrealloc((o),(n)*sizeof(t)):_XkbTypedCalloc(n,t))
283 #define _XkbClearElems(a,f,l,t) bzero(&(a)[f],((l)-(f)+1)*sizeof(t))
284 #define _XkbFree(p) Xfree(p)
286 #define _XkbLibError(c,l,d) \
287 { _XkbErrCode= (c); _XkbErrLocation= (l); _XkbErrData= (d); }
288 #define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
289 #define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
290 #define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
292 extern int DeviceKeyPress
,DeviceKeyRelease
;
293 extern int DeviceButtonPress
,DeviceButtonRelease
;
296 #define _XkbIsPressEvent(t) (((t)==KeyPress)||((t)==DeviceKeyPress))
297 #define _XkbIsReleaseEvent(t) (((t)==KeyRelease)||((t)==DeviceKeyRelease))
299 #define _XkbIsPressEvent(t) ((t)==KeyPress)
300 #define _XkbIsReleaseEvent(t) ((t)==KeyRelease)
303 #define _XkbCoreKeycodeInRange(c,k) (((k)>=(c)->curKeySyms.minKeyCode)&&\
304 ((k)<=(c)->curKeySyms.maxKeyCode))
305 #define _XkbCoreNumKeys(c) ((c)->curKeySyms.maxKeyCode-\
306 (c)->curKeySyms.minKeyCode+1)
308 #define XConvertCase(s,l,u) XkbConvertCase(s,l,u)
310 #define IsKeypadKey(s) XkbKSIsKeypad(s)
313 #define XPointer pointer
314 #define Display struct _XDisplay
323 #define PATH_MAX MAXPATHLEN
325 #define PATH_MAX 1024
331 extern void XkbUseMsg(
335 extern int XkbProcessArguments(
341 extern void XkbSetExtension(DeviceIntPtr device
, ProcessInputProc proc
);
343 extern void XkbFreeCompatMap(
344 XkbDescPtr
/* xkb */,
345 unsigned int /* which */,
349 extern void XkbFreeNames(
350 XkbDescPtr
/* xkb */,
351 unsigned int /* which */,
355 extern DeviceIntPtr
_XkbLookupAnyDevice(
360 extern DeviceIntPtr
_XkbLookupKeyboard(
365 extern DeviceIntPtr
_XkbLookupBellDevice(
370 extern DeviceIntPtr
_XkbLookupLedDevice(
375 extern DeviceIntPtr
_XkbLookupButtonDevice(
380 extern XkbDescPtr
XkbAllocKeyboard(
384 extern Status
XkbAllocClientMap(
385 XkbDescPtr
/* xkb */,
386 unsigned int /* which */,
387 unsigned int /* nTypes */
390 extern Status
XkbAllocServerMap(
391 XkbDescPtr
/* xkb */,
392 unsigned int /* which */,
393 unsigned int /* nNewActions */
396 extern void XkbFreeClientMap(
397 XkbDescPtr
/* xkb */,
398 unsigned int /* what */,
402 extern void XkbFreeServerMap(
403 XkbDescPtr
/* xkb */,
404 unsigned int /* what */,
408 extern Status
XkbAllocIndicatorMaps(
412 extern Status
XkbAllocCompatMap(
413 XkbDescPtr
/* xkb */,
414 unsigned int /* which */,
415 unsigned int /* nInterpret */
418 extern Status
XkbAllocNames(
419 XkbDescPtr
/* xkb */,
420 unsigned int /* which */,
422 int /* nTotalAliases */
425 extern Status
XkbAllocControls(
426 XkbDescPtr
/* xkb */,
427 unsigned int /* which*/
430 extern Status
XkbCopyKeyTypes(
431 XkbKeyTypePtr
/* from */,
432 XkbKeyTypePtr
/* into */,
436 extern Status
XkbResizeKeyType(
437 XkbDescPtr
/* xkb */,
440 Bool
/* want_preserve */,
441 int /* new_num_lvls */
444 extern void XkbFreeKeyboard(
445 XkbDescPtr
/* xkb */,
446 unsigned int /* which */,
450 extern void XkbSetActionKeyMods(
451 XkbDescPtr
/* xkb */,
452 XkbAction
* /* act */,
453 unsigned int /* mods */
456 extern Bool
XkbCheckActionVMods(
457 XkbDescPtr
/* xkb */,
458 XkbAction
* /* act */,
459 unsigned int /* changed */
462 extern unsigned int XkbMaskForVMask(
463 XkbDescPtr
/* xkb */,
464 unsigned int /* vmask */
467 extern Bool
XkbVirtualModsToReal(
468 XkbDescPtr
/* xkb */,
469 unsigned int /* virtua_mask */,
470 unsigned int * /* mask_rtrn */
473 extern unsigned int XkbAdjustGroup(
475 XkbControlsPtr
/* ctrls */
478 extern KeySym
*XkbResizeKeySyms(
479 XkbDescPtr
/* xkb */,
484 extern XkbAction
*XkbResizeKeyActions(
485 XkbDescPtr
/* xkb */,
490 extern void XkbUpdateKeyTypesFromCore(
491 DeviceIntPtr
/* pXDev */,
494 XkbChangesPtr
/* pChanges */
497 extern void XkbUpdateDescActions(
498 XkbDescPtr
/* xkb */,
501 XkbChangesPtr
/* changes */
504 extern void XkbUpdateActions(
505 DeviceIntPtr
/* pXDev */,
508 XkbChangesPtr
/* pChanges */,
509 unsigned int * /* needChecksRtrn */,
510 XkbEventCausePtr
/* cause */
513 extern void XkbUpdateCoreDescription(
514 DeviceIntPtr
/* keybd */,
518 extern void XkbApplyMappingChange(
519 DeviceIntPtr
/* pXDev */,
521 KeyCode
/* firstKey */,
523 ClientPtr
/* client */
526 extern void XkbSetIndicators(
527 DeviceIntPtr
/* pXDev */,
530 XkbEventCausePtr
/* cause */
533 extern void XkbUpdateIndicators(
534 DeviceIntPtr
/* keybd */,
535 CARD32
/* changed */,
536 Bool
/* check_edevs */,
537 XkbChangesPtr
/* pChanges */,
538 XkbEventCausePtr
/* cause */
541 extern XkbSrvLedInfoPtr
XkbAllocSrvLedInfo(
542 DeviceIntPtr
/* dev */,
543 KbdFeedbackPtr
/* kf */,
544 LedFeedbackPtr
/* lf */,
545 unsigned int /* needed_parts */
548 extern XkbSrvLedInfoPtr
XkbFindSrvLedInfo(
549 DeviceIntPtr
/* dev */,
550 unsigned int /* class */,
551 unsigned int /* id */,
552 unsigned int /* needed_parts */
555 extern void XkbApplyLedNameChanges(
556 DeviceIntPtr
/* dev */,
557 XkbSrvLedInfoPtr
/* sli */,
558 unsigned int /* changed_names */,
559 xkbExtensionDeviceNotify
* /* ed */,
560 XkbChangesPtr
/* changes */,
561 XkbEventCausePtr
/* cause */
564 extern void XkbApplyLedMapChanges(
565 DeviceIntPtr
/* dev */,
566 XkbSrvLedInfoPtr
/* sli */,
567 unsigned int /* changed_maps */,
568 xkbExtensionDeviceNotify
* /* ed */,
569 XkbChangesPtr
/* changes */,
570 XkbEventCausePtr
/* cause */
573 extern void XkbApplyLedStateChanges(
574 DeviceIntPtr
/* dev */,
575 XkbSrvLedInfoPtr
/* sli */,
576 unsigned int /* changed_leds */,
577 xkbExtensionDeviceNotify
* /* ed */,
578 XkbChangesPtr
/* changes */,
579 XkbEventCausePtr
/* cause */
582 extern void XkbFlushLedEvents(
583 DeviceIntPtr
/* dev */,
584 DeviceIntPtr
/* kbd */,
585 XkbSrvLedInfoPtr
/* sli */,
586 xkbExtensionDeviceNotify
* /* ed */,
587 XkbChangesPtr
/* changes */,
588 XkbEventCausePtr
/* cause */
591 extern unsigned int XkbIndicatorsToUpdate(
592 DeviceIntPtr
/* dev */,
593 unsigned long /* state_changes */,
594 Bool
/* enabled_ctrl_changes */
597 extern void XkbComputeDerivedState(
598 XkbSrvInfoPtr
/* xkbi */
601 extern void XkbCheckSecondaryEffects(
602 XkbSrvInfoPtr
/* xkbi */,
603 unsigned int /* which */,
604 XkbChangesPtr
/* changes */,
605 XkbEventCausePtr
/* cause */
608 extern void XkbCheckIndicatorMaps(
609 DeviceIntPtr
/* dev */,
610 XkbSrvLedInfoPtr
/* sli */,
611 unsigned int /* which */
614 extern unsigned int XkbStateChangedFlags(
615 XkbStatePtr
/* old */,
616 XkbStatePtr
/* new */
619 extern void XkbSendStateNotify(
620 DeviceIntPtr
/* kbd */,
621 xkbStateNotify
* /* pSN */
624 extern void XkbSendMapNotify(
625 DeviceIntPtr
/* kbd */,
626 xkbMapNotify
* /* ev */
629 extern int XkbComputeControlsNotify(
630 DeviceIntPtr
/* kbd */,
631 XkbControlsPtr
/* old */,
632 XkbControlsPtr
/* new */,
633 xkbControlsNotify
* /* pCN */,
634 Bool
/* forceCtrlProc */
637 extern void XkbSendControlsNotify(
638 DeviceIntPtr
/* kbd */,
639 xkbControlsNotify
* /* ev */
642 extern void XkbSendCompatMapNotify(
643 DeviceIntPtr
/* kbd */,
644 xkbCompatMapNotify
* /* ev */
647 extern void XkbHandleBell(
649 BOOL
/* eventOnly */,
650 DeviceIntPtr
/* kbd */,
655 WindowPtr
/* pWin */,
656 ClientPtr
/* pClient */
659 extern void XkbSendAccessXNotify(
660 DeviceIntPtr
/* kbd */,
661 xkbAccessXNotify
* /* pEv */
664 extern void XkbSendNamesNotify(
665 DeviceIntPtr
/* kbd */,
666 xkbNamesNotify
* /* ev */
669 extern void XkbSendCompatNotify(
670 DeviceIntPtr
/* kbd */,
671 xkbCompatMapNotify
* /* ev */
674 extern void XkbSendActionMessage(
675 DeviceIntPtr
/* kbd */,
676 xkbActionMessage
* /* ev */
679 extern void XkbSendExtensionDeviceNotify(
680 DeviceIntPtr
/* kbd */,
681 ClientPtr
/* client */,
682 xkbExtensionDeviceNotify
* /* ev */
685 extern void XkbSendNotification(
686 DeviceIntPtr
/* kbd */,
687 XkbChangesPtr
/* pChanges */,
688 XkbEventCausePtr
/* cause */
691 extern void XkbProcessKeyboardEvent(
692 struct _xEvent
* /* xE */,
693 DeviceIntPtr
/* keybd */,
697 extern void XkbHandleActions(
698 DeviceIntPtr
/* dev */,
699 DeviceIntPtr
/* kbd */,
700 struct _xEvent
* /* xE */,
704 extern Bool
XkbEnableDisableControls(
705 XkbSrvInfoPtr
/* xkbi */,
706 unsigned long /* change */,
707 unsigned long /* newValues */,
708 XkbChangesPtr
/* changes */,
709 XkbEventCausePtr
/* cause */
712 extern void AccessXInit(
713 DeviceIntPtr
/* dev */
716 extern Bool
AccessXFilterPressEvent(
717 register struct _xEvent
* /* xE */,
718 register DeviceIntPtr
/* keybd */,
722 extern Bool
AccessXFilterReleaseEvent(
723 register struct _xEvent
* /* xE */,
724 register DeviceIntPtr
/* keybd */,
728 extern void AccessXCancelRepeatKey(
729 XkbSrvInfoPtr
/* xkbi */,
733 extern void AccessXComputeCurveFactor(
734 XkbSrvInfoPtr
/* xkbi */,
735 XkbControlsPtr
/* ctrls */
738 extern XkbInterestPtr
XkbFindClientResource(
739 DevicePtr
/* inDev */,
740 ClientPtr
/* client */
743 extern XkbInterestPtr
XkbAddClientResource(
744 DevicePtr
/* inDev */,
745 ClientPtr
/* client */,
749 extern int XkbRemoveResourceClient(
750 DevicePtr
/* inDev */,
754 extern int XkbDDXInitDevice(
755 DeviceIntPtr
/* dev */
758 extern int XkbDDXAccessXBeep(
759 DeviceIntPtr
/* dev */,
760 unsigned int /* what */,
761 unsigned int /* which */
764 extern void XkbDDXKeyClick(
765 DeviceIntPtr
/* dev */,
770 extern int XkbDDXUsesSoftRepeat(
771 DeviceIntPtr
/* dev */
774 extern void XkbDDXKeybdCtrlProc(
775 DeviceIntPtr
/* dev */,
776 KeybdCtrl
* /* ctrl */
779 extern void XkbDDXChangeControls(
780 DeviceIntPtr
/* dev */,
781 XkbControlsPtr
/* old */,
782 XkbControlsPtr
/* new */
785 extern void XkbDDXUpdateDeviceIndicators(
786 DeviceIntPtr
/* dev */,
787 XkbSrvLedInfoPtr
/* sli */,
788 CARD32
/* newState */
791 extern void XkbDDXFakePointerButton(
796 extern void XkbDDXFakePointerMotion(
797 unsigned int /* flags */,
802 extern void XkbDDXFakeDeviceButton(
803 DeviceIntPtr
/* dev */,
808 extern int XkbDDXTerminateServer(
809 DeviceIntPtr
/* dev */,
811 XkbAction
* /* act */
814 extern int XkbDDXSwitchScreen(
815 DeviceIntPtr
/* dev */,
817 XkbAction
* /* act */
820 extern int XkbDDXPrivate(
821 DeviceIntPtr
/* dev */,
823 XkbAction
* /* act */
826 extern void XkbDisableComputedAutoRepeats(
827 DeviceIntPtr
/* pXDev */,
828 unsigned int /* key */
831 extern void XkbSetRepeatKeys(
832 DeviceIntPtr
/* pXDev */,
837 extern int XkbLatchModifiers(
838 DeviceIntPtr
/* pXDev */,
843 extern int XkbLatchGroup(
844 DeviceIntPtr
/* pXDev */,
848 extern void XkbClearAllLatchesAndLocks(
849 DeviceIntPtr
/* dev */,
850 XkbSrvInfoPtr
/* xkbi */,
852 XkbEventCausePtr
/* cause */
855 extern void XkbSetRulesDflts(
856 char * /* rulesFile */,
859 char * /* variant */,
863 extern void XkbInitDevice(
864 DeviceIntPtr
/* pXDev */
867 extern Bool
XkbInitKeyboardDeviceStruct(
868 DeviceIntPtr
/* pXDev */,
869 XkbComponentNamesPtr
/* pNames */,
870 KeySymsPtr
/* pSyms */,
872 BellProcPtr
/* bellProc */,
873 KbdCtrlProcPtr
/* ctrlProc */
876 extern int SProcXkbDispatch(
877 ClientPtr
/* client */
880 extern XkbGeometryPtr
XkbLookupNamedGeometry(
881 DeviceIntPtr
/* dev */,
883 Bool
* /* shouldFree */
886 extern char * _XkbDupString(
890 extern void XkbConvertCase(
892 KeySym
* /* lower */,
896 extern Status
XkbChangeKeycodeRange(
897 XkbDescPtr
/* xkb */,
900 XkbChangesPtr
/* changes */
903 extern int XkbFinishDeviceInit(
904 DeviceIntPtr
/* pXDev */
907 extern void XkbFreeSrvLedInfo(
908 XkbSrvLedInfoPtr
/* sli */
911 extern void XkbFreeInfo(
912 XkbSrvInfoPtr
/* xkbi */
915 extern Status
XkbChangeTypesOfKey(
916 XkbDescPtr
/* xkb */,
919 unsigned int /* groups */,
920 int * /* newTypesIn */,
921 XkbMapChangesPtr
/* changes */
924 extern int XkbKeyTypesForCoreSymbols(
925 XkbDescPtr
/* xkb */,
927 KeySym
* /* core_syms */,
928 unsigned int /* protected */,
929 int * /* types_inout */,
930 KeySym
* /* xkb_syms_rtrn */
933 extern Bool
XkbApplyCompatMapToKey(
934 XkbDescPtr
/* xkb */,
936 XkbChangesPtr
/* changes */
939 extern Bool
XkbApplyVirtualModChanges(
940 XkbDescPtr
/* xkb */,
941 unsigned int /* changed */,
942 XkbChangesPtr
/* changes */
945 extern void XkbSendNewKeyboardNotify(
946 DeviceIntPtr
/* kbd */,
947 xkbNewKeyboardNotify
* /* pNKN */
950 #ifdef XKBSRV_NEED_FILE_FUNCS
952 #include <X11/extensions/XKMformat.h>
953 #include <X11/extensions/XKBfile.h>
954 #include <X11/extensions/XKBrules.h>
956 #define _XkbListKeymaps 0
957 #define _XkbListKeycodes 1
958 #define _XkbListTypes 2
959 #define _XkbListCompat 3
960 #define _XkbListSymbols 4
961 #define _XkbListGeometry 5
962 #define _XkbListNumComponents 6
964 typedef struct _XkbSrvListInfo
{
972 char * pattern
[_XkbListNumComponents
];
973 int nFound
[_XkbListNumComponents
];
974 } XkbSrvListInfoRec
,*XkbSrvListInfoPtr
;
976 extern Status
XkbDDXList(
977 DeviceIntPtr
/* dev */,
978 XkbSrvListInfoPtr
/* listing */,
979 ClientPtr
/* client */
982 extern unsigned int XkbDDXLoadKeymapByNames(
983 DeviceIntPtr
/* keybd */,
984 XkbComponentNamesPtr
/* names */,
985 unsigned int /* want */,
986 unsigned int /* need */,
987 XkbFileInfoPtr
/* finfoRtrn */,
988 char * /* keymapNameRtrn */,
989 int /* keymapNameRtrnLen */
992 extern Bool
XkbDDXNamesFromRules(
993 DeviceIntPtr
/* keybd */,
995 XkbRF_VarDefsPtr
/* defs */,
996 XkbComponentNamesPtr
/* names */
999 extern Bool
XkbDDXApplyConfig(
1000 XPointer
/* cfg_in */,
1001 XkbSrvInfoPtr
/* xkbi */
1004 extern XPointer
XkbDDXPreloadConfig(
1005 char ** /* rulesFileRtrn */,
1006 XkbRF_VarDefsPtr
/* defs */,
1007 XkbComponentNamesPtr
/* names */,
1008 DeviceIntPtr
/* dev */
1011 extern int _XkbStrCaseCmp(
1016 #endif /* XKBSRV_NEED_FILE_FUNCS */
1020 #define XkbAtomGetString(d,s) NameForAtom(s)
1022 #endif /* _XKBSRV_H_ */