1706f2543Smrg/************************************************************
2706f2543SmrgCopyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
3706f2543Smrg
4706f2543SmrgPermission to use, copy, modify, and distribute this
5706f2543Smrgsoftware and its documentation for any purpose and without
6706f2543Smrgfee is hereby granted, provided that the above copyright
7706f2543Smrgnotice appear in all copies and that both that copyright
8706f2543Smrgnotice and this permission notice appear in supporting
9706f2543Smrgdocumentation, and that the name of Silicon Graphics not be
10706f2543Smrgused in advertising or publicity pertaining to distribution
11706f2543Smrgof the software without specific prior written permission.
12706f2543SmrgSilicon Graphics makes no representation about the suitability
13706f2543Smrgof this software for any purpose. It is provided "as is"
14706f2543Smrgwithout any express or implied warranty.
15706f2543Smrg
16706f2543SmrgSILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
17706f2543SmrgSOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18706f2543SmrgAND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
19706f2543SmrgGRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
20706f2543SmrgDAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
21706f2543SmrgDATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
22706f2543SmrgOR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
23706f2543SmrgTHE USE OR PERFORMANCE OF THIS SOFTWARE.
24706f2543Smrg
25706f2543Smrg********************************************************/
26706f2543Smrg
27706f2543Smrg#ifndef _XKBSRV_H_
28706f2543Smrg#define	_XKBSRV_H_
29706f2543Smrg
30706f2543Smrg#define XkbAllocClientMap		SrvXkbAllocClientMap
31706f2543Smrg#define XkbAllocServerMap		SrvXkbAllocServerMap
32706f2543Smrg#define XkbChangeTypesOfKey		SrvXkbChangeTypesOfKey
33706f2543Smrg#define XkbCopyKeyTypes			SrvXkbCopyKeyTypes
34706f2543Smrg#define XkbFreeClientMap		SrvXkbFreeClientMap
35706f2543Smrg#define XkbFreeServerMap		SrvXkbFreeServerMap
36706f2543Smrg#define	XkbKeyTypesForCoreSymbols	SrvXkbKeyTypesForCoreSymbols
37706f2543Smrg#define	XkbApplyCompatMapToKey		SrvXkbApplyCompatMapToKey
38706f2543Smrg#define XkbResizeKeyActions		SrvXkbResizeKeyActions
39706f2543Smrg#define XkbResizeKeySyms		SrvXkbResizeKeySyms
40706f2543Smrg#define XkbResizeKeyType		SrvXkbResizeKeyType
41706f2543Smrg#define XkbAllocCompatMap		SrvXkbAllocCompatMap
42706f2543Smrg#define XkbAllocControls		SrvXkbAllocControls
43706f2543Smrg#define XkbAllocIndicatorMaps		SrvXkbAllocIndicatorMaps
44706f2543Smrg#define XkbAllocKeyboard		SrvXkbAllocKeyboard
45706f2543Smrg#define XkbAllocNames			SrvXkbAllocNames
46706f2543Smrg#define XkbFreeCompatMap		SrvXkbFreeCompatMap
47706f2543Smrg#define XkbFreeKeyboard			SrvXkbFreeKeyboard
48706f2543Smrg#define XkbFreeNames			SrvXkbFreeNames
49706f2543Smrg#define XkbLatchModifiers		SrvXkbLatchModifiers
50706f2543Smrg#define XkbLatchGroup			SrvXkbLatchGroup
51706f2543Smrg#define XkbVirtualModsToReal		SrvXkbVirtualModsToReal
52706f2543Smrg#define	XkbChangeKeycodeRange		SrvXkbChangeKeycodeRange
53706f2543Smrg#define	XkbApplyVirtualModChanges	SrvXkbApplyVirtualModChanges
54706f2543Smrg
55706f2543Smrg#include <X11/extensions/XKBproto.h>
56706f2543Smrg#include "xkbstr.h"
57706f2543Smrg#include "xkbrules.h"
58706f2543Smrg#include "inputstr.h"
59706f2543Smrg#include "events.h"
60706f2543Smrg
61706f2543Smrgtypedef struct _XkbInterest {
62706f2543Smrg	DeviceIntPtr		dev;
63706f2543Smrg	ClientPtr		client;
64706f2543Smrg	XID			resource;
65706f2543Smrg	struct _XkbInterest *	next;
66706f2543Smrg	CARD16			extDevNotifyMask;
67706f2543Smrg	CARD16			stateNotifyMask;
68706f2543Smrg	CARD16			namesNotifyMask;
69706f2543Smrg	CARD32 			ctrlsNotifyMask;
70706f2543Smrg	CARD8			compatNotifyMask;
71706f2543Smrg	BOOL			bellNotifyMask;
72706f2543Smrg	BOOL			actionMessageMask;
73706f2543Smrg	CARD16			accessXNotifyMask;
74706f2543Smrg	CARD32			iStateNotifyMask;
75706f2543Smrg	CARD32			iMapNotifyMask;
76706f2543Smrg	CARD16			altSymsNotifyMask;
77706f2543Smrg	CARD32			autoCtrls;
78706f2543Smrg	CARD32			autoCtrlValues;
79706f2543Smrg} XkbInterestRec,*XkbInterestPtr;
80706f2543Smrg
81706f2543Smrgtypedef struct _XkbRadioGroup {
82706f2543Smrg	CARD8		flags;
83706f2543Smrg	CARD8		nMembers;
84706f2543Smrg	CARD8		dfltDown;
85706f2543Smrg	CARD8		currentDown;
86706f2543Smrg	CARD8		members[XkbRGMaxMembers];
87706f2543Smrg} XkbRadioGroupRec, *XkbRadioGroupPtr;
88706f2543Smrg
89706f2543Smrgtypedef struct	_XkbEventCause {
90706f2543Smrg	CARD8		kc;
91706f2543Smrg	CARD8		event;
92706f2543Smrg	CARD8		mjr;
93706f2543Smrg	CARD8		mnr;
94706f2543Smrg	ClientPtr	client;
95706f2543Smrg} XkbEventCauseRec,*XkbEventCausePtr;
96706f2543Smrg#define	XkbSetCauseKey(c,k,e)	{ (c)->kc= (k),(c)->event= (e),\
97706f2543Smrg				  (c)->mjr= (c)->mnr= 0; \
98706f2543Smrg				  (c)->client= NULL; }
99706f2543Smrg#define	XkbSetCauseReq(c,j,n,cl) { (c)->kc= (c)->event= 0,\
100706f2543Smrg				  (c)->mjr= (j),(c)->mnr= (n);\
101706f2543Smrg				  (c)->client= (cl); }
102706f2543Smrg#define	XkbSetCauseCoreReq(c,e,cl) XkbSetCauseReq(c,e,0,cl)
103706f2543Smrg#define	XkbSetCauseXkbReq(c,e,cl)  XkbSetCauseReq(c,XkbReqCode,e,cl)
104706f2543Smrg#define	XkbSetCauseUnknown(c)	   XkbSetCauseKey(c,0,0)
105706f2543Smrg
106706f2543Smrg#define	_OFF_TIMER		0
107706f2543Smrg#define	_KRG_WARN_TIMER		1
108706f2543Smrg#define	_KRG_TIMER		2
109706f2543Smrg#define	_SK_TIMEOUT_TIMER	3
110706f2543Smrg#define	_ALL_TIMEOUT_TIMER	4
111706f2543Smrg
112706f2543Smrg#define	_BEEP_NONE		0
113706f2543Smrg#define	_BEEP_FEATURE_ON	1
114706f2543Smrg#define	_BEEP_FEATURE_OFF	2
115706f2543Smrg#define	_BEEP_FEATURE_CHANGE	3
116706f2543Smrg#define	_BEEP_SLOW_WARN		4
117706f2543Smrg#define	_BEEP_SLOW_PRESS	5
118706f2543Smrg#define	_BEEP_SLOW_ACCEPT	6
119706f2543Smrg#define	_BEEP_SLOW_REJECT	7
120706f2543Smrg#define	_BEEP_SLOW_RELEASE	8
121706f2543Smrg#define	_BEEP_STICKY_LATCH	9
122706f2543Smrg#define	_BEEP_STICKY_LOCK	10
123706f2543Smrg#define	_BEEP_STICKY_UNLOCK	11
124706f2543Smrg#define	_BEEP_LED_ON		12
125706f2543Smrg#define	_BEEP_LED_OFF		13
126706f2543Smrg#define	_BEEP_LED_CHANGE	14
127706f2543Smrg#define	_BEEP_BOUNCE_REJECT	15
128706f2543Smrg
129706f2543Smrgtypedef struct _XkbFilter {
130706f2543Smrg	CARD16			  keycode;
131706f2543Smrg	CARD8			  what;
132706f2543Smrg	CARD8			  active;
133706f2543Smrg	CARD8			  filterOthers;
134706f2543Smrg	CARD32			  priv;
135706f2543Smrg	XkbAction		  upAction;
136706f2543Smrg	int			(*filter)(
137706f2543Smrg					struct _XkbSrvInfo* 	/* xkbi */,
138706f2543Smrg					struct _XkbFilter *	/* filter */,
139706f2543Smrg					unsigned		/* keycode */,
140706f2543Smrg					XkbAction *		/* action */
141706f2543Smrg				  );
142706f2543Smrg	struct _XkbFilter	 *next;
143706f2543Smrg} XkbFilterRec,*XkbFilterPtr;
144706f2543Smrg
145706f2543Smrgtypedef struct _XkbSrvInfo {
146706f2543Smrg	XkbStateRec	 prev_state;
147706f2543Smrg	XkbStateRec	 state;
148706f2543Smrg	XkbDescPtr	 desc;
149706f2543Smrg
150706f2543Smrg	DeviceIntPtr	 device;
151706f2543Smrg	KbdCtrlProcPtr	 kbdProc;
152706f2543Smrg
153706f2543Smrg	XkbRadioGroupPtr radioGroups;
154706f2543Smrg	CARD8		 nRadioGroups;
155706f2543Smrg	CARD8		 clearMods;
156706f2543Smrg	CARD8		 setMods;
157706f2543Smrg	INT16		 groupChange;
158706f2543Smrg
159706f2543Smrg	CARD16		 dfltPtrDelta;
160706f2543Smrg
161706f2543Smrg	double		 mouseKeysCurve;
162706f2543Smrg	double		 mouseKeysCurveFactor;
163706f2543Smrg	INT16		 mouseKeysDX;
164706f2543Smrg	INT16		 mouseKeysDY;
165706f2543Smrg	CARD8		 mouseKeysFlags;
166706f2543Smrg	Bool		 mouseKeysAccel;
167706f2543Smrg	CARD8		 mouseKeysCounter;
168706f2543Smrg
169706f2543Smrg	CARD8		 lockedPtrButtons;
170706f2543Smrg	CARD8		 shiftKeyCount;
171706f2543Smrg	KeyCode		 mouseKey;
172706f2543Smrg	KeyCode		 inactiveKey;
173706f2543Smrg	KeyCode		 slowKey;
174706f2543Smrg	KeyCode		 repeatKey;
175706f2543Smrg	CARD8		 krgTimerActive;
176706f2543Smrg	CARD8		 beepType;
177706f2543Smrg	CARD8		 beepCount;
178706f2543Smrg
179706f2543Smrg	CARD32		 flags;
180706f2543Smrg	CARD32		 lastPtrEventTime;
181706f2543Smrg	CARD32		 lastShiftEventTime;
182706f2543Smrg	OsTimerPtr	 beepTimer;
183706f2543Smrg	OsTimerPtr	 mouseKeyTimer;
184706f2543Smrg	OsTimerPtr	 slowKeysTimer;
185706f2543Smrg	OsTimerPtr	 bounceKeysTimer;
186706f2543Smrg	OsTimerPtr	 repeatKeyTimer;
187706f2543Smrg	OsTimerPtr	 krgTimer;
188706f2543Smrg
189706f2543Smrg	int		 szFilters;
190706f2543Smrg	XkbFilterPtr	 filters;
191706f2543Smrg} XkbSrvInfoRec, *XkbSrvInfoPtr;
192706f2543Smrg
193706f2543Smrg#define	XkbSLI_IsDefault	(1L<<0)
194706f2543Smrg#define	XkbSLI_HasOwnState	(1L<<1)
195706f2543Smrg
196706f2543Smrgtypedef struct	_XkbSrvLedInfo {
197706f2543Smrg	CARD16			flags;
198706f2543Smrg	CARD16			class;
199706f2543Smrg	CARD16			id;
200706f2543Smrg	union {
201706f2543Smrg	    KbdFeedbackPtr	kf;
202706f2543Smrg	    LedFeedbackPtr	lf;
203706f2543Smrg	} 			fb;
204706f2543Smrg
205706f2543Smrg	CARD32			physIndicators;
206706f2543Smrg	CARD32			autoState;
207706f2543Smrg	CARD32			explicitState;
208706f2543Smrg	CARD32			effectiveState;
209706f2543Smrg
210706f2543Smrg	CARD32			mapsPresent;
211706f2543Smrg	CARD32			namesPresent;
212706f2543Smrg	XkbIndicatorMapPtr	maps;
213706f2543Smrg	Atom *			names;
214706f2543Smrg
215706f2543Smrg	CARD32			usesBase;
216706f2543Smrg	CARD32			usesLatched;
217706f2543Smrg	CARD32			usesLocked;
218706f2543Smrg	CARD32			usesEffective;
219706f2543Smrg	CARD32			usesCompat;
220706f2543Smrg	CARD32			usesControls;
221706f2543Smrg
222706f2543Smrg	CARD32			usedComponents;
223706f2543Smrg} XkbSrvLedInfoRec, *XkbSrvLedInfoPtr;
224706f2543Smrg
225706f2543Smrg/*
226706f2543Smrg * Settings for xkbClientFlags field (used by DIX)
227706f2543Smrg * These flags _must_ not overlap with XkbPCF_*
228706f2543Smrg */
229706f2543Smrg#define	_XkbClientInitialized		(1<<15)
230706f2543Smrg
231706f2543Smrg#define	_XkbWantsDetectableAutoRepeat(c)\
232706f2543Smrg	((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask)
233706f2543Smrg
234706f2543Smrg/*
235706f2543Smrg * Settings for flags field
236706f2543Smrg */
237706f2543Smrg#define	_XkbStateNotifyInProgress	(1<<0)
238706f2543Smrg
239706f2543Smrgtypedef struct
240706f2543Smrg{
241706f2543Smrg    ProcessInputProc processInputProc;
242706f2543Smrg    /* If processInputProc is set to something different than realInputProc,
243706f2543Smrg     * UNWRAP and COND_WRAP will not touch processInputProc and update only
244706f2543Smrg     * realInputProc.  This ensures that
245706f2543Smrg     *   processInputProc == (frozen ? EnqueueEvent : realInputProc)
246706f2543Smrg     *
247706f2543Smrg     * WRAP_PROCESS_INPUT_PROC should only be called during initialization,
248706f2543Smrg     * since it may destroy this invariant.
249706f2543Smrg     */
250706f2543Smrg    ProcessInputProc realInputProc;
251706f2543Smrg    DeviceUnwrapProc unwrapProc;
252706f2543Smrg} xkbDeviceInfoRec, *xkbDeviceInfoPtr;
253706f2543Smrg
254706f2543Smrg#define WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
255706f2543Smrg	device->public.processInputProc = proc; \
256706f2543Smrg	oldprocs->processInputProc = \
257706f2543Smrg	oldprocs->realInputProc = device->public.realInputProc; \
258706f2543Smrg	device->public.realInputProc = proc; \
259706f2543Smrg	oldprocs->unwrapProc = device->unwrapProc; \
260706f2543Smrg	device->unwrapProc = unwrapproc;
261706f2543Smrg
262706f2543Smrg#define COND_WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
263706f2543Smrg	if (device->public.processInputProc == device->public.realInputProc)\
264706f2543Smrg	    device->public.processInputProc = proc; \
265706f2543Smrg	oldprocs->processInputProc = \
266706f2543Smrg	oldprocs->realInputProc = device->public.realInputProc; \
267706f2543Smrg	device->public.realInputProc = proc; \
268706f2543Smrg	oldprocs->unwrapProc = device->unwrapProc; \
269706f2543Smrg	device->unwrapProc = unwrapproc;
270706f2543Smrg
271706f2543Smrg#define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs, backupproc) \
272706f2543Smrg        backupproc = device->public.realInputProc; \
273706f2543Smrg	if (device->public.processInputProc == device->public.realInputProc)\
274706f2543Smrg	    device->public.processInputProc = oldprocs->realInputProc; \
275706f2543Smrg	device->public.realInputProc = oldprocs->realInputProc; \
276706f2543Smrg	device->unwrapProc = oldprocs->unwrapProc;
277706f2543Smrg
278706f2543Smrgextern _X_EXPORT DevPrivateKeyRec xkbDevicePrivateKeyRec;
279706f2543Smrg#define xkbDevicePrivateKey (&xkbDevicePrivateKeyRec)
280706f2543Smrg
281706f2543Smrg#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr)dixLookupPrivate(&(dev)->devPrivates, xkbDevicePrivateKey))
282706f2543Smrg
283706f2543Smrgextern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer);
284706f2543Smrg
285706f2543Smrg/***====================================================================***/
286706f2543Smrg
287706f2543Smrg
288706f2543Smrg/***====================================================================***/
289706f2543Smrg
290706f2543Smrg#define XkbAX_KRGMask	 (XkbSlowKeysMask|XkbBounceKeysMask)
291706f2543Smrg#define	XkbAllFilteredEventsMask \
292706f2543Smrg	(XkbAccessXKeysMask|XkbRepeatKeysMask|XkbMouseKeysAccelMask|XkbAX_KRGMask)
293706f2543Smrg
294706f2543Smrg/***====================================================================***/
295706f2543Smrg
296706f2543Smrgextern _X_EXPORT int	XkbReqCode;
297706f2543Smrgextern _X_EXPORT int	XkbEventBase;
298706f2543Smrgextern _X_EXPORT int	XkbKeyboardErrorCode;
299706f2543Smrgextern _X_EXPORT char *	XkbBaseDirectory;
300706f2543Smrgextern _X_EXPORT char *	XkbBinDirectory;
301706f2543Smrg
302706f2543Smrgextern _X_EXPORT CARD32	xkbDebugFlags;
303706f2543Smrg
304706f2543Smrg#define	_XkbLibError(c,l,d) /* Epoch fail */
305706f2543Smrg#define	_XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
306706f2543Smrg#define	_XkbErrCode3(a,b,c)	_XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
307706f2543Smrg#define	_XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
308706f2543Smrg
309706f2543Smrgextern	_X_EXPORT int	DeviceKeyPress,DeviceKeyRelease,DeviceMotionNotify;
310706f2543Smrgextern	_X_EXPORT int	DeviceButtonPress,DeviceButtonRelease;
311706f2543Smrg
312706f2543Smrg#define	Status		int
313706f2543Smrg
314706f2543Smrgextern _X_EXPORT void XkbUseMsg(
315706f2543Smrg    void
316706f2543Smrg);
317706f2543Smrg
318706f2543Smrgextern _X_EXPORT int XkbProcessArguments(
319706f2543Smrg    int				/* argc */,
320706f2543Smrg    char **			/* argv */,
321706f2543Smrg    int				/* i */
322706f2543Smrg);
323706f2543Smrg
324706f2543Smrgextern _X_EXPORT Bool   XkbInitPrivates(void);
325706f2543Smrg
326706f2543Smrgextern _X_EXPORT void	XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc);
327706f2543Smrg
328706f2543Smrgextern _X_EXPORT void	XkbFreeCompatMap(
329706f2543Smrg    XkbDescPtr			/* xkb */,
330706f2543Smrg    unsigned int		/* which */,
331706f2543Smrg    Bool			/* freeMap */
332706f2543Smrg);
333706f2543Smrg
334706f2543Smrgextern _X_EXPORT void XkbFreeNames(
335706f2543Smrg	XkbDescPtr		/* xkb */,
336706f2543Smrg	unsigned int		/* which */,
337706f2543Smrg	Bool			/* freeMap */
338706f2543Smrg);
339706f2543Smrg
340706f2543Smrgextern _X_EXPORT int _XkbLookupAnyDevice(
341706f2543Smrg    DeviceIntPtr *pDev,
342706f2543Smrg    int id,
343706f2543Smrg    ClientPtr client,
344706f2543Smrg    Mask access_mode,
345706f2543Smrg    int *xkb_err
346706f2543Smrg);
347706f2543Smrg
348706f2543Smrgextern _X_EXPORT int _XkbLookupKeyboard(
349706f2543Smrg    DeviceIntPtr *pDev,
350706f2543Smrg    int id,
351706f2543Smrg    ClientPtr client,
352706f2543Smrg    Mask access_mode,
353706f2543Smrg    int *xkb_err
354706f2543Smrg);
355706f2543Smrg
356706f2543Smrgextern _X_EXPORT int _XkbLookupBellDevice(
357706f2543Smrg    DeviceIntPtr *pDev,
358706f2543Smrg    int id,
359706f2543Smrg    ClientPtr client,
360706f2543Smrg    Mask access_mode,
361706f2543Smrg    int *xkb_err
362706f2543Smrg);
363706f2543Smrg
364706f2543Smrgextern _X_EXPORT int _XkbLookupLedDevice(
365706f2543Smrg    DeviceIntPtr *pDev,
366706f2543Smrg    int id,
367706f2543Smrg    ClientPtr client,
368706f2543Smrg    Mask access_mode,
369706f2543Smrg    int *xkb_err
370706f2543Smrg);
371706f2543Smrg
372706f2543Smrgextern _X_EXPORT int _XkbLookupButtonDevice(
373706f2543Smrg    DeviceIntPtr *pDev,
374706f2543Smrg    int id,
375706f2543Smrg    ClientPtr client,
376706f2543Smrg    Mask access_mode,
377706f2543Smrg    int *xkb_err
378706f2543Smrg);
379706f2543Smrg
380706f2543Smrgextern _X_EXPORT XkbDescPtr XkbAllocKeyboard(
381706f2543Smrg	void
382706f2543Smrg);
383706f2543Smrg
384706f2543Smrgextern _X_EXPORT Status XkbAllocClientMap(
385706f2543Smrg	XkbDescPtr		/* xkb */,
386706f2543Smrg	unsigned int		/* which */,
387706f2543Smrg	unsigned int		/* nTypes */
388706f2543Smrg);
389706f2543Smrg
390706f2543Smrgextern _X_EXPORT Status XkbAllocServerMap(
391706f2543Smrg	XkbDescPtr		/* xkb */,
392706f2543Smrg	unsigned int		/* which */,
393706f2543Smrg	unsigned int		/* nNewActions */
394706f2543Smrg);
395706f2543Smrg
396706f2543Smrgextern _X_EXPORT void	XkbFreeClientMap(
397706f2543Smrg    XkbDescPtr			/* xkb */,
398706f2543Smrg    unsigned int		/* what */,
399706f2543Smrg    Bool			/* freeMap */
400706f2543Smrg);
401706f2543Smrg
402706f2543Smrgextern _X_EXPORT void	XkbFreeServerMap(
403706f2543Smrg    XkbDescPtr			/* xkb */,
404706f2543Smrg    unsigned int		/* what */,
405706f2543Smrg    Bool			/* freeMap */
406706f2543Smrg);
407706f2543Smrg
408706f2543Smrgextern _X_EXPORT Status XkbAllocIndicatorMaps(
409706f2543Smrg	XkbDescPtr		/* xkb */
410706f2543Smrg);
411706f2543Smrg
412706f2543Smrgextern _X_EXPORT Status	XkbAllocCompatMap(
413706f2543Smrg    XkbDescPtr			/* xkb */,
414706f2543Smrg    unsigned int		/* which */,
415706f2543Smrg    unsigned int		/* nInterpret */
416706f2543Smrg);
417706f2543Smrg
418706f2543Smrgextern _X_EXPORT Status XkbAllocNames(
419706f2543Smrg	XkbDescPtr		/* xkb */,
420706f2543Smrg	unsigned int		/* which */,
421706f2543Smrg	int			/* nTotalRG */,
422706f2543Smrg	int			/* nTotalAliases */
423706f2543Smrg);
424706f2543Smrg
425706f2543Smrgextern _X_EXPORT Status	XkbAllocControls(
426706f2543Smrg	XkbDescPtr		/* xkb */,
427706f2543Smrg	unsigned int		/* which*/
428706f2543Smrg);
429706f2543Smrg
430706f2543Smrgextern _X_EXPORT Status	XkbCopyKeyTypes(
431706f2543Smrg    XkbKeyTypePtr		/* from */,
432706f2543Smrg    XkbKeyTypePtr		/* into */,
433706f2543Smrg    int				/* num_types */
434706f2543Smrg);
435706f2543Smrg
436706f2543Smrgextern _X_EXPORT Status	XkbResizeKeyType(
437706f2543Smrg    XkbDescPtr		/* xkb */,
438706f2543Smrg    int			/* type_ndx */,
439706f2543Smrg    int			/* map_count */,
440706f2543Smrg    Bool		/* want_preserve */,
441706f2543Smrg    int			/* new_num_lvls */
442706f2543Smrg);
443706f2543Smrg
444706f2543Smrgextern _X_EXPORT void	XkbFreeKeyboard(
445706f2543Smrg	XkbDescPtr		/* xkb */,
446706f2543Smrg	unsigned int		/* which */,
447706f2543Smrg	Bool			/* freeDesc */
448706f2543Smrg);
449706f2543Smrg
450706f2543Smrgextern _X_EXPORT void	XkbFreeComponentNames(
451706f2543Smrg	XkbComponentNamesPtr	/* names */,
452706f2543Smrg	Bool			/* freeNames */
453706f2543Smrg);
454706f2543Smrg
455706f2543Smrgextern _X_EXPORT  void XkbSetActionKeyMods(
456706f2543Smrg	XkbDescPtr		/* xkb */,
457706f2543Smrg	XkbAction *		/* act */,
458706f2543Smrg	unsigned int 		/* mods */
459706f2543Smrg);
460706f2543Smrg
461706f2543Smrgextern _X_EXPORT unsigned int XkbMaskForVMask(
462706f2543Smrg    XkbDescPtr		/* xkb */,
463706f2543Smrg    unsigned int	/* vmask */
464706f2543Smrg);
465706f2543Smrg
466706f2543Smrgextern _X_EXPORT Bool XkbVirtualModsToReal(
467706f2543Smrg	XkbDescPtr	/* xkb */,
468706f2543Smrg	unsigned int	/* virtua_mask */,
469706f2543Smrg	unsigned int *	/* mask_rtrn */
470706f2543Smrg);
471706f2543Smrg
472706f2543Smrgextern _X_EXPORT unsigned int	XkbAdjustGroup(
473706f2543Smrg    int			/* group */,
474706f2543Smrg    XkbControlsPtr	/* ctrls */
475706f2543Smrg);
476706f2543Smrg
477706f2543Smrgextern _X_EXPORT KeySym *XkbResizeKeySyms(
478706f2543Smrg    XkbDescPtr		/* xkb */,
479706f2543Smrg    int 		/* key */,
480706f2543Smrg    int 		/* needed */
481706f2543Smrg);
482706f2543Smrg
483706f2543Smrgextern _X_EXPORT XkbAction *XkbResizeKeyActions(
484706f2543Smrg    XkbDescPtr		/* xkb */,
485706f2543Smrg    int 		/* key */,
486706f2543Smrg    int 		/* needed */
487706f2543Smrg);
488706f2543Smrg
489706f2543Smrgextern _X_EXPORT void XkbUpdateKeyTypesFromCore(
490706f2543Smrg    DeviceIntPtr	/* pXDev */,
491706f2543Smrg    KeySymsPtr          /* syms */,
492706f2543Smrg    KeyCode 		/* first */,
493706f2543Smrg    CARD8 		/* num */,
494706f2543Smrg    XkbChangesPtr	/* pChanges */
495706f2543Smrg);
496706f2543Smrg
497706f2543Smrgextern _X_EXPORT void XkbUpdateDescActions(
498706f2543Smrg    XkbDescPtr		/* xkb */,
499706f2543Smrg    KeyCode		/* first */,
500706f2543Smrg    CARD8		/* num */,
501706f2543Smrg    XkbChangesPtr	/* changes */
502706f2543Smrg);
503706f2543Smrg
504706f2543Smrgextern _X_EXPORT void XkbUpdateActions(
505706f2543Smrg    DeviceIntPtr	/* pXDev */,
506706f2543Smrg    KeyCode 		/* first */,
507706f2543Smrg    CARD8 		/* num */,
508706f2543Smrg    XkbChangesPtr  	/* pChanges */,
509706f2543Smrg    unsigned int *	/* needChecksRtrn */,
510706f2543Smrg    XkbEventCausePtr	/* cause */
511706f2543Smrg);
512706f2543Smrg
513706f2543Smrgextern _X_EXPORT KeySymsPtr XkbGetCoreMap(
514706f2543Smrg    DeviceIntPtr        /* keybd */
515706f2543Smrg);
516706f2543Smrg
517706f2543Smrgextern _X_EXPORT void XkbApplyMappingChange(
518706f2543Smrg    DeviceIntPtr	/* pXDev */,
519706f2543Smrg    KeySymsPtr          /* map */,
520706f2543Smrg    KeyCode		/* firstKey */,
521706f2543Smrg    CARD8		/* num */,
522706f2543Smrg    CARD8 *             /* modmap */,
523706f2543Smrg    ClientPtr		/* client */
524706f2543Smrg);
525706f2543Smrg
526706f2543Smrgextern _X_EXPORT void XkbSetIndicators(
527706f2543Smrg    DeviceIntPtr		/* pXDev */,
528706f2543Smrg    CARD32			/* affect */,
529706f2543Smrg    CARD32			/* values */,
530706f2543Smrg    XkbEventCausePtr		/* cause */
531706f2543Smrg);
532706f2543Smrg
533706f2543Smrgextern _X_EXPORT void XkbUpdateIndicators(
534706f2543Smrg    DeviceIntPtr		/* keybd */,
535706f2543Smrg    CARD32		 	/* changed */,
536706f2543Smrg    Bool			/* check_edevs */,
537706f2543Smrg    XkbChangesPtr		/* pChanges */,
538706f2543Smrg    XkbEventCausePtr		/* cause */
539706f2543Smrg);
540706f2543Smrg
541706f2543Smrgextern _X_EXPORT XkbSrvLedInfoPtr XkbAllocSrvLedInfo(
542706f2543Smrg    DeviceIntPtr		/* dev */,
543706f2543Smrg    KbdFeedbackPtr		/* kf */,
544706f2543Smrg    LedFeedbackPtr		/* lf */,
545706f2543Smrg    unsigned int		/* needed_parts */
546706f2543Smrg);
547706f2543Smrg
548706f2543Smrgextern _X_EXPORT XkbSrvLedInfoPtr XkbCopySrvLedInfo(
549706f2543Smrg    DeviceIntPtr		/* dev */,
550706f2543Smrg    XkbSrvLedInfoPtr		/* src */,
551706f2543Smrg    KbdFeedbackPtr		/* kf */,
552706f2543Smrg    LedFeedbackPtr		/* lf */
553706f2543Smrg);
554706f2543Smrg
555706f2543Smrg
556706f2543Smrgextern _X_EXPORT XkbSrvLedInfoPtr XkbFindSrvLedInfo(
557706f2543Smrg    DeviceIntPtr		/* dev */,
558706f2543Smrg    unsigned int		/* class */,
559706f2543Smrg    unsigned int		/* id */,
560706f2543Smrg    unsigned int		/* needed_parts */
561706f2543Smrg);
562706f2543Smrg
563706f2543Smrgextern _X_EXPORT void XkbApplyLedNameChanges(
564706f2543Smrg    DeviceIntPtr		/* dev */,
565706f2543Smrg    XkbSrvLedInfoPtr		/* sli */,
566706f2543Smrg    unsigned int		/* changed_names */,
567706f2543Smrg    xkbExtensionDeviceNotify *	/* ed */,
568706f2543Smrg    XkbChangesPtr		/* changes */,
569706f2543Smrg    XkbEventCausePtr		/* cause */
570706f2543Smrg);
571706f2543Smrg
572706f2543Smrgextern _X_EXPORT void XkbApplyLedMapChanges(
573706f2543Smrg    DeviceIntPtr		/* dev */,
574706f2543Smrg    XkbSrvLedInfoPtr		/* sli */,
575706f2543Smrg    unsigned int		/* changed_maps */,
576706f2543Smrg    xkbExtensionDeviceNotify *	/* ed */,
577706f2543Smrg    XkbChangesPtr		/* changes */,
578706f2543Smrg    XkbEventCausePtr		/* cause */
579706f2543Smrg);
580706f2543Smrg
581706f2543Smrgextern _X_EXPORT void XkbApplyLedStateChanges(
582706f2543Smrg    DeviceIntPtr		/* dev */,
583706f2543Smrg    XkbSrvLedInfoPtr		/* sli */,
584706f2543Smrg    unsigned int		/* changed_leds */,
585706f2543Smrg    xkbExtensionDeviceNotify *	/* ed */,
586706f2543Smrg    XkbChangesPtr		/* changes */,
587706f2543Smrg    XkbEventCausePtr		/* cause */
588706f2543Smrg);
589706f2543Smrg
590706f2543Smrgextern _X_EXPORT void XkbFlushLedEvents(
591706f2543Smrg    DeviceIntPtr		/* dev */,
592706f2543Smrg    DeviceIntPtr		/* kbd */,
593706f2543Smrg    XkbSrvLedInfoPtr		/* sli */,
594706f2543Smrg    xkbExtensionDeviceNotify *	/* ed */,
595706f2543Smrg    XkbChangesPtr		/* changes */,
596706f2543Smrg    XkbEventCausePtr		/* cause */
597706f2543Smrg);
598706f2543Smrg
599706f2543Smrgextern _X_EXPORT unsigned int XkbIndicatorsToUpdate(
600706f2543Smrg    DeviceIntPtr		/* dev */,
601706f2543Smrg    unsigned long		/* state_changes */,
602706f2543Smrg    Bool			/* enabled_ctrl_changes */
603706f2543Smrg);
604706f2543Smrg
605706f2543Smrgextern _X_EXPORT void XkbComputeDerivedState(
606706f2543Smrg    XkbSrvInfoPtr		/* xkbi */
607706f2543Smrg);
608706f2543Smrg
609706f2543Smrgextern _X_EXPORT void XkbCheckSecondaryEffects(
610706f2543Smrg    XkbSrvInfoPtr		/* xkbi */,
611706f2543Smrg    unsigned int		/* which */,
612706f2543Smrg    XkbChangesPtr		/* changes */,
613706f2543Smrg    XkbEventCausePtr		/* cause */
614706f2543Smrg);
615706f2543Smrg
616706f2543Smrgextern _X_EXPORT void XkbCheckIndicatorMaps(
617706f2543Smrg    DeviceIntPtr		/* dev */,
618706f2543Smrg    XkbSrvLedInfoPtr		/* sli */,
619706f2543Smrg    unsigned int		/* which */
620706f2543Smrg);
621706f2543Smrg
622706f2543Smrgextern _X_EXPORT unsigned int XkbStateChangedFlags(
623706f2543Smrg    XkbStatePtr			/* old */,
624706f2543Smrg    XkbStatePtr			/* new */
625706f2543Smrg);
626706f2543Smrg
627706f2543Smrgextern _X_EXPORT void XkbSendStateNotify(
628706f2543Smrg       DeviceIntPtr	/* kbd */,
629706f2543Smrg       xkbStateNotify *	/* pSN */
630706f2543Smrg);
631706f2543Smrg
632706f2543Smrgextern _X_EXPORT void XkbSendMapNotify(
633706f2543Smrg       DeviceIntPtr	/* kbd */,
634706f2543Smrg       xkbMapNotify *	/* ev */
635706f2543Smrg);
636706f2543Smrg
637706f2543Smrgextern _X_EXPORT int  XkbComputeControlsNotify(
638706f2543Smrg	DeviceIntPtr		/* kbd */,
639706f2543Smrg	XkbControlsPtr		/* old */,
640706f2543Smrg	XkbControlsPtr		/* new */,
641706f2543Smrg	xkbControlsNotify *	/* pCN */,
642706f2543Smrg	Bool			/* forceCtrlProc */
643706f2543Smrg);
644706f2543Smrg
645706f2543Smrgextern _X_EXPORT void XkbSendControlsNotify(
646706f2543Smrg       DeviceIntPtr		/* kbd */,
647706f2543Smrg       xkbControlsNotify *	/* ev */
648706f2543Smrg);
649706f2543Smrg
650706f2543Smrgextern _X_EXPORT void XkbSendCompatMapNotify(
651706f2543Smrg	DeviceIntPtr		/* kbd */,
652706f2543Smrg	xkbCompatMapNotify *	/* ev */
653706f2543Smrg);
654706f2543Smrg
655706f2543Smrgextern _X_EXPORT void XkbHandleBell(
656706f2543Smrg       BOOL		/* force */,
657706f2543Smrg       BOOL		/* eventOnly */,
658706f2543Smrg       DeviceIntPtr	/* kbd */,
659706f2543Smrg       CARD8		/* percent */,
660706f2543Smrg       pointer 		/* ctrl */,
661706f2543Smrg       CARD8		/* class */,
662706f2543Smrg       Atom		/* name */,
663706f2543Smrg       WindowPtr	/* pWin */,
664706f2543Smrg       ClientPtr	/* pClient */
665706f2543Smrg);
666706f2543Smrg
667706f2543Smrgextern _X_EXPORT void XkbSendAccessXNotify(
668706f2543Smrg       DeviceIntPtr		/* kbd */,
669706f2543Smrg       xkbAccessXNotify *	/* pEv */
670706f2543Smrg);
671706f2543Smrg
672706f2543Smrgextern _X_EXPORT void XkbSendNamesNotify(
673706f2543Smrg       DeviceIntPtr	/* kbd */,
674706f2543Smrg       xkbNamesNotify *	/* ev */
675706f2543Smrg);
676706f2543Smrg
677706f2543Smrgextern _X_EXPORT void XkbSendActionMessage(
678706f2543Smrg       DeviceIntPtr		/* kbd */,
679706f2543Smrg       xkbActionMessage *	/* ev */
680706f2543Smrg);
681706f2543Smrg
682706f2543Smrgextern _X_EXPORT void XkbSendExtensionDeviceNotify(
683706f2543Smrg       DeviceIntPtr			/* kbd */,
684706f2543Smrg       ClientPtr			/* client */,
685706f2543Smrg       xkbExtensionDeviceNotify *	/* ev */
686706f2543Smrg);
687706f2543Smrg
688706f2543Smrgextern _X_EXPORT void XkbSendNotification(
689706f2543Smrg    DeviceIntPtr		/* kbd */,
690706f2543Smrg    XkbChangesPtr		/* pChanges */,
691706f2543Smrg    XkbEventCausePtr		/* cause */
692706f2543Smrg);
693706f2543Smrg
694706f2543Smrgextern _X_EXPORT void XkbProcessKeyboardEvent(
695706f2543Smrg    DeviceEvent*		/* event */,
696706f2543Smrg    DeviceIntPtr		/* keybd */
697706f2543Smrg);
698706f2543Smrg
699706f2543Smrgextern _X_EXPORT void XkbHandleActions(
700706f2543Smrg    DeviceIntPtr		/* dev */,
701706f2543Smrg    DeviceIntPtr		/* kbd */,
702706f2543Smrg    DeviceEvent*		/* event */
703706f2543Smrg);
704706f2543Smrg
705706f2543Smrgextern _X_EXPORT Bool XkbEnableDisableControls(
706706f2543Smrg    XkbSrvInfoPtr	/* xkbi */,
707706f2543Smrg    unsigned long	/* change */,
708706f2543Smrg    unsigned long	/* newValues */,
709706f2543Smrg    XkbChangesPtr	/* changes */,
710706f2543Smrg    XkbEventCausePtr	/* cause */
711706f2543Smrg);
712706f2543Smrg
713706f2543Smrgextern _X_EXPORT void AccessXInit(
714706f2543Smrg    DeviceIntPtr        /* dev */
715706f2543Smrg);
716706f2543Smrg
717706f2543Smrgextern _X_EXPORT Bool AccessXFilterPressEvent(
718706f2543Smrg    DeviceEvent*	/* event */,
719706f2543Smrg    DeviceIntPtr	/* keybd */
720706f2543Smrg);
721706f2543Smrg
722706f2543Smrgextern _X_EXPORT Bool AccessXFilterReleaseEvent(
723706f2543Smrg    DeviceEvent*	/* event */,
724706f2543Smrg    DeviceIntPtr	/* keybd */
725706f2543Smrg);
726706f2543Smrg
727706f2543Smrgextern _X_EXPORT void AccessXCancelRepeatKey(
728706f2543Smrg    XkbSrvInfoPtr	/* xkbi */,
729706f2543Smrg    KeyCode		/* key */
730706f2543Smrg);
731706f2543Smrg
732706f2543Smrgextern _X_EXPORT void AccessXComputeCurveFactor(
733706f2543Smrg    XkbSrvInfoPtr	/* xkbi */,
734706f2543Smrg    XkbControlsPtr	/* ctrls */
735706f2543Smrg);
736706f2543Smrg
737706f2543Smrgextern _X_EXPORT XkbInterestPtr XkbFindClientResource(
738706f2543Smrg       DevicePtr	/* inDev */,
739706f2543Smrg       ClientPtr	/* client */
740706f2543Smrg);
741706f2543Smrg
742706f2543Smrgextern _X_EXPORT XkbInterestPtr XkbAddClientResource(
743706f2543Smrg       DevicePtr	/* inDev */,
744706f2543Smrg       ClientPtr	/* client */,
745706f2543Smrg       XID		/* id */
746706f2543Smrg);
747706f2543Smrg
748706f2543Smrgextern _X_EXPORT int XkbRemoveResourceClient(
749706f2543Smrg       DevicePtr	/* inDev */,
750706f2543Smrg       XID		/* id */
751706f2543Smrg);
752706f2543Smrg
753706f2543Smrgextern _X_EXPORT int XkbDDXAccessXBeep(
754706f2543Smrg    DeviceIntPtr        /* dev */,
755706f2543Smrg    unsigned int	/* what */,
756706f2543Smrg    unsigned int	/* which */
757706f2543Smrg);
758706f2543Smrg
759706f2543Smrgextern _X_EXPORT int XkbDDXUsesSoftRepeat(
760706f2543Smrg    DeviceIntPtr	/* dev */
761706f2543Smrg);
762706f2543Smrg
763706f2543Smrgextern _X_EXPORT void XkbDDXKeybdCtrlProc(
764706f2543Smrg	DeviceIntPtr	/* dev */,
765706f2543Smrg	KeybdCtrl *	/* ctrl */
766706f2543Smrg);
767706f2543Smrg
768706f2543Smrgextern _X_EXPORT void XkbDDXChangeControls(
769706f2543Smrg	DeviceIntPtr	/* dev */,
770706f2543Smrg	XkbControlsPtr 	/* old */,
771706f2543Smrg	XkbControlsPtr 	/* new */
772706f2543Smrg);
773706f2543Smrg
774706f2543Smrgextern _X_EXPORT void XkbDDXUpdateDeviceIndicators(
775706f2543Smrg	DeviceIntPtr		/* dev */,
776706f2543Smrg	XkbSrvLedInfoPtr	/* sli */,
777706f2543Smrg	CARD32			/* newState */
778706f2543Smrg);
779706f2543Smrg
780706f2543Smrgextern _X_EXPORT int XkbDDXTerminateServer(
781706f2543Smrg	DeviceIntPtr	/* dev */,
782706f2543Smrg	KeyCode		/* key */,
783706f2543Smrg	XkbAction *	/* act */
784706f2543Smrg);
785706f2543Smrg
786706f2543Smrgextern _X_EXPORT int XkbDDXSwitchScreen(
787706f2543Smrg	DeviceIntPtr	/* dev */,
788706f2543Smrg	KeyCode		/* key */,
789706f2543Smrg	XkbAction *	/* act */
790706f2543Smrg);
791706f2543Smrg
792706f2543Smrgextern _X_EXPORT int XkbDDXPrivate(
793706f2543Smrg	DeviceIntPtr	/* dev */,
794706f2543Smrg	KeyCode		/* key */,
795706f2543Smrg	XkbAction *	/* act */
796706f2543Smrg);
797706f2543Smrg
798706f2543Smrgextern _X_EXPORT void XkbDisableComputedAutoRepeats(
799706f2543Smrg	DeviceIntPtr 	/* pXDev */,
800706f2543Smrg	unsigned int	/* key */
801706f2543Smrg);
802706f2543Smrg
803706f2543Smrgextern _X_EXPORT void XkbSetRepeatKeys(
804706f2543Smrg	DeviceIntPtr 	/* pXDev */,
805706f2543Smrg	int		/* key */,
806706f2543Smrg	int	 	/* onoff */
807706f2543Smrg);
808706f2543Smrg
809706f2543Smrgextern _X_EXPORT int XkbLatchModifiers(
810706f2543Smrg	DeviceIntPtr 	/* pXDev */,
811706f2543Smrg	CARD8 		/* mask */,
812706f2543Smrg	CARD8 		/* latches */
813706f2543Smrg);
814706f2543Smrg
815706f2543Smrgextern _X_EXPORT int XkbLatchGroup(
816706f2543Smrg	DeviceIntPtr  	/* pXDev */,
817706f2543Smrg	int	  	/* group */
818706f2543Smrg);
819706f2543Smrg
820706f2543Smrgextern _X_EXPORT void XkbClearAllLatchesAndLocks(
821706f2543Smrg	DeviceIntPtr		/* dev */,
822706f2543Smrg	XkbSrvInfoPtr		/* xkbi */,
823706f2543Smrg	Bool			/* genEv */,
824706f2543Smrg	XkbEventCausePtr	/* cause */
825706f2543Smrg);
826706f2543Smrg
827706f2543Smrgextern _X_EXPORT void	XkbGetRulesDflts(
828706f2543Smrg        XkbRMLVOSet *           /* rmlvo */
829706f2543Smrg);
830706f2543Smrg
831706f2543Smrgextern _X_EXPORT void   XkbFreeRMLVOSet(
832706f2543Smrg        XkbRMLVOSet *           /* rmlvo */,
833706f2543Smrg        Bool                    /* freeRMLVO */
834706f2543Smrg);
835706f2543Smrg
836706f2543Smrgextern _X_EXPORT void	XkbSetRulesDflts(
837706f2543Smrg        XkbRMLVOSet *           /* rmlvo */
838706f2543Smrg);
839706f2543Smrg
840706f2543Smrgextern _X_EXPORT void	XkbDeleteRulesDflts(
841706f2543Smrg	void
842706f2543Smrg);
843706f2543Smrg
844706f2543Smrgextern _X_EXPORT int SProcXkbDispatch(
845706f2543Smrg	ClientPtr		/* client */
846706f2543Smrg);
847706f2543Smrg
848706f2543Smrgextern _X_EXPORT XkbGeometryPtr XkbLookupNamedGeometry(
849706f2543Smrg	DeviceIntPtr		/* dev */,
850706f2543Smrg	Atom			/* name */,
851706f2543Smrg	Bool *			/* shouldFree */
852706f2543Smrg);
853706f2543Smrg
854706f2543Smrgextern _X_EXPORT char *	_XkbDupString(
855706f2543Smrg	const char *		/* str */
856706f2543Smrg);
857706f2543Smrg
858706f2543Smrgextern _X_EXPORT void	XkbConvertCase(
859706f2543Smrg	KeySym 			/* sym */,
860706f2543Smrg	KeySym *		/* lower */,
861706f2543Smrg	KeySym *		/* upper */
862706f2543Smrg);
863706f2543Smrg
864706f2543Smrgextern _X_EXPORT Status	 XkbChangeKeycodeRange(
865706f2543Smrg	XkbDescPtr		/* xkb */,
866706f2543Smrg	int 			/* minKC */,
867706f2543Smrg	int 			/* maxKC */,
868706f2543Smrg	XkbChangesPtr		/* changes */
869706f2543Smrg);
870706f2543Smrg
871706f2543Smrgextern _X_EXPORT void XkbFreeSrvLedInfo(
872706f2543Smrg	XkbSrvLedInfoPtr	/* sli */
873706f2543Smrg);
874706f2543Smrg
875706f2543Smrgextern _X_EXPORT void XkbFreeInfo(
876706f2543Smrg	XkbSrvInfoPtr		/* xkbi */
877706f2543Smrg);
878706f2543Smrg
879706f2543Smrgextern _X_EXPORT Status XkbChangeTypesOfKey(
880706f2543Smrg	XkbDescPtr		/* xkb */,
881706f2543Smrg	int			/* key */,
882706f2543Smrg	int			/* nGroups */,
883706f2543Smrg	unsigned int		/* groups */,
884706f2543Smrg	int *			/* newTypesIn */,
885706f2543Smrg	XkbMapChangesPtr	/* changes */
886706f2543Smrg);
887706f2543Smrg
888706f2543Smrgextern _X_EXPORT int XkbKeyTypesForCoreSymbols(
889706f2543Smrg	XkbDescPtr		/* xkb */,
890706f2543Smrg	int			/* map_width */,
891706f2543Smrg	KeySym *		/* core_syms */,
892706f2543Smrg	unsigned int		/* protected */,
893706f2543Smrg	int *			/* types_inout */,
894706f2543Smrg	KeySym *		/* xkb_syms_rtrn */
895706f2543Smrg);
896706f2543Smrg
897706f2543Smrgextern _X_EXPORT Bool XkbApplyCompatMapToKey(
898706f2543Smrg	XkbDescPtr		/* xkb */,
899706f2543Smrg	KeyCode			/* key */,
900706f2543Smrg	XkbChangesPtr		/* changes */
901706f2543Smrg);
902706f2543Smrg
903706f2543Smrgextern _X_EXPORT Bool XkbApplyVirtualModChanges(
904706f2543Smrg	XkbDescPtr		/* xkb */,
905706f2543Smrg	unsigned int		/* changed */,
906706f2543Smrg	XkbChangesPtr		/* changes */
907706f2543Smrg);
908706f2543Smrg
909706f2543Smrgextern _X_EXPORT void XkbSendNewKeyboardNotify(
910706f2543Smrg	DeviceIntPtr		/* kbd */,
911706f2543Smrg	xkbNewKeyboardNotify *	/* pNKN */
912706f2543Smrg);
913706f2543Smrg
914706f2543Smrgextern Bool XkbCopyKeymap(
915706f2543Smrg        XkbDescPtr              /* dst */,
916706f2543Smrg        XkbDescPtr              /* src */);
917706f2543Smrg
918706f2543Smrgextern _X_EXPORT Bool XkbCopyDeviceKeymap(
919706f2543Smrg        DeviceIntPtr            /* dst */,
920706f2543Smrg        DeviceIntPtr            /* src */);
921706f2543Smrg
922706f2543Smrgextern void XkbFilterEvents(
923706f2543Smrg        ClientPtr               /* pClient */,
924706f2543Smrg        int                     /* nEvents */,
925706f2543Smrg        xEvent*                 /* xE */);
926706f2543Smrg
927706f2543Smrgextern int XkbGetEffectiveGroup(
928706f2543Smrg        XkbSrvInfoPtr           /* xkbi */,
929706f2543Smrg        XkbStatePtr             /* xkbstate */,
930706f2543Smrg        CARD8                   /* keycode */);
931706f2543Smrg
932706f2543Smrgextern void XkbMergeLockedPtrBtns(
933706f2543Smrg        DeviceIntPtr            /* master */);
934706f2543Smrg
935706f2543Smrgextern void XkbFakeDeviceButton(
936706f2543Smrg        DeviceIntPtr            /* dev */,
937706f2543Smrg        int                     /* press */,
938706f2543Smrg        int                     /* button */);
939706f2543Smrg
940706f2543Smrg
941706f2543Smrg#include "xkbfile.h"
942706f2543Smrg#include "xkbrules.h"
943706f2543Smrg
944706f2543Smrg#define	_XkbListKeycodes	0
945706f2543Smrg#define	_XkbListTypes		1
946706f2543Smrg#define	_XkbListCompat		2
947706f2543Smrg#define	_XkbListSymbols		3
948706f2543Smrg#define	_XkbListGeometry	4
949706f2543Smrg#define	_XkbListNumComponents	5
950706f2543Smrg
951706f2543Smrgtypedef struct _XkbSrvListInfo {
952706f2543Smrg	int		szPool;
953706f2543Smrg	int		nPool;
954706f2543Smrg	char *		pool;
955706f2543Smrg
956706f2543Smrg	int		maxRtrn;
957706f2543Smrg	int		nTotal;
958706f2543Smrg
959706f2543Smrg	char *		pattern[_XkbListNumComponents];
960706f2543Smrg	int		nFound[_XkbListNumComponents];
961706f2543Smrg} XkbSrvListInfoRec,*XkbSrvListInfoPtr;
962706f2543Smrg
963706f2543Smrgextern _X_EXPORT Status	XkbDDXList(
964706f2543Smrg	DeviceIntPtr		/* dev */,
965706f2543Smrg	XkbSrvListInfoPtr	/* listing */,
966706f2543Smrg	ClientPtr		/* client */
967706f2543Smrg);
968706f2543Smrg
969706f2543Smrgextern _X_EXPORT unsigned int XkbDDXLoadKeymapByNames(
970706f2543Smrg	DeviceIntPtr		/* keybd */,
971706f2543Smrg	XkbComponentNamesPtr	/* names */,
972706f2543Smrg	unsigned int		/* want */,
973706f2543Smrg	unsigned int		/* need */,
974706f2543Smrg	XkbDescPtr *		/* finfoRtrn */,
975706f2543Smrg	char *			/* keymapNameRtrn */,
976706f2543Smrg	int 			/* keymapNameRtrnLen */
977706f2543Smrg);
978706f2543Smrg
979706f2543Smrgextern _X_EXPORT Bool XkbDDXNamesFromRules(
980706f2543Smrg	DeviceIntPtr		/* keybd */,
981706f2543Smrg	char *			/* rules */,
982706f2543Smrg	XkbRF_VarDefsPtr	/* defs */,
983706f2543Smrg	XkbComponentNamesPtr	/* names */
984706f2543Smrg);
985706f2543Smrg
986706f2543Smrgextern _X_EXPORT XkbDescPtr XkbCompileKeymap(
987706f2543Smrg        DeviceIntPtr    /* dev */,
988706f2543Smrg        XkbRMLVOSet *   /* rmlvo */
989706f2543Smrg);
990706f2543Smrg
991706f2543Smrg#endif /* _XKBSRV_H_ */
992