VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.4.2/xkbsrv.h@ 62425

最後變更 在這個檔案從62425是 43272,由 vboxsync 提交於 12 年 前

Additions/x11: more original X server headers.

  • 屬性 svn:eol-style 設為 native
檔案大小: 24.8 KB
 
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#ifdef XKB_IN_SERVER
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
55#endif
56
57#include <X11/extensions/XKBstr.h>
58#include <X11/extensions/XKBproto.h>
59#include "inputstr.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#define XkbSetCauseKey(c,k,e) { (c)->kc= (k),(c)->event= (e),\
97 (c)->mjr= (c)->mnr= 0; \
98 (c)->client= NULL; }
99#define XkbSetCauseReq(c,j,n,cl) { (c)->kc= (c)->event= 0,\
100 (c)->mjr= (j),(c)->mnr= (n);\
101 (c)->client= (cl); }
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)
105
106#define _OFF_TIMER 0
107#define _KRG_WARN_TIMER 1
108#define _KRG_TIMER 2
109#define _SK_TIMEOUT_TIMER 3
110#define _ALL_TIMEOUT_TIMER 4
111
112#define _BEEP_NONE 0
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
128
129struct _XkbSrvInfo; /* definition see below */
130
131typedef struct _XkbFilter {
132 CARD16 keycode;
133 CARD8 what;
134 CARD8 active;
135 CARD8 filterOthers;
136 CARD32 priv;
137 XkbAction upAction;
138 int (*filter)(
139 struct _XkbSrvInfo* /* xkbi */,
140 struct _XkbFilter * /* filter */,
141 unsigned /* keycode */,
142 XkbAction * /* action */
143 );
144 struct _XkbFilter *next;
145} XkbFilterRec,*XkbFilterPtr;
146
147typedef struct _XkbSrvInfo {
148 XkbStateRec prev_state;
149 XkbStateRec state;
150 XkbDescPtr desc;
151
152 DeviceIntPtr device;
153 KbdCtrlProcPtr kbdProc;
154
155 XkbRadioGroupPtr radioGroups;
156 CARD8 nRadioGroups;
157 CARD8 clearMods;
158 CARD8 setMods;
159 INT16 groupChange;
160
161 CARD16 dfltPtrDelta;
162
163 double mouseKeysCurve;
164 double mouseKeysCurveFactor;
165 INT16 mouseKeysDX;
166 INT16 mouseKeysDY;
167 CARD8 mouseKeysFlags;
168 Bool mouseKeysAccel;
169 CARD8 mouseKeysCounter;
170
171 CARD8 lockedPtrButtons;
172 CARD8 shiftKeyCount;
173 KeyCode mouseKey;
174 KeyCode inactiveKey;
175 KeyCode slowKey;
176 KeyCode repeatKey;
177 CARD8 krgTimerActive;
178 CARD8 beepType;
179 CARD8 beepCount;
180
181 CARD32 flags;
182 CARD32 lastPtrEventTime;
183 CARD32 lastShiftEventTime;
184 OsTimerPtr beepTimer;
185 OsTimerPtr mouseKeyTimer;
186 OsTimerPtr slowKeysTimer;
187 OsTimerPtr bounceKeysTimer;
188 OsTimerPtr repeatKeyTimer;
189 OsTimerPtr krgTimer;
190
191 int szFilters;
192 XkbFilterPtr filters;
193} XkbSrvInfoRec, *XkbSrvInfoPtr;
194
195#define XkbSLI_IsDefault (1L<<0)
196#define XkbSLI_HasOwnState (1L<<1)
197
198typedef struct _XkbSrvLedInfo {
199 CARD16 flags;
200 CARD16 class;
201 CARD16 id;
202 union {
203 KbdFeedbackPtr kf;
204 LedFeedbackPtr lf;
205 } fb;
206
207 CARD32 physIndicators;
208 CARD32 autoState;
209 CARD32 explicitState;
210 CARD32 effectiveState;
211
212 CARD32 mapsPresent;
213 CARD32 namesPresent;
214 XkbIndicatorMapPtr maps;
215 Atom * names;
216
217 CARD32 usesBase;
218 CARD32 usesLatched;
219 CARD32 usesLocked;
220 CARD32 usesEffective;
221 CARD32 usesCompat;
222 CARD32 usesControls;
223
224 CARD32 usedComponents;
225} XkbSrvLedInfoRec, *XkbSrvLedInfoPtr;
226
227/*
228 * Settings for xkbClientFlags field (used by DIX)
229 * These flags _must_ not overlap with XkbPCF_*
230 */
231#define _XkbClientInitialized (1<<15)
232
233#define _XkbWantsDetectableAutoRepeat(c)\
234 ((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask)
235
236/*
237 * Settings for flags field
238 */
239#define _XkbStateNotifyInProgress (1<<0)
240
241typedef struct
242{
243 ProcessInputProc processInputProc;
244 /* If processInputProc is set to something different than realInputProc,
245 * UNWRAP and COND_WRAP will not touch processInputProc and update only
246 * realInputProc. This ensures that
247 * processInputProc == (frozen ? EnqueueEvent : realInputProc)
248 *
249 * WRAP_PROCESS_INPUT_PROC should only be called during initialization,
250 * since it may destroy this invariant.
251 */
252 ProcessInputProc realInputProc;
253 DeviceUnwrapProc unwrapProc;
254} xkbDeviceInfoRec, *xkbDeviceInfoPtr;
255
256#define WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
257 device->public.processInputProc = proc; \
258 oldprocs->processInputProc = \
259 oldprocs->realInputProc = device->public.realInputProc; \
260 device->public.realInputProc = proc; \
261 oldprocs->unwrapProc = device->unwrapProc; \
262 device->unwrapProc = unwrapproc;
263
264#define COND_WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
265 if (device->public.processInputProc == device->public.realInputProc)\
266 device->public.processInputProc = proc; \
267 oldprocs->processInputProc = \
268 oldprocs->realInputProc = device->public.realInputProc; \
269 device->public.realInputProc = proc; \
270 oldprocs->unwrapProc = device->unwrapProc; \
271 device->unwrapProc = unwrapproc;
272
273#define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs, backupproc) \
274 backupproc = device->public.realInputProc; \
275 if (device->public.processInputProc == device->public.realInputProc)\
276 device->public.processInputProc = oldprocs->realInputProc; \
277 device->public.realInputProc = oldprocs->realInputProc; \
278 device->unwrapProc = oldprocs->unwrapProc;
279
280extern int xkbDevicePrivateIndex;
281#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr) (dev)->devPrivates[xkbDevicePrivateIndex].ptr)
282
283extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
284
285/***====================================================================***/
286
287
288/***====================================================================***/
289
290#define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask)
291#define XkbAllFilteredEventsMask \
292 (XkbAccessXKeysMask|XkbRepeatKeysMask|XkbMouseKeysAccelMask|XkbAX_KRGMask)
293
294/***====================================================================***/
295
296extern int XkbReqCode;
297extern int XkbEventBase;
298extern int XkbDisableLockActions;
299extern char * XkbBaseDirectory;
300extern char * XkbBinDirectory;
301extern char * XkbInitialMap;
302extern unsigned int XkbXIUnsupported;
303
304extern Bool noXkbExtension;
305
306extern pointer XkbLastRepeatEvent;
307
308extern CARD32 xkbDebugFlags;
309
310#define _XkbAlloc(s) xalloc((s))
311#define _XkbCalloc(n,s) Xcalloc((n)*(s))
312#define _XkbRealloc(o,s) Xrealloc((o),(s))
313#define _XkbTypedAlloc(t) ((t *)xalloc(sizeof(t)))
314#define _XkbTypedCalloc(n,t) ((t *)Xcalloc((n)*sizeof(t)))
315#define _XkbTypedRealloc(o,n,t) \
316 ((o)?(t *)Xrealloc((o),(n)*sizeof(t)):_XkbTypedCalloc(n,t))
317#define _XkbClearElems(a,f,l,t) bzero(&(a)[f],((l)-(f)+1)*sizeof(t))
318#define _XkbFree(p) Xfree(p)
319
320#define _XkbLibError(c,l,d) \
321 { _XkbErrCode= (c); _XkbErrLocation= (l); _XkbErrData= (d); }
322#define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
323#define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
324#define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
325
326extern int DeviceKeyPress,DeviceKeyRelease,DeviceMotionNotify;
327extern int DeviceButtonPress,DeviceButtonRelease;
328extern int DeviceEnterNotify,DeviceLeaveNotify;
329
330#ifdef XINPUT
331#define _XkbIsPressEvent(t) (((t)==KeyPress)||((t)==DeviceKeyPress))
332#define _XkbIsReleaseEvent(t) (((t)==KeyRelease)||((t)==DeviceKeyRelease))
333#else
334#define _XkbIsPressEvent(t) ((t)==KeyPress)
335#define _XkbIsReleaseEvent(t) ((t)==KeyRelease)
336#endif
337
338#define _XkbCoreKeycodeInRange(c,k) (((k)>=(c)->curKeySyms.minKeyCode)&&\
339 ((k)<=(c)->curKeySyms.maxKeyCode))
340#define _XkbCoreNumKeys(c) ((c)->curKeySyms.maxKeyCode-\
341 (c)->curKeySyms.minKeyCode+1)
342
343#define XConvertCase(s,l,u) XkbConvertCase(s,l,u)
344#undef IsKeypadKey
345#define IsKeypadKey(s) XkbKSIsKeypad(s)
346
347#define Status int
348#define XPointer pointer
349#define Display struct _XDisplay
350
351#ifndef True
352#define True 1
353#define False 0
354#endif
355
356#ifndef PATH_MAX
357#ifdef MAXPATHLEN
358#define PATH_MAX MAXPATHLEN
359#else
360#define PATH_MAX 1024
361#endif
362#endif
363
364_XFUNCPROTOBEGIN
365
366extern void XkbUseMsg(
367 void
368);
369
370extern int XkbProcessArguments(
371 int /* argc */,
372 char ** /* argv */,
373 int /* i */
374);
375
376extern void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc);
377
378extern void XkbFreeCompatMap(
379 XkbDescPtr /* xkb */,
380 unsigned int /* which */,
381 Bool /* freeMap */
382);
383
384extern void XkbFreeNames(
385 XkbDescPtr /* xkb */,
386 unsigned int /* which */,
387 Bool /* freeMap */
388);
389
390extern DeviceIntPtr _XkbLookupAnyDevice(
391 int /* id */,
392 int * /* why_rtrn */
393);
394
395extern DeviceIntPtr _XkbLookupKeyboard(
396 int /* id */,
397 int * /* why_rtrn */
398);
399
400extern DeviceIntPtr _XkbLookupBellDevice(
401 int /* id */,
402 int * /* why_rtrn */
403);
404
405extern DeviceIntPtr _XkbLookupLedDevice(
406 int /* id */,
407 int * /* why_rtrn */
408);
409
410extern DeviceIntPtr _XkbLookupButtonDevice(
411 int /* id */,
412 int * /* why_rtrn */
413);
414
415extern XkbDescPtr XkbAllocKeyboard(
416 void
417);
418
419extern Status XkbAllocClientMap(
420 XkbDescPtr /* xkb */,
421 unsigned int /* which */,
422 unsigned int /* nTypes */
423);
424
425extern Status XkbAllocServerMap(
426 XkbDescPtr /* xkb */,
427 unsigned int /* which */,
428 unsigned int /* nNewActions */
429);
430
431extern void XkbFreeClientMap(
432 XkbDescPtr /* xkb */,
433 unsigned int /* what */,
434 Bool /* freeMap */
435);
436
437extern void XkbFreeServerMap(
438 XkbDescPtr /* xkb */,
439 unsigned int /* what */,
440 Bool /* freeMap */
441);
442
443extern Status XkbAllocIndicatorMaps(
444 XkbDescPtr /* xkb */
445);
446
447extern Status XkbAllocCompatMap(
448 XkbDescPtr /* xkb */,
449 unsigned int /* which */,
450 unsigned int /* nInterpret */
451);
452
453extern Status XkbAllocNames(
454 XkbDescPtr /* xkb */,
455 unsigned int /* which */,
456 int /* nTotalRG */,
457 int /* nTotalAliases */
458);
459
460extern Status XkbAllocControls(
461 XkbDescPtr /* xkb */,
462 unsigned int /* which*/
463);
464
465extern Status XkbCopyKeyTypes(
466 XkbKeyTypePtr /* from */,
467 XkbKeyTypePtr /* into */,
468 int /* num_types */
469);
470
471extern Status XkbResizeKeyType(
472 XkbDescPtr /* xkb */,
473 int /* type_ndx */,
474 int /* map_count */,
475 Bool /* want_preserve */,
476 int /* new_num_lvls */
477);
478
479extern void XkbFreeKeyboard(
480 XkbDescPtr /* xkb */,
481 unsigned int /* which */,
482 Bool /* freeDesc */
483);
484
485extern void XkbSetActionKeyMods(
486 XkbDescPtr /* xkb */,
487 XkbAction * /* act */,
488 unsigned int /* mods */
489);
490
491extern Bool XkbCheckActionVMods(
492 XkbDescPtr /* xkb */,
493 XkbAction * /* act */,
494 unsigned int /* changed */
495);
496
497extern unsigned int XkbMaskForVMask(
498 XkbDescPtr /* xkb */,
499 unsigned int /* vmask */
500);
501
502extern Bool XkbVirtualModsToReal(
503 XkbDescPtr /* xkb */,
504 unsigned int /* virtua_mask */,
505 unsigned int * /* mask_rtrn */
506);
507
508extern unsigned int XkbAdjustGroup(
509 int /* group */,
510 XkbControlsPtr /* ctrls */
511);
512
513extern KeySym *XkbResizeKeySyms(
514 XkbDescPtr /* xkb */,
515 int /* key */,
516 int /* needed */
517);
518
519extern XkbAction *XkbResizeKeyActions(
520 XkbDescPtr /* xkb */,
521 int /* key */,
522 int /* needed */
523);
524
525extern void XkbUpdateKeyTypesFromCore(
526 DeviceIntPtr /* pXDev */,
527 KeyCode /* first */,
528 CARD8 /* num */,
529 XkbChangesPtr /* pChanges */
530);
531
532extern void XkbUpdateDescActions(
533 XkbDescPtr /* xkb */,
534 KeyCode /* first */,
535 CARD8 /* num */,
536 XkbChangesPtr /* changes */
537);
538
539extern void XkbUpdateActions(
540 DeviceIntPtr /* pXDev */,
541 KeyCode /* first */,
542 CARD8 /* num */,
543 XkbChangesPtr /* pChanges */,
544 unsigned int * /* needChecksRtrn */,
545 XkbEventCausePtr /* cause */
546);
547
548extern void XkbUpdateCoreDescription(
549 DeviceIntPtr /* keybd */,
550 Bool /* resize */
551);
552
553extern void XkbApplyMappingChange(
554 DeviceIntPtr /* pXDev */,
555 CARD8 /* request */,
556 KeyCode /* firstKey */,
557 CARD8 /* num */,
558 ClientPtr /* client */
559);
560
561extern void XkbSetIndicators(
562 DeviceIntPtr /* pXDev */,
563 CARD32 /* affect */,
564 CARD32 /* values */,
565 XkbEventCausePtr /* cause */
566);
567
568extern void XkbUpdateIndicators(
569 DeviceIntPtr /* keybd */,
570 CARD32 /* changed */,
571 Bool /* check_edevs */,
572 XkbChangesPtr /* pChanges */,
573 XkbEventCausePtr /* cause */
574);
575
576extern XkbSrvLedInfoPtr XkbAllocSrvLedInfo(
577 DeviceIntPtr /* dev */,
578 KbdFeedbackPtr /* kf */,
579 LedFeedbackPtr /* lf */,
580 unsigned int /* needed_parts */
581);
582
583extern XkbSrvLedInfoPtr XkbFindSrvLedInfo(
584 DeviceIntPtr /* dev */,
585 unsigned int /* class */,
586 unsigned int /* id */,
587 unsigned int /* needed_parts */
588);
589
590extern void XkbApplyLedNameChanges(
591 DeviceIntPtr /* dev */,
592 XkbSrvLedInfoPtr /* sli */,
593 unsigned int /* changed_names */,
594 xkbExtensionDeviceNotify * /* ed */,
595 XkbChangesPtr /* changes */,
596 XkbEventCausePtr /* cause */
597);
598
599extern void XkbApplyLedMapChanges(
600 DeviceIntPtr /* dev */,
601 XkbSrvLedInfoPtr /* sli */,
602 unsigned int /* changed_maps */,
603 xkbExtensionDeviceNotify * /* ed */,
604 XkbChangesPtr /* changes */,
605 XkbEventCausePtr /* cause */
606);
607
608extern void XkbApplyLedStateChanges(
609 DeviceIntPtr /* dev */,
610 XkbSrvLedInfoPtr /* sli */,
611 unsigned int /* changed_leds */,
612 xkbExtensionDeviceNotify * /* ed */,
613 XkbChangesPtr /* changes */,
614 XkbEventCausePtr /* cause */
615);
616
617extern void XkbFlushLedEvents(
618 DeviceIntPtr /* dev */,
619 DeviceIntPtr /* kbd */,
620 XkbSrvLedInfoPtr /* sli */,
621 xkbExtensionDeviceNotify * /* ed */,
622 XkbChangesPtr /* changes */,
623 XkbEventCausePtr /* cause */
624);
625
626extern unsigned int XkbIndicatorsToUpdate(
627 DeviceIntPtr /* dev */,
628 unsigned long /* state_changes */,
629 Bool /* enabled_ctrl_changes */
630);
631
632extern void XkbComputeDerivedState(
633 XkbSrvInfoPtr /* xkbi */
634);
635
636extern void XkbCheckSecondaryEffects(
637 XkbSrvInfoPtr /* xkbi */,
638 unsigned int /* which */,
639 XkbChangesPtr /* changes */,
640 XkbEventCausePtr /* cause */
641);
642
643extern void XkbCheckIndicatorMaps(
644 DeviceIntPtr /* dev */,
645 XkbSrvLedInfoPtr /* sli */,
646 unsigned int /* which */
647);
648
649extern unsigned int XkbStateChangedFlags(
650 XkbStatePtr /* old */,
651 XkbStatePtr /* new */
652);
653
654extern void XkbSendStateNotify(
655 DeviceIntPtr /* kbd */,
656 xkbStateNotify * /* pSN */
657);
658
659extern void XkbSendMapNotify(
660 DeviceIntPtr /* kbd */,
661 xkbMapNotify * /* ev */
662);
663
664extern int XkbComputeControlsNotify(
665 DeviceIntPtr /* kbd */,
666 XkbControlsPtr /* old */,
667 XkbControlsPtr /* new */,
668 xkbControlsNotify * /* pCN */,
669 Bool /* forceCtrlProc */
670);
671
672extern void XkbSendControlsNotify(
673 DeviceIntPtr /* kbd */,
674 xkbControlsNotify * /* ev */
675);
676
677extern void XkbSendCompatMapNotify(
678 DeviceIntPtr /* kbd */,
679 xkbCompatMapNotify * /* ev */
680);
681
682extern void XkbHandleBell(
683 BOOL /* force */,
684 BOOL /* eventOnly */,
685 DeviceIntPtr /* kbd */,
686 CARD8 /* percent */,
687 pointer /* ctrl */,
688 CARD8 /* class */,
689 Atom /* name */,
690 WindowPtr /* pWin */,
691 ClientPtr /* pClient */
692);
693
694extern void XkbSendAccessXNotify(
695 DeviceIntPtr /* kbd */,
696 xkbAccessXNotify * /* pEv */
697);
698
699extern void XkbSendNamesNotify(
700 DeviceIntPtr /* kbd */,
701 xkbNamesNotify * /* ev */
702);
703
704extern void XkbSendCompatNotify(
705 DeviceIntPtr /* kbd */,
706 xkbCompatMapNotify * /* ev */
707);
708
709extern void XkbSendActionMessage(
710 DeviceIntPtr /* kbd */,
711 xkbActionMessage * /* ev */
712);
713
714extern void XkbSendExtensionDeviceNotify(
715 DeviceIntPtr /* kbd */,
716 ClientPtr /* client */,
717 xkbExtensionDeviceNotify * /* ev */
718);
719
720extern void XkbSendNotification(
721 DeviceIntPtr /* kbd */,
722 XkbChangesPtr /* pChanges */,
723 XkbEventCausePtr /* cause */
724);
725
726extern void XkbProcessKeyboardEvent(
727 struct _xEvent * /* xE */,
728 DeviceIntPtr /* keybd */,
729 int /* count */
730);
731
732extern void XkbHandleActions(
733 DeviceIntPtr /* dev */,
734 DeviceIntPtr /* kbd */,
735 struct _xEvent * /* xE */,
736 int /* count */
737);
738
739extern Bool XkbEnableDisableControls(
740 XkbSrvInfoPtr /* xkbi */,
741 unsigned long /* change */,
742 unsigned long /* newValues */,
743 XkbChangesPtr /* changes */,
744 XkbEventCausePtr /* cause */
745);
746
747extern void AccessXInit(
748 DeviceIntPtr /* dev */
749);
750
751extern Bool AccessXFilterPressEvent(
752 register struct _xEvent * /* xE */,
753 register DeviceIntPtr /* keybd */,
754 int /* count */
755);
756
757extern Bool AccessXFilterReleaseEvent(
758 register struct _xEvent * /* xE */,
759 register DeviceIntPtr /* keybd */,
760 int /* count */
761);
762
763extern void AccessXCancelRepeatKey(
764 XkbSrvInfoPtr /* xkbi */,
765 KeyCode /* key */
766);
767
768extern void AccessXComputeCurveFactor(
769 XkbSrvInfoPtr /* xkbi */,
770 XkbControlsPtr /* ctrls */
771);
772
773extern XkbInterestPtr XkbFindClientResource(
774 DevicePtr /* inDev */,
775 ClientPtr /* client */
776);
777
778extern XkbInterestPtr XkbAddClientResource(
779 DevicePtr /* inDev */,
780 ClientPtr /* client */,
781 XID /* id */
782);
783
784extern int XkbRemoveResourceClient(
785 DevicePtr /* inDev */,
786 XID /* id */
787);
788
789extern int XkbDDXInitDevice(
790 DeviceIntPtr /* dev */
791);
792
793extern int XkbDDXAccessXBeep(
794 DeviceIntPtr /* dev */,
795 unsigned int /* what */,
796 unsigned int /* which */
797);
798
799extern void XkbDDXKeyClick(
800 DeviceIntPtr /* dev */,
801 int /* keycode */,
802 int /* synthetic */
803);
804
805extern int XkbDDXUsesSoftRepeat(
806 DeviceIntPtr /* dev */
807);
808
809extern void XkbDDXKeybdCtrlProc(
810 DeviceIntPtr /* dev */,
811 KeybdCtrl * /* ctrl */
812);
813
814extern void XkbDDXChangeControls(
815 DeviceIntPtr /* dev */,
816 XkbControlsPtr /* old */,
817 XkbControlsPtr /* new */
818);
819
820extern void XkbDDXUpdateDeviceIndicators(
821 DeviceIntPtr /* dev */,
822 XkbSrvLedInfoPtr /* sli */,
823 CARD32 /* newState */
824);
825
826extern void XkbDDXFakePointerButton(
827 int /* event */,
828 int /* button */
829);
830
831extern void XkbDDXFakePointerMotion(
832 unsigned int /* flags */,
833 int /* x */,
834 int /* y */
835);
836
837extern void XkbDDXFakeDeviceButton(
838 DeviceIntPtr /* dev */,
839 Bool /* press */,
840 int /* button */
841);
842
843extern int XkbDDXTerminateServer(
844 DeviceIntPtr /* dev */,
845 KeyCode /* key */,
846 XkbAction * /* act */
847);
848
849extern int XkbDDXSwitchScreen(
850 DeviceIntPtr /* dev */,
851 KeyCode /* key */,
852 XkbAction * /* act */
853);
854
855extern int XkbDDXPrivate(
856 DeviceIntPtr /* dev */,
857 KeyCode /* key */,
858 XkbAction * /* act */
859);
860
861extern void XkbDisableComputedAutoRepeats(
862 DeviceIntPtr /* pXDev */,
863 unsigned int /* key */
864);
865
866extern void XkbSetRepeatKeys(
867 DeviceIntPtr /* pXDev */,
868 int /* key */,
869 int /* onoff */
870);
871
872extern int XkbLatchModifiers(
873 DeviceIntPtr /* pXDev */,
874 CARD8 /* mask */,
875 CARD8 /* latches */
876);
877
878extern int XkbLatchGroup(
879 DeviceIntPtr /* pXDev */,
880 int /* group */
881);
882
883extern void XkbClearAllLatchesAndLocks(
884 DeviceIntPtr /* dev */,
885 XkbSrvInfoPtr /* xkbi */,
886 Bool /* genEv */,
887 XkbEventCausePtr /* cause */
888);
889
890extern void XkbSetRulesDflts(
891 char * /* rulesFile */,
892 char * /* model */,
893 char * /* layout */,
894 char * /* variant */,
895 char * /* options */
896);
897
898extern void XkbInitDevice(
899 DeviceIntPtr /* pXDev */
900);
901
902extern Bool XkbInitKeyboardDeviceStruct(
903 DeviceIntPtr /* pXDev */,
904 XkbComponentNamesPtr /* pNames */,
905 KeySymsPtr /* pSyms */,
906 CARD8 /* pMods */[],
907 BellProcPtr /* bellProc */,
908 KbdCtrlProcPtr /* ctrlProc */
909);
910
911extern int SProcXkbDispatch(
912 ClientPtr /* client */
913);
914
915extern XkbGeometryPtr XkbLookupNamedGeometry(
916 DeviceIntPtr /* dev */,
917 Atom /* name */,
918 Bool * /* shouldFree */
919);
920
921extern char * _XkbDupString(
922 char * /* str */
923);
924
925extern void XkbConvertCase(
926 KeySym /* sym */,
927 KeySym * /* lower */,
928 KeySym * /* upper */
929);
930
931extern Status XkbChangeKeycodeRange(
932 XkbDescPtr /* xkb */,
933 int /* minKC */,
934 int /* maxKC */,
935 XkbChangesPtr /* changes */
936);
937
938extern int XkbFinishDeviceInit(
939 DeviceIntPtr /* pXDev */
940);
941
942extern void XkbFreeSrvLedInfo(
943 XkbSrvLedInfoPtr /* sli */
944);
945
946extern void XkbFreeInfo(
947 XkbSrvInfoPtr /* xkbi */
948);
949
950extern Status XkbChangeTypesOfKey(
951 XkbDescPtr /* xkb */,
952 int /* key */,
953 int /* nGroups */,
954 unsigned int /* groups */,
955 int * /* newTypesIn */,
956 XkbMapChangesPtr /* changes */
957);
958
959extern int XkbKeyTypesForCoreSymbols(
960 XkbDescPtr /* xkb */,
961 int /* map_width */,
962 KeySym * /* core_syms */,
963 unsigned int /* protected */,
964 int * /* types_inout */,
965 KeySym * /* xkb_syms_rtrn */
966);
967
968extern Bool XkbApplyCompatMapToKey(
969 XkbDescPtr /* xkb */,
970 KeyCode /* key */,
971 XkbChangesPtr /* changes */
972);
973
974extern Bool XkbApplyVirtualModChanges(
975 XkbDescPtr /* xkb */,
976 unsigned int /* changed */,
977 XkbChangesPtr /* changes */
978);
979
980extern void XkbSendNewKeyboardNotify(
981 DeviceIntPtr /* kbd */,
982 xkbNewKeyboardNotify * /* pNKN */
983);
984
985#ifdef XKBSRV_NEED_FILE_FUNCS
986
987#include <X11/extensions/XKMformat.h>
988#include <X11/extensions/XKBfile.h>
989#include <X11/extensions/XKBrules.h>
990
991#define _XkbListKeymaps 0
992#define _XkbListKeycodes 1
993#define _XkbListTypes 2
994#define _XkbListCompat 3
995#define _XkbListSymbols 4
996#define _XkbListGeometry 5
997#define _XkbListNumComponents 6
998
999typedef struct _XkbSrvListInfo {
1000 int szPool;
1001 int nPool;
1002 char * pool;
1003
1004 int maxRtrn;
1005 int nTotal;
1006
1007 char * pattern[_XkbListNumComponents];
1008 int nFound[_XkbListNumComponents];
1009} XkbSrvListInfoRec,*XkbSrvListInfoPtr;
1010
1011extern Status XkbDDXList(
1012 DeviceIntPtr /* dev */,
1013 XkbSrvListInfoPtr /* listing */,
1014 ClientPtr /* client */
1015);
1016
1017extern unsigned int XkbDDXLoadKeymapByNames(
1018 DeviceIntPtr /* keybd */,
1019 XkbComponentNamesPtr /* names */,
1020 unsigned int /* want */,
1021 unsigned int /* need */,
1022 XkbFileInfoPtr /* finfoRtrn */,
1023 char * /* keymapNameRtrn */,
1024 int /* keymapNameRtrnLen */
1025);
1026
1027extern Bool XkbDDXNamesFromRules(
1028 DeviceIntPtr /* keybd */,
1029 char * /* rules */,
1030 XkbRF_VarDefsPtr /* defs */,
1031 XkbComponentNamesPtr /* names */
1032);
1033
1034extern Bool XkbDDXApplyConfig(
1035 XPointer /* cfg_in */,
1036 XkbSrvInfoPtr /* xkbi */
1037);
1038
1039extern XPointer XkbDDXPreloadConfig(
1040 char ** /* rulesFileRtrn */,
1041 XkbRF_VarDefsPtr /* defs */,
1042 XkbComponentNamesPtr /* names */,
1043 DeviceIntPtr /* dev */
1044);
1045
1046extern int _XkbStrCaseCmp(
1047 char * /* str1 */,
1048 char * /* str2 */
1049);
1050
1051#endif /* XKBSRV_NEED_FILE_FUNCS */
1052
1053_XFUNCPROTOEND
1054
1055#define XkbAtomGetString(d,s) NameForAtom(s)
1056
1057#endif /* _XKBSRV_H_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette