1 /* $XConsortium: XKBsrv.h /main/25 1996/09/28 16:32:19 rws $ */
2 /************************************************************
3 Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
5 Permission to use, copy, modify, and distribute this
6 software and its documentation for any purpose and without
7 fee is hereby granted, provided that the above copyright
8 notice appear in all copies and that both that copyright
9 notice and this permission notice appear in supporting
10 documentation, and that the name of Silicon Graphics not be
11 used in advertising or publicity pertaining to distribution
12 of the software without specific prior written permission.
13 Silicon Graphics makes no representation about the suitability
14 of this software for any purpose. It is provided "as is"
15 without any express or implied warranty.
17 SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
18 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
19 AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
20 GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
21 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
22 DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
23 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
24 THE USE OR PERFORMANCE OF THIS SOFTWARE.
26 ********************************************************/
32 #define XkbAllocClientMap SrvXkbAllocClientMap
33 #define XkbAllocServerMap SrvXkbAllocServerMap
34 #define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey
35 #define XkbAddKeyType SrvXkbAddKeyType
36 #define XkbCopyKeyType SrvXkbCopyKeyType
37 #define XkbCopyKeyTypes SrvXkbCopyKeyTypes
38 #define XkbFreeClientMap SrvXkbFreeClientMap
39 #define XkbFreeServerMap SrvXkbFreeServerMap
40 #define XkbInitCanonicalKeyTypes SrvXkbInitCanonicalKeyTypes
41 #define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols
42 #define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey
43 #define XkbUpdateMapFromCore SrvXkbUpdateMapFromCore
44 #define XkbResizeKeyActions SrvXkbResizeKeyActions
45 #define XkbResizeKeySyms SrvXkbResizeKeySyms
46 #define XkbResizeKeyType SrvXkbResizeKeyType
47 #define XkbAllocCompatMap SrvXkbAllocCompatMap
48 #define XkbAllocControls SrvXkbAllocControls
49 #define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps
50 #define XkbAllocKeyboard SrvXkbAllocKeyboard
51 #define XkbAllocNames SrvXkbAllocNames
52 #define XkbFreeCompatMap SrvXkbFreeCompatMap
53 #define XkbFreeControls SrvXkbFreeControls
54 #define XkbFreeIndicatorMaps SrvXkbFreeIndicatorMaps
55 #define XkbFreeKeyboard SrvXkbFreeKeyboard
56 #define XkbFreeNames SrvXkbFreeNames
57 #define XkbAddDeviceLedInfo SrvXkbAddDeviceLedInfo
58 #define XkbAllocDeviceInfo SrvXkbAllocDeviceInfo
59 #define XkbFreeDeviceInfo SrvXkbFreeDeviceInfo
60 #define XkbResizeDeviceButtonActions SrvXkbResizeDeviceButtonActions
61 #define XkbLatchModifiers SrvXkbLatchModifiers
62 #define XkbLatchGroup SrvXkbLatchGroup
63 #define XkbVirtualModsToReal SrvXkbVirtualModsToReal
64 #define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange
65 #define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges
66 #define XkbUpdateActionVirtualMods SrvXkbUpdateActionVirtualMods
67 #define XkbUpdateKeyTypeVirtualMods SrvXkbUpdateKeyTypeVirtualMods
70 #include <X11/extensions/XKBstr.h>
71 #include <X11/extensions/XKBproto.h>
73 typedef struct _XkbInterest {
77 struct _XkbInterest * next;
78 CARD16 extDevNotifyMask;
79 CARD16 stateNotifyMask;
80 CARD16 namesNotifyMask;
81 CARD32 ctrlsNotifyMask;
82 CARD8 compatNotifyMask;
84 BOOL actionMessageMask;
85 CARD16 accessXNotifyMask;
86 CARD32 iStateNotifyMask;
87 CARD32 iMapNotifyMask;
88 CARD16 altSymsNotifyMask;
90 CARD32 autoCtrlValues;
91 } XkbInterestRec,*XkbInterestPtr;
93 typedef struct _XkbRadioGroup {
98 CARD8 members[XkbRGMaxMembers];
99 } XkbRadioGroupRec, *XkbRadioGroupPtr;
101 typedef struct _XkbEventCause {
107 } XkbEventCauseRec,*XkbEventCausePtr;
108 #define XkbSetCauseKey(c,k,e) { (c)->kc= (k),(c)->event= (e),\
109 (c)->mjr= (c)->mnr= 0; \
111 #define XkbSetCauseReq(c,j,n,cl) { (c)->kc= (c)->event= 0,\
112 (c)->mjr= (j),(c)->mnr= (n);\
114 #define XkbSetCauseCoreReq(c,e,cl) XkbSetCauseReq(c,e,0,cl)
115 #define XkbSetCauseXkbReq(c,e,cl) XkbSetCauseReq(c,XkbReqCode,e,cl)
116 #define XkbSetCauseUnknown(c) XkbSetCauseKey(c,0,0)
119 #define _KRG_WARN_TIMER 1
121 #define _SK_TIMEOUT_TIMER 3
122 #define _ALL_TIMEOUT_TIMER 4
125 #define _BEEP_FEATURE_ON 1
126 #define _BEEP_FEATURE_OFF 2
127 #define _BEEP_FEATURE_CHANGE 3
128 #define _BEEP_SLOW_WARN 4
129 #define _BEEP_SLOW_PRESS 5
130 #define _BEEP_SLOW_ACCEPT 6
131 #define _BEEP_SLOW_REJECT 7
132 #define _BEEP_SLOW_RELEASE 8
133 #define _BEEP_STICKY_LATCH 9
134 #define _BEEP_STICKY_LOCK 10
135 #define _BEEP_STICKY_UNLOCK 11
136 #define _BEEP_LED_ON 12
137 #define _BEEP_LED_OFF 13
138 #define _BEEP_LED_CHANGE 14
139 #define _BEEP_BOUNCE_REJECT 15
141 typedef struct _XkbSrvInfo {
142 XkbStateRec prev_state;
147 KbdCtrlProcPtr kbdProc;
149 XkbRadioGroupPtr radioGroups;
157 double mouseKeysCurve;
158 double mouseKeysCurveFactor;
161 CARD8 mouseKeysFlags;
163 CARD8 mouseKeysCounter;
165 CARD8 lockedPtrButtons;
171 CARD8 krgTimerActive;
176 CARD32 lastPtrEventTime;
177 CARD32 lastShiftEventTime;
178 OsTimerPtr beepTimer;
179 OsTimerPtr mouseKeyTimer;
180 OsTimerPtr slowKeysTimer;
181 OsTimerPtr bounceKeysTimer;
182 OsTimerPtr repeatKeyTimer;
184 } XkbSrvInfoRec, *XkbSrvInfoPtr;
186 #define XkbSLI_IsDefault (1L<<0)
187 #define XkbSLI_HasOwnState (1L<<1)
189 typedef struct _XkbSrvLedInfo {
198 CARD32 physIndicators;
200 CARD32 explicitState;
201 CARD32 effectiveState;
205 XkbIndicatorMapPtr maps;
211 CARD32 usesEffective;
215 CARD32 usedComponents;
216 } XkbSrvLedInfoRec, *XkbSrvLedInfoPtr;
219 * Settings for xkbClientFlags field (used by DIX)
220 * These flags _must_ not overlap with XkbPCF_*
222 #define _XkbClientInitialized (1<<15)
224 #define _XkbWantsDetectableAutoRepeat(c)\
225 ((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask)
228 * Settings for flags field
230 #define _XkbStateNotifyInProgress (1<<0)
232 /***====================================================================***/
234 #define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask)
235 #define XkbAllFilteredEventsMask \
236 (XkbAccessXKeysMask|XkbRepeatKeysMask|XkbAX_KRGMask)
238 /***====================================================================***/
240 extern int XkbReqCode;
241 extern int XkbEventBase;
242 extern int XkbKeyboardErrorCode;
243 extern int XkbDisableLockActions;
244 extern char * XkbBaseDirectory;
245 extern char * XkbInitialMap;
246 extern int _XkbClientMajor;
247 extern int _XkbClientMinor;
248 extern unsigned int XkbXIUnsupported;
250 extern char * XkbModelUsed,*XkbLayoutUsed,*XkbVariantUsed,*XkbOptionsUsed;
251 extern Bool noXkbExtension;
252 extern Bool XkbWantRulesProp;
254 extern pointer XkbLastRepeatEvent;
256 extern CARD32 xkbDebugFlags;
257 extern CARD32 xkbDebugCtrls;
259 #define _XkbAlloc(s) xalloc((s))
260 #define _XkbCalloc(n,s) Xcalloc((n)*(s))
261 #define _XkbRealloc(o,s) Xrealloc((o),(s))
262 #define _XkbTypedAlloc(t) ((t *)xalloc(sizeof(t)))
263 #define _XkbTypedCalloc(n,t) ((t *)Xcalloc((n)*sizeof(t)))
264 #define _XkbTypedRealloc(o,n,t) \
265 ((o)?(t *)Xrealloc((o),(n)*sizeof(t)):_XkbTypedCalloc(n,t))
266 #define _XkbClearElems(a,f,l,t) bzero(&(a)[f],((l)-(f)+1)*sizeof(t))
267 #define _XkbFree(p) Xfree(p)
269 #define _XkbLibError(c,l,d) \
270 { _XkbErrCode= (c); _XkbErrLocation= (l); _XkbErrData= (d); }
271 #define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
272 #define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
273 #define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
275 extern int DeviceKeyPress,DeviceKeyRelease;
276 extern int DeviceButtonPress,DeviceButtonRelease;
279 #define _XkbIsPressEvent(t) (((t)==KeyPress)||((t)==DeviceKeyPress))
280 #define _XkbIsReleaseEvent(t) (((t)==KeyRelease)||((t)==DeviceKeyRelease))
282 #define _XkbIsPressEvent(t) ((t)==KeyPress)
283 #define _XkbIsReleaseEvent(t) ((t)==KeyRelease)
286 #define _XkbCoreKeycodeInRange(c,k) (((k)>=(c)->curKeySyms.minKeyCode)&&\
287 ((k)<=(c)->curKeySyms.maxKeyCode))
288 #define _XkbCoreNumKeys(c) ((c)->curKeySyms.maxKeyCode-\
289 (c)->curKeySyms.minKeyCode+1)
291 #define XConvertCase(s,l,u) XkbConvertCase(s,l,u)
292 #define IsKeypadKey(s) XkbKSIsKeypad(s)
295 #define XPointer pointer
296 #define Display struct _XDisplay
305 #define PATH_MAX MAXPATHLEN
307 #define PATH_MAX 1024
313 extern void XkbFreeCompatMap(
314 #if NeedFunctionPrototypes
315 XkbDescPtr /* xkb */,
316 unsigned int /* which */,
321 extern void XkbFreeNames(
322 #if NeedFunctionPrototypes
323 XkbDescPtr /* xkb */,
324 unsigned int /* which */,
329 extern DeviceIntPtr _XkbLookupAnyDevice(
330 #if NeedFunctionPrototypes
336 extern DeviceIntPtr _XkbLookupKeyboard(
337 #if NeedFunctionPrototypes
343 extern DeviceIntPtr _XkbLookupBellDevice(
344 #if NeedFunctionPrototypes
350 extern DeviceIntPtr _XkbLookupLedDevice(
351 #if NeedFunctionPrototypes
357 extern DeviceIntPtr _XkbLookupButtonDevice(
358 #if NeedFunctionPrototypes
364 extern XkbDescPtr XkbAllocKeyboard(
365 #if NeedFunctionPrototypes
370 extern Status XkbAllocClientMap(
371 #if NeedFunctionPrototypes
372 XkbDescPtr /* xkb */,
373 unsigned int /* which */,
374 unsigned int /* nTypes */
378 extern Status XkbAllocServerMap(
379 #if NeedFunctionPrototypes
380 XkbDescPtr /* xkb */,
381 unsigned int /* which */,
382 unsigned int /* nNewActions */
386 extern void XkbFreeClientMap(
387 #if NeedFunctionPrototypes
388 XkbDescPtr /* xkb */,
389 unsigned int /* what */,
394 extern void XkbFreeServerMap(
395 #if NeedFunctionPrototypes
396 XkbDescPtr /* xkb */,
397 unsigned int /* what */,
402 extern Status XkbAllocIndicatorMaps(
403 #if NeedFunctionPrototypes
408 extern Status XkbAllocCompatMap(
409 #if NeedFunctionPrototypes
410 XkbDescPtr /* xkb */,
411 unsigned int /* which */,
412 unsigned int /* nInterpret */
416 extern Status XkbAllocNames(
417 #if NeedFunctionPrototypes
418 XkbDescPtr /* xkb */,
419 unsigned int /* which */,
421 int /* nTotalAliases */
425 extern Status XkbAllocControls(
426 #if NeedFunctionPrototypes
427 XkbDescPtr /* xkb */,
428 unsigned int /* which*/
432 extern Status XkbCopyKeyType(
433 #if NeedFunctionPrototypes
434 XkbKeyTypePtr /* from */,
435 XkbKeyTypePtr /* into */
439 extern Status XkbCopyKeyTypes(
440 #if NeedFunctionPrototypes
441 XkbKeyTypePtr /* from */,
442 XkbKeyTypePtr /* into */,
447 extern Status XkbResizeKeyType(
448 #if NeedFunctionPrototypes
449 XkbDescPtr /* xkb */,
452 Bool /* want_preserve */,
453 int /* new_num_lvls */
457 extern void XkbFreeKeyboard(
458 #if NeedFunctionPrototypes
459 XkbDescPtr /* xkb */,
460 unsigned int /* which */,
465 extern void XkbSetActionKeyMods(
466 #if NeedFunctionPrototypes
467 XkbDescPtr /* xkb */,
468 XkbAction * /* act */,
469 unsigned int /* mods */
473 extern Bool XkbCheckActionVMods(
474 #if NeedFunctionPrototypes
475 XkbDescPtr /* xkb */,
476 XkbAction * /* act */,
477 unsigned int /* changed */
481 extern Bool XkbApplyVModChanges(
482 #if NeedFunctionPrototypes
483 XkbSrvInfoPtr /* xkbi */,
484 unsigned int /* changed */,
485 XkbChangesPtr /* pChanges */,
486 unsigned int * /* needChecksRtrn */,
487 XkbEventCausePtr /* cause */
491 extern void XkbApplyVModChangesToAllDevices(
492 #if NeedFunctionPrototypes
493 DeviceIntPtr /* dev */,
494 XkbDescPtr /* xkb */,
495 unsigned int /* changed */,
496 XkbEventCausePtr /* cause */
500 extern unsigned int XkbMaskForVMask(
501 #if NeedFunctionPrototypes
502 XkbDescPtr /* xkb */,
503 unsigned int /* vmask */
507 extern Bool XkbVirtualModsToReal(
508 #if NeedFunctionPrototypes
509 XkbDescPtr /* xkb */,
510 unsigned int /* virtua_mask */,
511 unsigned int * /* mask_rtrn */
515 extern unsigned int XkbAdjustGroup(
516 #if NeedFunctionPrototypes
518 XkbControlsPtr /* ctrls */
522 extern KeySym *XkbResizeKeySyms(
523 #if NeedFunctionPrototypes
524 XkbDescPtr /* xkb */,
530 extern XkbAction *XkbResizeKeyActions(
531 #if NeedFunctionPrototypes
532 XkbDescPtr /* xkb */,
538 extern void XkbUpdateKeyTypesFromCore(
539 #if NeedFunctionPrototypes
540 DeviceIntPtr /* pXDev */,
543 XkbChangesPtr /* pChanges */
547 extern void XkbUpdateDescActions(
548 #if NeedFunctionPrototypes
549 XkbDescPtr /* xkb */,
552 XkbChangesPtr /* changes */
556 extern void XkbUpdateActions(
557 #if NeedFunctionPrototypes
558 DeviceIntPtr /* pXDev */,
561 XkbChangesPtr /* pChanges */,
562 unsigned int * /* needChecksRtrn */,
563 XkbEventCausePtr /* cause */
567 extern void XkbUpdateCoreDescription(
568 #if NeedFunctionPrototypes
569 DeviceIntPtr /* keybd */,
574 extern void XkbApplyMappingChange(
575 #if NeedFunctionPrototypes
576 DeviceIntPtr /* pXDev */,
578 KeyCode /* firstKey */,
580 ClientPtr /* client */
584 extern void XkbSetIndicators(
585 #if NeedFunctionPrototypes
586 DeviceIntPtr /* pXDev */,
589 XkbEventCausePtr /* cause */
593 extern void XkbUpdateIndicators(
594 #if NeedFunctionPrototypes
595 DeviceIntPtr /* keybd */,
596 CARD32 /* changed */,
597 Bool /* check_edevs */,
598 XkbChangesPtr /* pChanges */,
599 XkbEventCausePtr /* cause */
603 extern XkbSrvLedInfoPtr XkbAllocSrvLedInfo(
604 #if NeedFunctionPrototypes
605 DeviceIntPtr /* dev */,
606 KbdFeedbackPtr /* kf */,
607 LedFeedbackPtr /* lf */,
608 unsigned int /* needed_parts */
612 extern XkbSrvLedInfoPtr XkbFindSrvLedInfo(
613 #if NeedFunctionPrototypes
614 DeviceIntPtr /* dev */,
615 unsigned int /* class */,
616 unsigned int /* id */,
617 unsigned int /* needed_parts */
621 extern void XkbApplyLedNameChanges(
622 #if NeedFunctionPrototypes
623 DeviceIntPtr /* dev */,
624 XkbSrvLedInfoPtr /* sli */,
625 unsigned int /* changed_names */,
626 xkbExtensionDeviceNotify * /* ed */,
627 XkbChangesPtr /* changes */,
628 XkbEventCausePtr /* cause */
632 extern void XkbApplyLedMapChanges(
633 #if NeedFunctionPrototypes
634 DeviceIntPtr /* dev */,
635 XkbSrvLedInfoPtr /* sli */,
636 unsigned int /* changed_maps */,
637 xkbExtensionDeviceNotify * /* ed */,
638 XkbChangesPtr /* changes */,
639 XkbEventCausePtr /* cause */
643 extern void XkbApplyLedStateChanges(
644 #if NeedFunctionPrototypes
645 DeviceIntPtr /* dev */,
646 XkbSrvLedInfoPtr /* sli */,
647 unsigned int /* changed_leds */,
648 xkbExtensionDeviceNotify * /* ed */,
649 XkbChangesPtr /* changes */,
650 XkbEventCausePtr /* cause */
654 extern void XkbUpdateLedAutoState(
655 #if NeedFunctionPrototypes
656 DeviceIntPtr /* dev */,
657 XkbSrvLedInfoPtr /* sli */,
658 unsigned int /* maps_to_check */,
659 xkbExtensionDeviceNotify * /* ed */,
660 XkbChangesPtr /* changes */,
661 XkbEventCausePtr /* cause */
665 extern void XkbFlushLedEvents(
666 #if NeedFunctionPrototypes
667 DeviceIntPtr /* dev */,
668 DeviceIntPtr /* kbd */,
669 XkbSrvLedInfoPtr /* sli */,
670 xkbExtensionDeviceNotify * /* ed */,
671 XkbChangesPtr /* changes */,
672 XkbEventCausePtr /* cause */
676 extern void XkbUpdateAllDeviceIndicators(
677 #if NeedFunctionPrototypes
678 XkbChangesPtr /* changes */,
679 XkbEventCausePtr /* cause */
683 extern unsigned int XkbIndicatorsToUpdate(
684 #if NeedFunctionPrototypes
685 DeviceIntPtr /* dev */,
686 unsigned long /* state_changes */,
687 Bool /* enabled_ctrl_changes */
691 extern void XkbComputeDerivedState(
692 #if NeedFunctionPrototypes
693 XkbSrvInfoPtr /* xkbi */
697 extern void XkbCheckSecondaryEffects(
698 #if NeedFunctionPrototypes
699 XkbSrvInfoPtr /* xkbi */,
700 unsigned int /* which */,
701 XkbChangesPtr /* changes */,
702 XkbEventCausePtr /* cause */
706 extern void XkbCheckIndicatorMaps(
707 #if NeedFunctionPrototypes
708 DeviceIntPtr /* dev */,
709 XkbSrvLedInfoPtr /* sli */,
710 unsigned int /* which */
714 extern unsigned int XkbStateChangedFlags(
715 #if NeedFunctionPrototypes
716 XkbStatePtr /* old */,
717 XkbStatePtr /* new */
721 extern void XkbSendStateNotify(
722 #if NeedFunctionPrototypes
723 DeviceIntPtr /* kbd */,
724 xkbStateNotify * /* pSN */
728 extern void XkbSendMapNotify(
729 #if NeedFunctionPrototypes
730 DeviceIntPtr /* kbd */,
731 xkbMapNotify * /* ev */
735 extern int XkbComputeControlsNotify(
736 #if NeedFunctionPrototypes
737 DeviceIntPtr /* kbd */,
738 XkbControlsPtr /* old */,
739 XkbControlsPtr /* new */,
740 xkbControlsNotify * /* pCN */,
741 Bool /* forceCtrlProc */
745 extern void XkbSendControlsNotify(
746 #if NeedFunctionPrototypes
747 DeviceIntPtr /* kbd */,
748 xkbControlsNotify * /* ev */
752 extern void XkbSendCompatMapNotify(
753 #if NeedFunctionPrototypes
754 DeviceIntPtr /* kbd */,
755 xkbCompatMapNotify * /* ev */
759 extern void XkbSendIndicatorNotify(
760 #if NeedFunctionPrototypes
761 DeviceIntPtr /* kbd */,
763 xkbIndicatorNotify * /* ev */
767 extern void XkbHandleBell(
768 #if NeedFunctionPrototypes
770 BOOL /* eventOnly */,
771 DeviceIntPtr /* kbd */,
776 WindowPtr /* pWin */,
777 ClientPtr /* pClient */
781 extern void XkbSendAccessXNotify(
782 #if NeedFunctionPrototypes
783 DeviceIntPtr /* kbd */,
784 xkbAccessXNotify * /* pEv */
788 extern void XkbSendNamesNotify(
789 #if NeedFunctionPrototypes
790 DeviceIntPtr /* kbd */,
791 xkbNamesNotify * /* ev */
795 extern void XkbSendCompatNotify(
796 #if NeedFunctionPrototypes
797 DeviceIntPtr /* kbd */,
798 xkbCompatMapNotify * /* ev */
802 extern void XkbSendActionMessage(
803 #if NeedFunctionPrototypes
804 DeviceIntPtr /* kbd */,
805 xkbActionMessage * /* ev */
809 extern void XkbSendExtensionDeviceNotify(
810 #if NeedFunctionPrototypes
811 DeviceIntPtr /* kbd */,
812 ClientPtr /* client */,
813 xkbExtensionDeviceNotify * /* ev */
817 extern void XkbSendNotification(
818 #if NeedFunctionPrototypes
819 DeviceIntPtr /* kbd */,
820 XkbChangesPtr /* pChanges */,
821 XkbEventCausePtr /* cause */
825 extern void XkbProcessKeyboardEvent(
826 #if NeedFunctionPrototypes
827 struct _xEvent * /* xE */,
828 DeviceIntPtr /* keybd */,
833 extern void XkbProcessOtherEvent(
834 #if NeedFunctionPrototypes
835 struct _xEvent * /* xE */,
836 DeviceIntPtr /* keybd */,
841 extern void XkbHandleActions(
842 #if NeedFunctionPrototypes
843 DeviceIntPtr /* dev */,
844 DeviceIntPtr /* kbd */,
845 struct _xEvent * /* xE */,
850 extern Bool XkbEnableDisableControls(
851 #if NeedFunctionPrototypes
852 XkbSrvInfoPtr /* xkbi */,
853 unsigned long /* change */,
854 unsigned long /* newValues */,
855 XkbChangesPtr /* changes */,
856 XkbEventCausePtr /* cause */
860 extern void AccessXInit(
861 #if NeedFunctionPrototypes
862 DeviceIntPtr /* dev */
866 extern Bool AccessXFilterPressEvent(
867 #if NeedFunctionPrototypes
868 register struct _xEvent * /* xE */,
869 register DeviceIntPtr /* keybd */,
874 extern Bool AccessXFilterReleaseEvent(
875 #if NeedFunctionPrototypes
876 register struct _xEvent * /* xE */,
877 register DeviceIntPtr /* keybd */,
882 extern void AccessXCancelRepeatKey(
883 #if NeedFunctionPrototypes
884 XkbSrvInfoPtr /* xkbi */,
889 extern void AccessXComputeCurveFactor(
890 #if NeedFunctionPrototypes
891 XkbSrvInfoPtr /* xkbi */,
892 XkbControlsPtr /* ctrls */
896 extern XkbDeviceLedInfoPtr XkbAddDeviceLedInfo(
897 #if NeedFunctionPrototypes
898 XkbDeviceInfoPtr /* devi */,
899 unsigned int /* ledClass */,
900 unsigned int /* ledId */
904 extern XkbDeviceInfoPtr XkbAllocDeviceInfo(
905 #if NeedFunctionPrototypes
906 unsigned int /* deviceSpec */,
907 unsigned int /* nButtons */,
908 unsigned int /* szLeds */
912 extern void XkbFreeDeviceInfo(
913 #if NeedFunctionPrototypes
914 XkbDeviceInfoPtr /* devi */,
915 unsigned int /* which */,
920 extern Status XkbResizeDeviceButtonActions(
921 #if NeedFunctionPrototypes
922 XkbDeviceInfoPtr /* devi */,
923 unsigned int /* newTotal */
927 extern XkbInterestPtr XkbFindClientResource(
928 #if NeedFunctionPrototypes
929 DevicePtr /* inDev */,
930 ClientPtr /* client */
934 extern XkbInterestPtr XkbAddClientResource(
935 #if NeedFunctionPrototypes
936 DevicePtr /* inDev */,
937 ClientPtr /* client */,
942 extern int XkbRemoveClient(
943 #if NeedFunctionPrototypes
944 DevicePtr /* inDev */,
945 ClientPtr /* client */
949 extern int XkbRemoveResourceClient(
950 #if NeedFunctionPrototypes
951 DevicePtr /* inDev */,
956 extern int XkbDDXInitDevice(
957 #if NeedFunctionPrototypes
958 DeviceIntPtr /* dev */
962 extern int XkbDDXAccessXBeep(
963 #if NeedFunctionPrototypes
964 DeviceIntPtr /* dev */,
965 unsigned int /* what */,
966 unsigned int /* which */
970 extern void XkbDDXKeyClick(
971 #if NeedFunctionPrototypes
972 DeviceIntPtr /* dev */,
978 extern int XkbDDXUsesSoftRepeat(
979 #if NeedFunctionPrototypes
980 DeviceIntPtr /* dev */
984 extern void XkbDDXKeybdCtrlProc(
985 #if NeedFunctionPrototypes
986 DeviceIntPtr /* dev */,
987 KeybdCtrl * /* ctrl */
991 extern void XkbDDXChangeControls(
992 #if NeedFunctionPrototypes
993 DeviceIntPtr /* dev */,
994 XkbControlsPtr /* old */,
995 XkbControlsPtr /* new */
999 extern void XkbDDXUpdateIndicators(
1000 #if NeedFunctionPrototypes
1001 DeviceIntPtr /* keybd */,
1002 CARD32 /* newState */
1006 extern void XkbDDXUpdateDeviceIndicators(
1007 #if NeedFunctionPrototypes
1008 DeviceIntPtr /* dev */,
1009 XkbSrvLedInfoPtr /* sli */,
1010 CARD32 /* newState */
1014 extern void XkbDDXFakePointerButton(
1015 #if NeedFunctionPrototypes
1021 extern void XkbDDXFakePointerMotion(
1022 #if NeedFunctionPrototypes
1023 unsigned int /* flags */,
1029 extern void XkbDDXFakeDeviceButton(
1030 #if NeedFunctionPrototypes
1031 DeviceIntPtr /* dev */,
1037 extern int XkbDDXTerminateServer(
1038 #if NeedFunctionPrototypes
1039 DeviceIntPtr /* dev */,
1041 XkbAction * /* act */
1045 extern int XkbDDXSwitchScreen(
1046 #if NeedFunctionPrototypes
1047 DeviceIntPtr /* dev */,
1049 XkbAction * /* act */
1053 extern void XkbDisableComputedAutoRepeats(
1054 #if NeedFunctionPrototypes
1055 DeviceIntPtr /* pXDev */,
1056 unsigned int /* key */
1060 extern void XkbSetRepeatKeys(
1061 #if NeedFunctionPrototypes
1062 DeviceIntPtr /* pXDev */,
1068 extern int XkbLatchModifiers(
1069 #if NeedFunctionPrototypes
1070 DeviceIntPtr /* pXDev */,
1076 extern int XkbLatchGroup(
1077 #if NeedFunctionPrototypes
1078 DeviceIntPtr /* pXDev */,
1083 extern void XkbClearAllLatchesAndLocks(
1084 #if NeedFunctionPrototypes
1085 DeviceIntPtr /* dev */,
1086 XkbSrvInfoPtr /* xkbi */,
1088 XkbEventCausePtr /* cause */
1092 extern void XkbSetRulesDflts(
1093 #if NeedFunctionPrototypes
1094 char * /* rulesFile */,
1096 char * /* layout */,
1097 char * /* variant */,
1098 char * /* options */
1102 extern void XkbInitDevice(
1103 #if NeedFunctionPrototypes
1104 DeviceIntPtr /* pXDev */
1108 extern Bool XkbInitKeyboardDeviceStruct(
1109 #if NeedFunctionPrototypes
1110 DeviceIntPtr /* pXDev */,
1111 XkbComponentNamesPtr /* pNames */,
1112 KeySymsPtr /* pSyms */,
1113 CARD8 /* pMods */[],
1114 BellProcPtr /* bellProc */,
1115 KbdCtrlProcPtr /* ctrlProc */
1119 extern void XkbInitDevice(
1120 #if NeedFunctionPrototypes
1121 DeviceIntPtr /* pXDev */
1125 extern int SProcXkbDispatch(
1126 #if NeedFunctionPrototypes
1127 ClientPtr /* client */
1131 extern XkbGeometryPtr XkbLookupNamedGeometry(
1132 #if NeedFunctionPrototypes
1133 DeviceIntPtr /* dev */,
1135 Bool * /* shouldFree */
1139 extern char * _XkbDupString(
1140 #if NeedFunctionPrototypes
1145 extern void XkbConvertCase(
1146 #if NeedFunctionPrototypes
1148 KeySym * /* lower */,
1149 KeySym * /* upper */
1153 extern Status XkbChangeKeycodeRange(
1154 #if NeedFunctionPrototypes
1155 XkbDescPtr /* xkb */,
1158 XkbChangesPtr /* changes */
1162 #ifdef XKBSRV_NEED_FILE_FUNCS
1164 #include "extensions/XKMformat.h"
1165 #include "extensions/XKBfile.h"
1166 #include "extensions/XKBrules.h"
1168 #define _XkbListKeymaps 0
1169 #define _XkbListKeycodes 1
1170 #define _XkbListTypes 2
1171 #define _XkbListCompat 3
1172 #define _XkbListSymbols 4
1173 #define _XkbListGeometry 5
1174 #define _XkbListNumComponents 6
1176 typedef struct _XkbSrvListInfo {
1184 char * pattern[_XkbListNumComponents];
1185 int nFound[_XkbListNumComponents];
1186 } XkbSrvListInfoRec,*XkbSrvListInfoPtr;
1190 #if NeedFunctionPrototypes
1191 XkbRF_VarDefsPtr /* defs */
1195 extern void XkbSetRulesUsed(
1196 #if NeedFunctionPrototypes
1197 XkbRF_VarDefsPtr /* defs */
1202 extern Status XkbDDXList(
1203 #if NeedFunctionPrototypes
1204 DeviceIntPtr /* dev */,
1205 XkbSrvListInfoPtr /* listing */,
1206 ClientPtr /* client */
1210 extern unsigned int XkbDDXLoadKeymapByNames(
1211 #if NeedFunctionPrototypes
1212 DeviceIntPtr /* keybd */,
1213 XkbComponentNamesPtr /* names */,
1214 unsigned int /* want */,
1215 unsigned int /* need */,
1216 XkbFileInfoPtr /* finfoRtrn */,
1217 char * /* keymapNameRtrn */,
1218 int /* keymapNameRtrnLen */
1222 extern Bool XkbDDXNamesFromRules(
1223 #if NeedFunctionPrototypes
1224 DeviceIntPtr /* keybd */,
1226 XkbRF_VarDefsPtr /* defs */,
1227 XkbComponentNamesPtr /* names */
1231 extern FILE *XkbDDXOpenConfigFile(
1232 #if NeedFunctionPrototypes
1233 char * /* mapName */,
1234 char * /* fileNameRtrn */,
1235 int /* fileNameRtrnLen */
1239 extern Bool XkbDDXApplyConfig(
1240 #if NeedFunctionPrototypes
1241 XPointer /* cfg_in */,
1242 XkbSrvInfoPtr /* xkbi */
1246 extern XPointer XkbDDXPreloadConfig(
1247 #if NeedFunctionPrototypes
1248 char ** /* rulesFileRtrn */,
1249 XkbRF_VarDefsPtr /* defs */,
1250 XkbComponentNamesPtr /* names */,
1251 DeviceIntPtr /* dev */
1255 extern int XkbDDXUsesSoftRepeat(
1256 #if NeedFunctionPrototypes
1257 DeviceIntPtr /* pXDev */
1261 extern void XkbDDXFakePointerMotion(
1262 #if NeedFunctionPrototypes
1263 unsigned int /* flags */,
1269 extern int _XkbStrCaseCmp(
1270 #if NeedFunctionPrototypes
1276 #endif /* XKBSRV_NEED_FILE_FUNCS */
1281 #define XkbAtomGetString(d,s) NameForAtom(s)
1283 #endif /* _XKBSRV_H_ */