summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2004-03-01 13:44:11 +0000
committerEgbert Eich <eich@suse.de>2004-03-01 13:44:11 +0000
commit1a6391855115a32f7b14f829329018239de6233a (patch)
tree10e8b623597ea8890054e08955b420cbce337e4f
parent17f9321b3ef7aab3b8757ab04e9a493ccfcb8e88 (diff)
downloadxorg-proto-kbproto-XEVIE.tar.gz
3. Added missing parts to XKB to make XEVIE branch compile (Egbert Eich).XEVIE
2. Merged with XORG-CURRENT branch to obtain a bugfix (Egbert Eich). 1. First add of SUN's XIVIE extension (Stuart Kreitman).
-rw-r--r--XKB.h5
-rw-r--r--XKBsrv.h42
2 files changed, 45 insertions, 2 deletions
diff --git a/XKB.h b/XKB.h
index 8867c47..59ccc7d 100644
--- a/XKB.h
+++ b/XKB.h
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/include/extensions/XKB.h,v 1.5 2002/11/20 04:49:01 dawes Exp $ */
+/* $XFree86: xc/include/extensions/XKB.h,v 1.6 2003/12/22 17:48:02 tsi Exp $ */
#ifndef _XKB_H_
#define _XKB_H_
@@ -549,7 +549,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define XkbMaxLegalKeyCode 255
#define XkbMaxKeyCount (XkbMaxLegalKeyCode-XkbMinLegalKeyCode+1)
#define XkbPerKeyBitArraySize ((XkbMaxLegalKeyCode+1)/8)
-#define XkbIsLegalKeycode(k) (((k)>=XkbMinLegalKeyCode)&&((k)<=XkbMaxLegalKeyCode))
+/* Seems kinda silly to check that an unsigned char is <= 255... */
+#define XkbIsLegalKeycode(k) ((k)>=XkbMinLegalKeyCode)
/*
* Assorted constants and limits.
diff --git a/XKBsrv.h b/XKBsrv.h
index bfbc7bc..caed2fe 100644
--- a/XKBsrv.h
+++ b/XKBsrv.h
@@ -231,6 +231,38 @@ typedef struct _XkbSrvLedInfo {
*/
#define _XkbStateNotifyInProgress (1<<0)
+typedef struct
+{
+ ProcessInputProc processInputProc;
+ ProcessInputProc realInputProc;
+ DeviceUnwrapProc unwrapProc;
+} xkbDeviceInfoRec, *xkbDeviceInfoPtr;
+
+#define WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
+ device->public.processInputProc = proc; \
+ oldprocs->processInputProc = \
+ oldprocs->realInputProc = device->public.realInputProc; \
+ device->public.realInputProc = proc; \
+ oldprocs->unwrapProc = device->unwrapProc; \
+ device->unwrapProc = unwrapproc;
+
+#define COND_WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
+ if (device->public.processInputProc == device->public.realInputProc)\
+ device->public.processInputProc = proc; \
+ oldprocs->processInputProc = \
+ oldprocs->realInputProc = device->public.realInputProc; \
+ device->public.realInputProc = proc; \
+ oldprocs->unwrapProc = device->unwrapProc; \
+ device->unwrapProc = unwrapproc;
+
+#define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs) \
+ device->public.processInputProc = oldprocs->processInputProc; \
+ device->public.realInputProc = oldprocs->realInputProc; \
+ device->unwrapProc = oldprocs->unwrapProc;
+
+#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr) (dev)->devPrivates[xkbDevicePrivateIndex].ptr)
+
+
/***====================================================================***/
#define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask)
@@ -257,6 +289,8 @@ extern pointer XkbLastRepeatEvent;
extern CARD32 xkbDebugFlags;
extern CARD32 xkbDebugCtrls;
+extern int xkbDevicePrivateIndex;
+
#define _XkbAlloc(s) xalloc((s))
#define _XkbCalloc(n,s) Xcalloc((n)*(s))
@@ -730,6 +764,12 @@ extern void XkbHandleActions(
int /* count */
);
+extern void xkbUnwrapProc(DeviceIntPtr device, /* device */
+ DeviceHandleProc proc, /* unwrap proc */
+ pointer data /* data */
+ );
+
+
extern Bool XkbEnableDisableControls(
XkbSrvInfoPtr /* xkbi */,
unsigned long /* change */,
@@ -997,6 +1037,8 @@ extern Status XkbInitCanonicalKeyTypes(
int /* keypadVMod */
);
+extern void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc);
+
extern int XkbKeyTypesForCoreSymbols(
XkbDescPtr /* xkb */,
int /* map_width */,