File indexing completed on 2025-01-18 10:14:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #ifndef _XKBSRV_H_
0028 #define _XKBSRV_H_
0029
0030 #ifdef XKB_IN_SERVER
0031 #define XkbAllocClientMap SrvXkbAllocClientMap
0032 #define XkbAllocServerMap SrvXkbAllocServerMap
0033 #define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey
0034 #define XkbAddKeyType SrvXkbAddKeyType
0035 #define XkbCopyKeyType SrvXkbCopyKeyType
0036 #define XkbCopyKeyTypes SrvXkbCopyKeyTypes
0037 #define XkbFreeClientMap SrvXkbFreeClientMap
0038 #define XkbFreeServerMap SrvXkbFreeServerMap
0039 #define XkbInitCanonicalKeyTypes SrvXkbInitCanonicalKeyTypes
0040 #define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols
0041 #define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey
0042 #define XkbUpdateMapFromCore SrvXkbUpdateMapFromCore
0043 #define XkbResizeKeyActions SrvXkbResizeKeyActions
0044 #define XkbResizeKeySyms SrvXkbResizeKeySyms
0045 #define XkbResizeKeyType SrvXkbResizeKeyType
0046 #define XkbAllocCompatMap SrvXkbAllocCompatMap
0047 #define XkbAllocControls SrvXkbAllocControls
0048 #define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps
0049 #define XkbAllocKeyboard SrvXkbAllocKeyboard
0050 #define XkbAllocNames SrvXkbAllocNames
0051 #define XkbFreeCompatMap SrvXkbFreeCompatMap
0052 #define XkbFreeControls SrvXkbFreeControls
0053 #define XkbFreeIndicatorMaps SrvXkbFreeIndicatorMaps
0054 #define XkbFreeKeyboard SrvXkbFreeKeyboard
0055 #define XkbFreeNames SrvXkbFreeNames
0056 #define XkbAddDeviceLedInfo SrvXkbAddDeviceLedInfo
0057 #define XkbAllocDeviceInfo SrvXkbAllocDeviceInfo
0058 #define XkbFreeDeviceInfo SrvXkbFreeDeviceInfo
0059 #define XkbResizeDeviceButtonActions SrvXkbResizeDeviceButtonActions
0060 #define XkbLatchModifiers SrvXkbLatchModifiers
0061 #define XkbLatchGroup SrvXkbLatchGroup
0062 #define XkbVirtualModsToReal SrvXkbVirtualModsToReal
0063 #define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange
0064 #define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges
0065 #define XkbUpdateActionVirtualMods SrvXkbUpdateActionVirtualMods
0066 #define XkbUpdateKeyTypeVirtualMods SrvXkbUpdateKeyTypeVirtualMods
0067 #endif
0068
0069 #include <X11/extensions/XKBstr.h>
0070 #include <X11/extensions/XKBproto.h>
0071 #include "inputstr.h"
0072
0073 typedef struct _XkbInterest {
0074 DeviceIntPtr dev;
0075 ClientPtr client;
0076 XID resource;
0077 struct _XkbInterest * next;
0078 CARD16 extDevNotifyMask;
0079 CARD16 stateNotifyMask;
0080 CARD16 namesNotifyMask;
0081 CARD32 ctrlsNotifyMask;
0082 CARD8 compatNotifyMask;
0083 BOOL bellNotifyMask;
0084 BOOL actionMessageMask;
0085 CARD16 accessXNotifyMask;
0086 CARD32 iStateNotifyMask;
0087 CARD32 iMapNotifyMask;
0088 CARD16 altSymsNotifyMask;
0089 CARD32 autoCtrls;
0090 CARD32 autoCtrlValues;
0091 } XkbInterestRec,*XkbInterestPtr;
0092
0093 typedef struct _XkbRadioGroup {
0094 CARD8 flags;
0095 CARD8 nMembers;
0096 CARD8 dfltDown;
0097 CARD8 currentDown;
0098 CARD8 members[XkbRGMaxMembers];
0099 } XkbRadioGroupRec, *XkbRadioGroupPtr;
0100
0101 typedef struct _XkbEventCause {
0102 CARD8 kc;
0103 CARD8 event;
0104 CARD8 mjr;
0105 CARD8 mnr;
0106 ClientPtr client;
0107 } XkbEventCauseRec,*XkbEventCausePtr;
0108 #define XkbSetCauseKey(c,k,e) { (c)->kc= (k),(c)->event= (e),\
0109 (c)->mjr= (c)->mnr= 0; \
0110 (c)->client= NULL; }
0111 #define XkbSetCauseReq(c,j,n,cl) { (c)->kc= (c)->event= 0,\
0112 (c)->mjr= (j),(c)->mnr= (n);\
0113 (c)->client= (cl); }
0114 #define XkbSetCauseCoreReq(c,e,cl) XkbSetCauseReq(c,e,0,cl)
0115 #define XkbSetCauseXkbReq(c,e,cl) XkbSetCauseReq(c,XkbReqCode,e,cl)
0116 #define XkbSetCauseUnknown(c) XkbSetCauseKey(c,0,0)
0117
0118 #define _OFF_TIMER 0
0119 #define _KRG_WARN_TIMER 1
0120 #define _KRG_TIMER 2
0121 #define _SK_TIMEOUT_TIMER 3
0122 #define _ALL_TIMEOUT_TIMER 4
0123
0124 #define _BEEP_NONE 0
0125 #define _BEEP_FEATURE_ON 1
0126 #define _BEEP_FEATURE_OFF 2
0127 #define _BEEP_FEATURE_CHANGE 3
0128 #define _BEEP_SLOW_WARN 4
0129 #define _BEEP_SLOW_PRESS 5
0130 #define _BEEP_SLOW_ACCEPT 6
0131 #define _BEEP_SLOW_REJECT 7
0132 #define _BEEP_SLOW_RELEASE 8
0133 #define _BEEP_STICKY_LATCH 9
0134 #define _BEEP_STICKY_LOCK 10
0135 #define _BEEP_STICKY_UNLOCK 11
0136 #define _BEEP_LED_ON 12
0137 #define _BEEP_LED_OFF 13
0138 #define _BEEP_LED_CHANGE 14
0139 #define _BEEP_BOUNCE_REJECT 15
0140
0141 typedef struct _XkbSrvInfo {
0142 XkbStateRec prev_state;
0143 XkbStateRec state;
0144 XkbDescPtr desc;
0145
0146 DeviceIntPtr device;
0147 KbdCtrlProcPtr kbdProc;
0148
0149 XkbRadioGroupPtr radioGroups;
0150 CARD8 nRadioGroups;
0151 CARD8 clearMods;
0152 CARD8 setMods;
0153 INT16 groupChange;
0154
0155 CARD16 dfltPtrDelta;
0156
0157 double mouseKeysCurve;
0158 double mouseKeysCurveFactor;
0159 INT16 mouseKeysDX;
0160 INT16 mouseKeysDY;
0161 CARD8 mouseKeysFlags;
0162 Bool mouseKeysAccel;
0163 CARD8 mouseKeysCounter;
0164
0165 CARD8 lockedPtrButtons;
0166 CARD8 shiftKeyCount;
0167 KeyCode mouseKey;
0168 KeyCode inactiveKey;
0169 KeyCode slowKey;
0170 KeyCode repeatKey;
0171 CARD8 krgTimerActive;
0172 CARD8 beepType;
0173 CARD8 beepCount;
0174
0175 CARD32 flags;
0176 CARD32 lastPtrEventTime;
0177 CARD32 lastShiftEventTime;
0178 OsTimerPtr beepTimer;
0179 OsTimerPtr mouseKeyTimer;
0180 OsTimerPtr slowKeysTimer;
0181 OsTimerPtr bounceKeysTimer;
0182 OsTimerPtr repeatKeyTimer;
0183 OsTimerPtr krgTimer;
0184 } XkbSrvInfoRec, *XkbSrvInfoPtr;
0185
0186 #define XkbSLI_IsDefault (1L<<0)
0187 #define XkbSLI_HasOwnState (1L<<1)
0188
0189 typedef struct _XkbSrvLedInfo {
0190 CARD16 flags;
0191 CARD16 class;
0192 CARD16 id;
0193 union {
0194 KbdFeedbackPtr kf;
0195 LedFeedbackPtr lf;
0196 } fb;
0197
0198 CARD32 physIndicators;
0199 CARD32 autoState;
0200 CARD32 explicitState;
0201 CARD32 effectiveState;
0202
0203 CARD32 mapsPresent;
0204 CARD32 namesPresent;
0205 XkbIndicatorMapPtr maps;
0206 Atom * names;
0207
0208 CARD32 usesBase;
0209 CARD32 usesLatched;
0210 CARD32 usesLocked;
0211 CARD32 usesEffective;
0212 CARD32 usesCompat;
0213 CARD32 usesControls;
0214
0215 CARD32 usedComponents;
0216 } XkbSrvLedInfoRec, *XkbSrvLedInfoPtr;
0217
0218
0219
0220
0221
0222 #define _XkbClientInitialized (1<<15)
0223
0224 #define _XkbWantsDetectableAutoRepeat(c)\
0225 ((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask)
0226
0227
0228
0229
0230 #define _XkbStateNotifyInProgress (1<<0)
0231
0232 typedef struct
0233 {
0234 ProcessInputProc processInputProc;
0235 ProcessInputProc realInputProc;
0236 DeviceUnwrapProc unwrapProc;
0237 } xkbDeviceInfoRec, *xkbDeviceInfoPtr;
0238
0239 #define WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
0240 device->public.processInputProc = proc; \
0241 oldprocs->processInputProc = \
0242 oldprocs->realInputProc = device->public.realInputProc; \
0243 device->public.realInputProc = proc; \
0244 oldprocs->unwrapProc = device->unwrapProc; \
0245 device->unwrapProc = unwrapproc;
0246
0247 #define COND_WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
0248 if (device->public.processInputProc == device->public.realInputProc)\
0249 device->public.processInputProc = proc; \
0250 oldprocs->processInputProc = \
0251 oldprocs->realInputProc = device->public.realInputProc; \
0252 device->public.realInputProc = proc; \
0253 oldprocs->unwrapProc = device->unwrapProc; \
0254 device->unwrapProc = unwrapproc;
0255
0256 #define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs) \
0257 device->public.processInputProc = oldprocs->processInputProc; \
0258 device->public.realInputProc = oldprocs->realInputProc; \
0259 device->unwrapProc = oldprocs->unwrapProc;
0260
0261 #define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr) (dev)->devPrivates[xkbDevicePrivateIndex].ptr)
0262
0263
0264
0265
0266
0267
0268 #define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask)
0269 #define XkbAllFilteredEventsMask \
0270 (XkbAccessXKeysMask|XkbRepeatKeysMask|XkbMouseKeysAccelMask|XkbAX_KRGMask)
0271
0272
0273
0274 extern int XkbReqCode;
0275 extern int XkbEventBase;
0276 extern int XkbKeyboardErrorCode;
0277 extern int XkbDisableLockActions;
0278 extern char * XkbBaseDirectory;
0279 extern char * XkbBinDirectory;
0280 extern char * XkbInitialMap;
0281 extern int _XkbClientMajor;
0282 extern int _XkbClientMinor;
0283 extern unsigned int XkbXIUnsupported;
0284
0285 extern char * XkbModelUsed,*XkbLayoutUsed,*XkbVariantUsed,*XkbOptionsUsed;
0286 extern Bool noXkbExtension;
0287 extern Bool XkbWantRulesProp;
0288
0289 extern pointer XkbLastRepeatEvent;
0290
0291 extern CARD32 xkbDebugFlags;
0292 extern CARD32 xkbDebugCtrls;
0293
0294 #define _XkbAlloc(s) xalloc((s))
0295 #define _XkbCalloc(n,s) Xcalloc((n)*(s))
0296 #define _XkbRealloc(o,s) Xrealloc((o),(s))
0297 #define _XkbTypedAlloc(t) ((t *)xalloc(sizeof(t)))
0298 #define _XkbTypedCalloc(n,t) ((t *)Xcalloc((n)*sizeof(t)))
0299 #define _XkbTypedRealloc(o,n,t) \
0300 ((o)?(t *)Xrealloc((o),(n)*sizeof(t)):_XkbTypedCalloc(n,t))
0301 #define _XkbClearElems(a,f,l,t) bzero(&(a)[f],((l)-(f)+1)*sizeof(t))
0302 #define _XkbFree(p) Xfree(p)
0303
0304 #define _XkbLibError(c,l,d) \
0305 { _XkbErrCode= (c); _XkbErrLocation= (l); _XkbErrData= (d); }
0306 #define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
0307 #define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
0308 #define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
0309
0310 extern int DeviceKeyPress,DeviceKeyRelease;
0311 extern int DeviceButtonPress,DeviceButtonRelease;
0312
0313 #ifdef XINPUT
0314 #define _XkbIsPressEvent(t) (((t)==KeyPress)||((t)==DeviceKeyPress))
0315 #define _XkbIsReleaseEvent(t) (((t)==KeyRelease)||((t)==DeviceKeyRelease))
0316 #else
0317 #define _XkbIsPressEvent(t) ((t)==KeyPress)
0318 #define _XkbIsReleaseEvent(t) ((t)==KeyRelease)
0319 #endif
0320
0321 #define _XkbCoreKeycodeInRange(c,k) (((k)>=(c)->curKeySyms.minKeyCode)&&\
0322 ((k)<=(c)->curKeySyms.maxKeyCode))
0323 #define _XkbCoreNumKeys(c) ((c)->curKeySyms.maxKeyCode-\
0324 (c)->curKeySyms.minKeyCode+1)
0325
0326 #define XConvertCase(s,l,u) XkbConvertCase(s,l,u)
0327 #undef IsKeypadKey
0328 #define IsKeypadKey(s) XkbKSIsKeypad(s)
0329
0330 typedef int Status;
0331 typedef pointer XPointer;
0332 typedef struct _XDisplay Display;
0333
0334 #ifndef True
0335 #define True 1
0336 #define False 0
0337 #endif
0338
0339 #ifndef PATH_MAX
0340 #ifdef MAXPATHLEN
0341 #define PATH_MAX MAXPATHLEN
0342 #else
0343 #define PATH_MAX 1024
0344 #endif
0345 #endif
0346
0347 _XFUNCPROTOBEGIN
0348
0349 extern void XkbUseMsg(
0350 void
0351 );
0352
0353 extern int XkbProcessArguments(
0354 int ,
0355 char ** ,
0356 int
0357 );
0358
0359 extern void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc);
0360
0361 extern void XkbFreeCompatMap(
0362 XkbDescPtr ,
0363 unsigned int ,
0364 Bool
0365 );
0366
0367 extern void XkbFreeNames(
0368 XkbDescPtr ,
0369 unsigned int ,
0370 Bool
0371 );
0372
0373 extern DeviceIntPtr _XkbLookupAnyDevice(
0374 int ,
0375 int *
0376 );
0377
0378 extern DeviceIntPtr _XkbLookupKeyboard(
0379 int ,
0380 int *
0381 );
0382
0383 extern DeviceIntPtr _XkbLookupBellDevice(
0384 int ,
0385 int *
0386 );
0387
0388 extern DeviceIntPtr _XkbLookupLedDevice(
0389 int ,
0390 int *
0391 );
0392
0393 extern DeviceIntPtr _XkbLookupButtonDevice(
0394 int ,
0395 int *
0396 );
0397
0398 extern XkbDescPtr XkbAllocKeyboard(
0399 void
0400 );
0401
0402 extern Status XkbAllocClientMap(
0403 XkbDescPtr ,
0404 unsigned int ,
0405 unsigned int
0406 );
0407
0408 extern Status XkbAllocServerMap(
0409 XkbDescPtr ,
0410 unsigned int ,
0411 unsigned int
0412 );
0413
0414 extern void XkbFreeClientMap(
0415 XkbDescPtr ,
0416 unsigned int ,
0417 Bool
0418 );
0419
0420 extern void XkbFreeServerMap(
0421 XkbDescPtr ,
0422 unsigned int ,
0423 Bool
0424 );
0425
0426 extern Status XkbAllocIndicatorMaps(
0427 XkbDescPtr
0428 );
0429
0430 extern Status XkbAllocCompatMap(
0431 XkbDescPtr ,
0432 unsigned int ,
0433 unsigned int
0434 );
0435
0436 extern Status XkbAllocNames(
0437 XkbDescPtr ,
0438 unsigned int ,
0439 int ,
0440 int
0441 );
0442
0443 extern Status XkbAllocControls(
0444 XkbDescPtr ,
0445 unsigned int
0446 );
0447
0448 extern Status XkbCopyKeyType(
0449 XkbKeyTypePtr ,
0450 XkbKeyTypePtr
0451 );
0452
0453 extern Status XkbCopyKeyTypes(
0454 XkbKeyTypePtr ,
0455 XkbKeyTypePtr ,
0456 int
0457 );
0458
0459 extern Status XkbResizeKeyType(
0460 XkbDescPtr ,
0461 int ,
0462 int ,
0463 Bool ,
0464 int
0465 );
0466
0467 extern void XkbFreeKeyboard(
0468 XkbDescPtr ,
0469 unsigned int ,
0470 Bool
0471 );
0472
0473 extern void XkbSetActionKeyMods(
0474 XkbDescPtr ,
0475 XkbAction * ,
0476 unsigned int
0477 );
0478
0479 extern Bool XkbCheckActionVMods(
0480 XkbDescPtr ,
0481 XkbAction * ,
0482 unsigned int
0483 );
0484
0485 extern Bool XkbApplyVModChanges(
0486 XkbSrvInfoPtr ,
0487 unsigned int ,
0488 XkbChangesPtr ,
0489 unsigned int * ,
0490 XkbEventCausePtr
0491 );
0492
0493 extern void XkbApplyVModChangesToAllDevices(
0494 DeviceIntPtr ,
0495 XkbDescPtr ,
0496 unsigned int ,
0497 XkbEventCausePtr
0498 );
0499
0500 extern unsigned int XkbMaskForVMask(
0501 XkbDescPtr ,
0502 unsigned int
0503 );
0504
0505 extern Bool XkbVirtualModsToReal(
0506 XkbDescPtr ,
0507 unsigned int ,
0508 unsigned int *
0509 );
0510
0511 extern unsigned int XkbAdjustGroup(
0512 int ,
0513 XkbControlsPtr
0514 );
0515
0516 extern KeySym *XkbResizeKeySyms(
0517 XkbDescPtr ,
0518 int ,
0519 int
0520 );
0521
0522 extern XkbAction *XkbResizeKeyActions(
0523 XkbDescPtr ,
0524 int ,
0525 int
0526 );
0527
0528 extern void XkbUpdateKeyTypesFromCore(
0529 DeviceIntPtr ,
0530 KeyCode ,
0531 CARD8 ,
0532 XkbChangesPtr
0533 );
0534
0535 extern void XkbUpdateDescActions(
0536 XkbDescPtr ,
0537 KeyCode ,
0538 CARD8 ,
0539 XkbChangesPtr
0540 );
0541
0542 extern void XkbUpdateActions(
0543 DeviceIntPtr ,
0544 KeyCode ,
0545 CARD8 ,
0546 XkbChangesPtr ,
0547 unsigned int * ,
0548 XkbEventCausePtr
0549 );
0550
0551 extern void XkbUpdateCoreDescription(
0552 DeviceIntPtr ,
0553 Bool
0554 );
0555
0556 extern void XkbApplyMappingChange(
0557 DeviceIntPtr ,
0558 CARD8 ,
0559 KeyCode ,
0560 CARD8 ,
0561 ClientPtr
0562 );
0563
0564 extern void XkbSetIndicators(
0565 DeviceIntPtr ,
0566 CARD32 ,
0567 CARD32 ,
0568 XkbEventCausePtr
0569 );
0570
0571 extern void XkbUpdateIndicators(
0572 DeviceIntPtr ,
0573 CARD32 ,
0574 Bool ,
0575 XkbChangesPtr ,
0576 XkbEventCausePtr
0577 );
0578
0579 extern XkbSrvLedInfoPtr XkbAllocSrvLedInfo(
0580 DeviceIntPtr ,
0581 KbdFeedbackPtr ,
0582 LedFeedbackPtr ,
0583 unsigned int
0584 );
0585
0586 extern XkbSrvLedInfoPtr XkbFindSrvLedInfo(
0587 DeviceIntPtr ,
0588 unsigned int ,
0589 unsigned int ,
0590 unsigned int
0591 );
0592
0593 extern void XkbApplyLedNameChanges(
0594 DeviceIntPtr ,
0595 XkbSrvLedInfoPtr ,
0596 unsigned int ,
0597 xkbExtensionDeviceNotify * ,
0598 XkbChangesPtr ,
0599 XkbEventCausePtr
0600 );
0601
0602 extern void XkbApplyLedMapChanges(
0603 DeviceIntPtr ,
0604 XkbSrvLedInfoPtr ,
0605 unsigned int ,
0606 xkbExtensionDeviceNotify * ,
0607 XkbChangesPtr ,
0608 XkbEventCausePtr
0609 );
0610
0611 extern void XkbApplyLedStateChanges(
0612 DeviceIntPtr ,
0613 XkbSrvLedInfoPtr ,
0614 unsigned int ,
0615 xkbExtensionDeviceNotify * ,
0616 XkbChangesPtr ,
0617 XkbEventCausePtr
0618 );
0619
0620 extern void XkbUpdateLedAutoState(
0621 DeviceIntPtr ,
0622 XkbSrvLedInfoPtr ,
0623 unsigned int ,
0624 xkbExtensionDeviceNotify * ,
0625 XkbChangesPtr ,
0626 XkbEventCausePtr
0627 );
0628
0629 extern void XkbFlushLedEvents(
0630 DeviceIntPtr ,
0631 DeviceIntPtr ,
0632 XkbSrvLedInfoPtr ,
0633 xkbExtensionDeviceNotify * ,
0634 XkbChangesPtr ,
0635 XkbEventCausePtr
0636 );
0637
0638 extern void XkbUpdateAllDeviceIndicators(
0639 XkbChangesPtr ,
0640 XkbEventCausePtr
0641 );
0642
0643 extern unsigned int XkbIndicatorsToUpdate(
0644 DeviceIntPtr ,
0645 unsigned long ,
0646 Bool
0647 );
0648
0649 extern void XkbComputeDerivedState(
0650 XkbSrvInfoPtr
0651 );
0652
0653 extern void XkbCheckSecondaryEffects(
0654 XkbSrvInfoPtr ,
0655 unsigned int ,
0656 XkbChangesPtr ,
0657 XkbEventCausePtr
0658 );
0659
0660 extern void XkbCheckIndicatorMaps(
0661 DeviceIntPtr ,
0662 XkbSrvLedInfoPtr ,
0663 unsigned int
0664 );
0665
0666 extern unsigned int XkbStateChangedFlags(
0667 XkbStatePtr ,
0668 XkbStatePtr
0669 );
0670
0671 extern void XkbSendStateNotify(
0672 DeviceIntPtr ,
0673 xkbStateNotify *
0674 );
0675
0676 extern void XkbSendMapNotify(
0677 DeviceIntPtr ,
0678 xkbMapNotify *
0679 );
0680
0681 extern int XkbComputeControlsNotify(
0682 DeviceIntPtr ,
0683 XkbControlsPtr ,
0684 XkbControlsPtr ,
0685 xkbControlsNotify * ,
0686 Bool
0687 );
0688
0689 extern void XkbSendControlsNotify(
0690 DeviceIntPtr ,
0691 xkbControlsNotify *
0692 );
0693
0694 extern void XkbSendCompatMapNotify(
0695 DeviceIntPtr ,
0696 xkbCompatMapNotify *
0697 );
0698
0699 extern void XkbSendIndicatorNotify(
0700 DeviceIntPtr ,
0701 int ,
0702 xkbIndicatorNotify *
0703 );
0704
0705 extern void XkbHandleBell(
0706 BOOL ,
0707 BOOL ,
0708 DeviceIntPtr ,
0709 CARD8 ,
0710 pointer ,
0711 CARD8 ,
0712 Atom ,
0713 WindowPtr ,
0714 ClientPtr
0715 );
0716
0717 extern void XkbSendAccessXNotify(
0718 DeviceIntPtr ,
0719 xkbAccessXNotify *
0720 );
0721
0722 extern void XkbSendNamesNotify(
0723 DeviceIntPtr ,
0724 xkbNamesNotify *
0725 );
0726
0727 extern void XkbSendCompatNotify(
0728 DeviceIntPtr ,
0729 xkbCompatMapNotify *
0730 );
0731
0732 extern void XkbSendActionMessage(
0733 DeviceIntPtr ,
0734 xkbActionMessage *
0735 );
0736
0737 extern void XkbSendExtensionDeviceNotify(
0738 DeviceIntPtr ,
0739 ClientPtr ,
0740 xkbExtensionDeviceNotify *
0741 );
0742
0743 extern void XkbSendNotification(
0744 DeviceIntPtr ,
0745 XkbChangesPtr ,
0746 XkbEventCausePtr
0747 );
0748
0749 extern void XkbProcessKeyboardEvent(
0750 struct _xEvent * ,
0751 DeviceIntPtr ,
0752 int
0753 );
0754
0755 extern void XkbProcessOtherEvent(
0756 struct _xEvent * ,
0757 DeviceIntPtr ,
0758 int
0759 );
0760
0761 extern void XkbHandleActions(
0762 DeviceIntPtr ,
0763 DeviceIntPtr ,
0764 struct _xEvent * ,
0765 int
0766 );
0767
0768 extern Bool XkbEnableDisableControls(
0769 XkbSrvInfoPtr ,
0770 unsigned long ,
0771 unsigned long ,
0772 XkbChangesPtr ,
0773 XkbEventCausePtr
0774 );
0775
0776 extern void AccessXInit(
0777 DeviceIntPtr
0778 );
0779
0780 extern Bool AccessXFilterPressEvent(
0781 register struct _xEvent * ,
0782 register DeviceIntPtr ,
0783 int
0784 );
0785
0786 extern Bool AccessXFilterReleaseEvent(
0787 register struct _xEvent * ,
0788 register DeviceIntPtr ,
0789 int
0790 );
0791
0792 extern void AccessXCancelRepeatKey(
0793 XkbSrvInfoPtr ,
0794 KeyCode
0795 );
0796
0797 extern void AccessXComputeCurveFactor(
0798 XkbSrvInfoPtr ,
0799 XkbControlsPtr
0800 );
0801
0802 extern XkbDeviceLedInfoPtr XkbAddDeviceLedInfo(
0803 XkbDeviceInfoPtr ,
0804 unsigned int ,
0805 unsigned int
0806 );
0807
0808 extern XkbDeviceInfoPtr XkbAllocDeviceInfo(
0809 unsigned int ,
0810 unsigned int ,
0811 unsigned int
0812 );
0813
0814 extern void XkbFreeDeviceInfo(
0815 XkbDeviceInfoPtr ,
0816 unsigned int ,
0817 Bool
0818 );
0819
0820 extern Status XkbResizeDeviceButtonActions(
0821 XkbDeviceInfoPtr ,
0822 unsigned int
0823 );
0824
0825 extern XkbInterestPtr XkbFindClientResource(
0826 DevicePtr ,
0827 ClientPtr
0828 );
0829
0830 extern XkbInterestPtr XkbAddClientResource(
0831 DevicePtr ,
0832 ClientPtr ,
0833 XID
0834 );
0835
0836 extern int XkbRemoveClient(
0837 DevicePtr ,
0838 ClientPtr
0839 );
0840
0841 extern int XkbRemoveResourceClient(
0842 DevicePtr ,
0843 XID
0844 );
0845
0846 extern int XkbDDXInitDevice(
0847 DeviceIntPtr
0848 );
0849
0850 extern int XkbDDXAccessXBeep(
0851 DeviceIntPtr ,
0852 unsigned int ,
0853 unsigned int
0854 );
0855
0856 extern void XkbDDXKeyClick(
0857 DeviceIntPtr ,
0858 int ,
0859 int
0860 );
0861
0862 extern int XkbDDXUsesSoftRepeat(
0863 DeviceIntPtr
0864 );
0865
0866 extern void XkbDDXKeybdCtrlProc(
0867 DeviceIntPtr ,
0868 KeybdCtrl *
0869 );
0870
0871 extern void XkbDDXChangeControls(
0872 DeviceIntPtr ,
0873 XkbControlsPtr ,
0874 XkbControlsPtr
0875 );
0876
0877 extern void XkbDDXUpdateIndicators(
0878 DeviceIntPtr ,
0879 CARD32
0880 );
0881
0882 extern void XkbDDXUpdateDeviceIndicators(
0883 DeviceIntPtr ,
0884 XkbSrvLedInfoPtr ,
0885 CARD32
0886 );
0887
0888 extern void XkbDDXFakePointerButton(
0889 int ,
0890 int
0891 );
0892
0893 extern void XkbDDXFakePointerMotion(
0894 unsigned int ,
0895 int ,
0896 int
0897 );
0898
0899 extern void XkbDDXFakeDeviceButton(
0900 DeviceIntPtr ,
0901 Bool ,
0902 int
0903 );
0904
0905 extern int XkbDDXTerminateServer(
0906 DeviceIntPtr ,
0907 KeyCode ,
0908 XkbAction *
0909 );
0910
0911 extern int XkbDDXSwitchScreen(
0912 DeviceIntPtr ,
0913 KeyCode ,
0914 XkbAction *
0915 );
0916
0917 extern int XkbDDXPrivate(
0918 DeviceIntPtr ,
0919 KeyCode ,
0920 XkbAction *
0921 );
0922
0923 extern void XkbDisableComputedAutoRepeats(
0924 DeviceIntPtr ,
0925 unsigned int
0926 );
0927
0928 extern void XkbSetRepeatKeys(
0929 DeviceIntPtr ,
0930 int ,
0931 int
0932 );
0933
0934 extern int XkbLatchModifiers(
0935 DeviceIntPtr ,
0936 CARD8 ,
0937 CARD8
0938 );
0939
0940 extern int XkbLatchGroup(
0941 DeviceIntPtr ,
0942 int
0943 );
0944
0945 extern void XkbClearAllLatchesAndLocks(
0946 DeviceIntPtr ,
0947 XkbSrvInfoPtr ,
0948 Bool ,
0949 XkbEventCausePtr
0950 );
0951
0952 extern void XkbSetRulesDflts(
0953 char * ,
0954 char * ,
0955 char * ,
0956 char * ,
0957 char *
0958 );
0959
0960 extern void XkbInitDevice(
0961 DeviceIntPtr
0962 );
0963
0964 extern Bool XkbInitKeyboardDeviceStruct(
0965 DeviceIntPtr ,
0966 XkbComponentNamesPtr ,
0967 KeySymsPtr ,
0968 CARD8 [],
0969 BellProcPtr ,
0970 KbdCtrlProcPtr
0971 );
0972
0973 extern int SProcXkbDispatch(
0974 ClientPtr
0975 );
0976
0977 extern XkbGeometryPtr XkbLookupNamedGeometry(
0978 DeviceIntPtr ,
0979 Atom ,
0980 Bool *
0981 );
0982
0983 extern char * _XkbDupString(
0984 char *
0985 );
0986
0987 extern void XkbConvertCase(
0988 KeySym ,
0989 KeySym * ,
0990 KeySym *
0991 );
0992
0993 extern Status XkbChangeKeycodeRange(
0994 XkbDescPtr ,
0995 int ,
0996 int ,
0997 XkbChangesPtr
0998 );
0999
1000 extern int XkbFinishDeviceInit(
1001 DeviceIntPtr
1002 );
1003
1004 extern void XkbFreeSrvLedInfo(
1005 XkbSrvLedInfoPtr
1006 );
1007
1008 extern void XkbFreeInfo(
1009 XkbSrvInfoPtr
1010 );
1011
1012 extern Status XkbChangeTypesOfKey(
1013 XkbDescPtr ,
1014 int ,
1015 int ,
1016 unsigned int ,
1017 int * ,
1018 XkbMapChangesPtr
1019 );
1020
1021 extern XkbKeyTypePtr XkbAddKeyType(
1022 XkbDescPtr ,
1023 Atom ,
1024 int ,
1025 Bool ,
1026 int
1027 );
1028
1029 extern Status XkbInitCanonicalKeyTypes(
1030 XkbDescPtr ,
1031 unsigned int ,
1032 int
1033 );
1034
1035 extern int XkbKeyTypesForCoreSymbols(
1036 XkbDescPtr ,
1037 int ,
1038 KeySym * ,
1039 unsigned int ,
1040 int * ,
1041 KeySym *
1042 );
1043
1044 extern Bool XkbApplyCompatMapToKey(
1045 XkbDescPtr ,
1046 KeyCode ,
1047 XkbChangesPtr
1048 );
1049
1050 extern Bool XkbUpdateMapFromCore(
1051 XkbDescPtr ,
1052 KeyCode ,
1053 int ,
1054 int ,
1055 KeySym * ,
1056 XkbChangesPtr
1057 );
1058
1059 extern void XkbFreeControls(
1060 XkbDescPtr ,
1061 unsigned int ,
1062 Bool
1063 );
1064
1065 extern void XkbFreeIndicatorMaps(
1066 XkbDescPtr
1067 );
1068
1069 extern Bool XkbApplyVirtualModChanges(
1070 XkbDescPtr ,
1071 unsigned int ,
1072 XkbChangesPtr
1073 );
1074
1075 extern Bool XkbUpdateActionVirtualMods(
1076 XkbDescPtr ,
1077 XkbAction * ,
1078 unsigned int
1079 );
1080
1081 extern void XkbUpdateKeyTypeVirtualMods(
1082 XkbDescPtr ,
1083 XkbKeyTypePtr ,
1084 unsigned int ,
1085 XkbChangesPtr
1086 );
1087
1088 extern void XkbSendNewKeyboardNotify(
1089 DeviceIntPtr ,
1090 xkbNewKeyboardNotify *
1091 );
1092
1093 #ifdef XKBSRV_NEED_FILE_FUNCS
1094
1095 #include <X11/extensions/XKMformat.h>
1096 #include <X11/extensions/XKBfile.h>
1097 #include <X11/extensions/XKBrules.h>
1098
1099 #define _XkbListKeymaps 0
1100 #define _XkbListKeycodes 1
1101 #define _XkbListTypes 2
1102 #define _XkbListCompat 3
1103 #define _XkbListSymbols 4
1104 #define _XkbListGeometry 5
1105 #define _XkbListNumComponents 6
1106
1107 typedef struct _XkbSrvListInfo {
1108 int szPool;
1109 int nPool;
1110 char * pool;
1111
1112 int maxRtrn;
1113 int nTotal;
1114
1115 char * pattern[_XkbListNumComponents];
1116 int nFound[_XkbListNumComponents];
1117 } XkbSrvListInfoRec,*XkbSrvListInfoPtr;
1118
1119 char *
1120 XkbGetRulesDflts(
1121 XkbRF_VarDefsPtr
1122 );
1123
1124 extern void XkbSetRulesUsed(
1125 XkbRF_VarDefsPtr
1126 );
1127
1128
1129 extern Status XkbDDXList(
1130 DeviceIntPtr ,
1131 XkbSrvListInfoPtr ,
1132 ClientPtr
1133 );
1134
1135 extern unsigned int XkbDDXLoadKeymapByNames(
1136 DeviceIntPtr ,
1137 XkbComponentNamesPtr ,
1138 unsigned int ,
1139 unsigned int ,
1140 XkbFileInfoPtr ,
1141 char * ,
1142 int
1143 );
1144
1145 extern Bool XkbDDXNamesFromRules(
1146 DeviceIntPtr ,
1147 char * ,
1148 XkbRF_VarDefsPtr ,
1149 XkbComponentNamesPtr
1150 );
1151
1152 extern FILE *XkbDDXOpenConfigFile(
1153 char * ,
1154 char * ,
1155 int
1156 );
1157
1158 extern Bool XkbDDXApplyConfig(
1159 XPointer ,
1160 XkbSrvInfoPtr
1161 );
1162
1163 extern XPointer XkbDDXPreloadConfig(
1164 char ** ,
1165 XkbRF_VarDefsPtr ,
1166 XkbComponentNamesPtr ,
1167 DeviceIntPtr
1168 );
1169
1170 extern int _XkbStrCaseCmp(
1171 char * ,
1172 char *
1173 );
1174
1175 #endif
1176
1177
1178 _XFUNCPROTOEND
1179
1180 #define XkbAtomGetString(d,s) NameForAtom(s)
1181
1182 #endif
1183
1184