diff options
author | Daniel Stone <daniel@fooishbar.org> | 2009-04-25 22:11:19 +1000 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2009-06-11 03:54:10 +1000 |
commit | 305ab237f666936cd812c464bf43f86f6079838e (patch) | |
tree | e3e1b7066e2eaf1491361e35f320dd93607aa79f /hw/kdrive | |
parent | 4c8812b544ce5f319a7ac59a131c626c8509ef99 (diff) |
KDrive: Warning fixes and cleanups
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'hw/kdrive')
-rw-r--r-- | hw/kdrive/ephyr/XF86dri.c | 46 | ||||
-rw-r--r-- | hw/kdrive/ephyr/ephyr.c | 20 | ||||
-rw-r--r-- | hw/kdrive/ephyr/hostx.c | 2 | ||||
-rw-r--r-- | hw/kdrive/linux/evdev.c | 15 | ||||
-rw-r--r-- | hw/kdrive/linux/keyboard.c | 6 | ||||
-rw-r--r-- | hw/kdrive/linux/linux.c | 2 | ||||
-rw-r--r-- | hw/kdrive/src/Makefile.am | 1 | ||||
-rw-r--r-- | hw/kdrive/src/kdrive.h | 7 | ||||
-rw-r--r-- | hw/kdrive/src/kinput.c | 48 | ||||
-rw-r--r-- | hw/kdrive/src/kkeymap.c | 189 | ||||
-rw-r--r-- | hw/kdrive/src/kkeymap.h | 55 |
11 files changed, 32 insertions, 359 deletions
diff --git a/hw/kdrive/ephyr/XF86dri.c b/hw/kdrive/ephyr/XF86dri.c index 237033a36..e94a7f0f0 100644 --- a/hw/kdrive/ephyr/XF86dri.c +++ b/hw/kdrive/ephyr/XF86dri.c @@ -133,11 +133,8 @@ Bool XF86DRIQueryExtension (Display *dpy, int *event_basep, int *error_basep) } } -Bool XF86DRIQueryVersion(dpy, majorVersion, minorVersion, patchVersion) - Display* dpy; - int* majorVersion; - int* minorVersion; - int* patchVersion; +Bool XF86DRIQueryVersion(Display *dpy, int *majorVersion, int *minorVersion, + int *patchVersion) { XExtDisplayInfo *info = find_display (dpy); xXF86DRIQueryVersionReply rep; @@ -241,10 +238,7 @@ XF86DRIOpenConnection (Display *dpy, int screen, return True; } -Bool XF86DRIAuthConnection(dpy, screen, magic) - Display* dpy; - int screen; - drm_magic_t magic; +Bool XF86DRIAuthConnection(Display *dpy, int screen, drm_magic_t magic) { XExtDisplayInfo *info = find_display (dpy); xXF86DRIAuthConnectionReq *req; @@ -272,9 +266,7 @@ Bool XF86DRIAuthConnection(dpy, screen, magic) return True; } -Bool XF86DRICloseConnection(dpy, screen) - Display* dpy; - int screen; +Bool XF86DRICloseConnection(Display *dpy, int screen) { XExtDisplayInfo *info = find_display (dpy); xXF86DRICloseConnectionReq *req; @@ -294,14 +286,11 @@ Bool XF86DRICloseConnection(dpy, screen) return True; } -Bool XF86DRIGetClientDriverName(dpy, screen, ddxDriverMajorVersion, - ddxDriverMinorVersion, ddxDriverPatchVersion, clientDriverName) - Display* dpy; - int screen; - int* ddxDriverMajorVersion; - int* ddxDriverMinorVersion; - int* ddxDriverPatchVersion; - char** clientDriverName; +Bool XF86DRIGetClientDriverName(Display *dpy, int screen, + int *ddxDriverMajorVersion, + int *ddxDriverMinorVersion, + int *ddxDriverPatchVersion, + char **clientDriverName) { XExtDisplayInfo *info = find_display (dpy); xXF86DRIGetClientDriverNameReply rep; @@ -344,13 +333,8 @@ Bool XF86DRIGetClientDriverName(dpy, screen, ddxDriverMajorVersion, return True; } -Bool XF86DRICreateContextWithConfig(dpy, screen, configID, context, - hHWContext) - Display* dpy; - int screen; - int configID; - XID* context; - drm_context_t * hHWContext; +Bool XF86DRICreateContextWithConfig(Display *dpy, int screen, int configID, + XID *context, drm_context_t *hHWContext) { XExtDisplayInfo *info = find_display (dpy); xXF86DRICreateContextReply rep; @@ -380,12 +364,8 @@ Bool XF86DRICreateContextWithConfig(dpy, screen, configID, context, return True; } -Bool XF86DRICreateContext(dpy, screen, visual, context, hHWContext) - Display* dpy; - int screen; - Visual* visual; - XID* context; - drm_context_t * hHWContext; +Bool XF86DRICreateContext(Display *dpy, int screen, Visual *visual, + XID *context, drm_context_t *hHWContext) { return XF86DRICreateContextWithConfig( dpy, screen, visual->visualid, context, hHWContext ); diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 345ae5b91..296284a01 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -429,9 +429,7 @@ ephyrRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) RRScreenSizePtr pSize; Rotation randr; int n = 0; - - EPHYR_LOG("mark"); - + struct { int width, height; } sizes[] = { { 1600, 1200 }, @@ -452,6 +450,8 @@ ephyrRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) { 0, 0 } }; + EPHYR_LOG("mark"); + *rotations = RR_Rotate_All|RR_Reflect_All; if (!hostx_want_preexisting_window (screen) @@ -743,6 +743,7 @@ ephyrScreenFini (KdScreenInfo *screen) void ephyrUpdateModifierState(unsigned int state) { +#if 0 DeviceIntPtr pkeydev; KeyClassPtr keyc; int i; @@ -764,7 +765,7 @@ ephyrUpdateModifierState(unsigned int state) * * -daniels */ -#if 0 + keyc = pkeydev->key; state = state & 0xff; @@ -1120,13 +1121,8 @@ EphyrKeyboardInit (KdKeyboardInfo *ki) ErrorF("Couldn't load keymap from host\n"); return BadAlloc; } - ki->keySyms.minKeyCode = ephyrKeySyms.minKeyCode; - ki->keySyms.maxKeyCode = ephyrKeySyms.maxKeyCode; - ki->minScanCode = ki->keySyms.minKeyCode; - ki->maxScanCode = ki->keySyms.maxKeyCode; - ki->keySyms.mapWidth = ephyrKeySyms.mapWidth; - xfree(ki->keySyms.map); - ki->keySyms.map = ephyrKeySyms.map; + ki->minScanCode = ephyrKeySyms.minKeyCode; + ki->maxScanCode = ephyrKeySyms.maxKeyCode; ki->name = strdup("Xephyr virtual keyboard"); ephyrKbd = ki; return Success; @@ -1149,8 +1145,6 @@ EphyrKeyboardDisable (KdKeyboardInfo *ki) static void EphyrKeyboardFini (KdKeyboardInfo *ki) { - /* not xfree: we call malloc from hostx.c. */ - free(ki->keySyms.map); ephyrKbd = NULL; return; } diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index 46645d34e..d546370ba 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -595,7 +595,7 @@ hostx_calculate_color_shift(unsigned long mask) { int shift = 1; /* count # of bits in mask */ - while (mask=(mask>>1)) shift++; + while ((mask = (mask >> 1))) shift++; /* cmap entry is an unsigned char so adjust it by size of that */ shift = shift - sizeof(unsigned char) * 8; if (shift < 0) shift = 0; diff --git a/hw/kdrive/linux/evdev.c b/hw/kdrive/linux/evdev.c index e831c9a1b..f6017ba51 100644 --- a/hw/kdrive/linux/evdev.c +++ b/hw/kdrive/linux/evdev.c @@ -233,6 +233,8 @@ static Status EvdevPtrEnable (KdPointerInfo *pi) { int fd; + unsigned long ev[NBITS(EV_MAX)]; + Kevdev *ke; if (!pi || !pi->path) return BadImplementation; @@ -241,8 +243,6 @@ EvdevPtrEnable (KdPointerInfo *pi) if (fd < 0) return BadMatch; - unsigned long ev[NBITS(EV_MAX)]; - Kevdev *ke; if (ioctl (fd, EVIOCGBIT(0 /*EV*/, sizeof (ev)), ev) < 0) { @@ -352,18 +352,11 @@ EvdevPtrFini (KdPointerInfo *pi) static void readMapping (KdKeyboardInfo *ki) { - int minScanCode, maxScanCode; - if (!ki) return; - minScanCode = 0; - maxScanCode = 193; - - ki->keySyms.mapWidth = 2; - - ki->minScanCode = minScanCode; - ki->maxScanCode = maxScanCode; + ki->minScanCode = 0; + ki->maxScanCode = 193; } static void diff --git a/hw/kdrive/linux/keyboard.c b/hw/kdrive/linux/keyboard.c index 28ece3d9b..79cf59898 100644 --- a/hw/kdrive/linux/keyboard.c +++ b/hw/kdrive/linux/keyboard.c @@ -42,8 +42,6 @@ #include <sys/ioctl.h> extern int LinuxConsoleFd; -static unsigned char mediumraw_data, mediumraw_up; -static enum { DEFAULT, EXTBYTE1, EXTBYTE2 } mediumraw_state = DEFAULT; static const KeySym linux_to_x[256] = { NoSymbol, NoSymbol, NoSymbol, NoSymbol, @@ -136,6 +134,7 @@ static const KeySym linux_to_x[256] = { for the core X keyboard protocol has to be AT-scancode based so that it corresponds to the Xkb keymap. */ +#if 0 static unsigned char at2lnx[] = { 0x0, /* no valid scancode */ @@ -215,10 +214,12 @@ static unsigned char tbl[KD_MAX_WIDTH] = (1 << KG_ALTGR), (1 << KG_ALTGR) | (1 << KG_SHIFT) }; +#endif static void readKernelMapping(KdKeyboardInfo *ki) { +#if 0 KeySym *k; int i, j; struct kbentry kbe; @@ -484,6 +485,7 @@ readKernelMapping(KdKeyboardInfo *ki) } ki->minScanCode = minKeyCode; ki->maxScanCode = maxKeyCode; +#endif } /* diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c index 79f3fbd41..3fba056df 100644 --- a/hw/kdrive/linux/linux.c +++ b/hw/kdrive/linux/linux.c @@ -448,7 +448,7 @@ LinuxFini (void) } void -KdOsAddInputDrivers () +KdOsAddInputDrivers (void) { KdAddPointerDriver(&LinuxMouseDriver); KdAddPointerDriver(&MsMouseDriver); diff --git a/hw/kdrive/src/Makefile.am b/hw/kdrive/src/Makefile.am index 968978ed3..7ac23c2aa 100644 --- a/hw/kdrive/src/Makefile.am +++ b/hw/kdrive/src/Makefile.am @@ -20,7 +20,6 @@ libkdrive_la_SOURCES = \ kdrive.h \ kinfo.c \ kinput.c \ - kkeymap.c \ kmap.c \ kmode.c \ kshadow.c \ diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h index ce47cf4fa..6fdb7087f 100644 --- a/hw/kdrive/src/kdrive.h +++ b/hw/kdrive/src/kdrive.h @@ -275,11 +275,6 @@ typedef struct { int modbit; } KdKeySymModsRec; -extern const KeySym kdDefaultKeymap[KD_MAX_LENGTH * KD_MAX_WIDTH]; -extern const int kdDefaultKeymapWidth; -extern const CARD8 kdDefaultModMap[MAP_LENGTH]; -extern const KeySymsRec kdDefaultKeySyms; - typedef struct _KdKeyboardInfo KdKeyboardInfo; typedef struct _KdKeyboardDriver { @@ -308,10 +303,8 @@ struct _KdKeyboardInfo { char *xkbOptions; int LockLed; - CARD8 keyState[KD_KEY_COUNT/8]; int minScanCode; int maxScanCode; - KeySymsRec keySyms; int leds; int bellPitch; diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 360739cac..94bdfe830 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -846,23 +846,9 @@ KdKeyboardInfo * KdNewKeyboard (void) { KdKeyboardInfo *ki = xcalloc(sizeof(KdKeyboardInfo), 1); - if (!ki) return NULL; - - ki->keySyms.map = (KeySym *)xcalloc(sizeof(KeySym), - KD_MAX_LENGTH * - kdDefaultKeySyms.mapWidth); - if (!ki->keySyms.map) { - xfree(ki); - return NULL; - } - memcpy(ki->keySyms.map, kdDefaultKeySyms.map, - sizeof(KeySym) * (KD_MAX_LENGTH * kdDefaultKeySyms.mapWidth)); - ki->keySyms.minKeyCode = kdDefaultKeySyms.minKeyCode; - ki->keySyms.maxKeyCode = kdDefaultKeySyms.maxKeyCode; - ki->keySyms.mapWidth = kdDefaultKeySyms.mapWidth; ki->minScanCode = 0; ki->maxScanCode = 0; ki->leds = 0; @@ -1770,41 +1756,10 @@ KdReceiveTimeout (KdPointerInfo *pi) extern int nClients; -/* - * kdEnqueueKeyboardEvent - * - * This function converts hardware keyboard event information into an X event - * and enqueues it using MI. It wakes up the server before returning so that - * the event will be processed normally. - * - */ - -static void -KdHandleKeyboardEvent (KdKeyboardInfo *ki, int type, int key) -{ - int byte; - CARD8 bit; - KdPointerInfo *pi; - - byte = key >> 3; - bit = 1 << (key & 7); - - switch (type) { - case KeyPress: - ki->keyState[byte] |= bit; - break; - case KeyRelease: - ki->keyState[byte] &= ~bit; - break; - } - - for (pi = kdPointers; pi; pi = pi->next) - KdRunMouseMachine (pi, keyboard, 0, 0, 0, 0, 0, 0); -} - void KdReleaseAllKeys (void) { +#if 0 int key, nEvents, i; KdKeyboardInfo *ki; @@ -1824,6 +1779,7 @@ KdReleaseAllKeys (void) } KdUnblockSigio (); +#endif } static void diff --git a/hw/kdrive/src/kkeymap.c b/hw/kdrive/src/kkeymap.c deleted file mode 100644 index ae90a3499..000000000 --- a/hw/kdrive/src/kkeymap.c +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include <kdrive-config.h> -#endif -#include "kdrive.h" -#include <X11/keysym.h> - -/* - * Map scan codes (both regular and synthesized from extended keys) - * to X keysyms - */ - -const KeySym kdDefaultKeymap[KD_MAX_LENGTH * KD_MAX_WIDTH] = { -/* These are directly mapped from DOS scanset 0 */ -/* 1 8 */ XK_Escape, NoSymbol, -/* 2 9 */ XK_1, XK_exclam, -/* 3 10 */ XK_2, XK_at, -/* 4 11 */ XK_3, XK_numbersign, -/* 5 12 */ XK_4, XK_dollar, -/* 6 13 */ XK_5, XK_percent, -/* 7 14 */ XK_6, XK_asciicircum, -/* 8 15 */ XK_7, XK_ampersand, -/* 9 16 */ XK_8, XK_asterisk, -/* 10 17 */ XK_9, XK_parenleft, -/* 11 18 */ XK_0, XK_parenright, -/* 12 19 */ XK_minus, XK_underscore, -/* 13 20 */ XK_equal, XK_plus, -/* 14 21 */ XK_BackSpace, NoSymbol, -/* 15 22 */ XK_Tab, NoSymbol, -/* 16 23 */ XK_Q, NoSymbol, -/* 17 24 */ XK_W, NoSymbol, -/* 18 25 */ XK_E, NoSymbol, -/* 19 26 */ XK_R, NoSymbol, -/* 20 27 */ XK_T, NoSymbol, -/* 21 28 */ XK_Y, NoSymbol, -/* 22 29 */ XK_U, NoSymbol, -/* 23 30 */ XK_I, NoSymbol, -/* 24 31 */ XK_O, NoSymbol, -/* 25 32 */ XK_P, NoSymbol, -/* 26 33 */ XK_bracketleft, XK_braceleft, -/* 27 34 */ XK_bracketright, XK_braceright, -/* 28 35 */ XK_Return, NoSymbol, -/* 29 36 */ XK_Control_L, NoSymbol, -/* 30 37 */ XK_A, NoSymbol, -/* 31 38 */ XK_S, NoSymbol, -/* 32 39 */ XK_D, NoSymbol, -/* 33 40 */ XK_F, NoSymbol, -/* 34 41 */ XK_G, NoSymbol, -/* 35 42 */ XK_H, NoSymbol, -/* 36 43 */ XK_J, NoSymbol, -/* 37 44 */ XK_K, NoSymbol, -/* 38 45 */ XK_L, NoSymbol, -/* 39 46 */ XK_semicolon, XK_colon, -/* 40 47 */ XK_apostrophe, XK_quotedbl, -/* 41 48 */ XK_grave, XK_asciitilde, -/* 42 49 */ XK_Shift_L, NoSymbol, -/* 43 50 */ XK_backslash, XK_bar, -/* 44 51 */ XK_Z, NoSymbol, -/* 45 52 */ XK_X, NoSymbol, -/* 46 53 */ XK_C, NoSymbol, -/* 47 54 */ XK_V, NoSymbol, -/* 48 55 */ XK_B, NoSymbol, -/* 49 56 */ XK_N, NoSymbol, -/* 50 57 */ XK_M, NoSymbol, -/* 51 58 */ XK_comma, XK_less, -/* 52 59 */ XK_period, XK_greater, -/* 53 60 */ XK_slash, XK_question, -/* 54 61 */ XK_Shift_R, NoSymbol, -/* 55 62 */ XK_KP_Multiply, NoSymbol, -/* 56 63 */ XK_Alt_L, XK_Meta_L, -/* 57 64 */ XK_space, NoSymbol, -/* 58 65 */ XK_Caps_Lock, NoSymbol, -/* 59 66 */ XK_F1, NoSymbol, -/* 60 67 */ XK_F2, NoSymbol, -/* 61 68 */ XK_F3, NoSymbol, -/* 62 69 */ XK_F4, NoSymbol, -/* 63 70 */ XK_F5, NoSymbol, -/* 64 71 */ XK_F6, NoSymbol, -/* 65 72 */ XK_F7, NoSymbol, -/* 66 73 */ XK_F8, NoSymbol, -/* 67 74 */ XK_F9, NoSymbol, -/* 68 75 */ XK_F10, NoSymbol, -/* 69 76 */ XK_Break, XK_Pause, -/* 70 77 */ XK_Scroll_Lock, NoSymbol, -/* 71 78 */ XK_KP_Home, XK_KP_7, -/* 72 79 */ XK_KP_Up, XK_KP_8, -/* 73 80 */ XK_KP_Page_Up, XK_KP_9, -/* 74 81 */ XK_KP_Subtract, NoSymbol, -/* 75 82 */ XK_KP_Left, XK_KP_4, -/* 76 83 */ XK_KP_5, NoSymbol, -/* 77 84 */ XK_KP_Right, XK_KP_6, -/* 78 85 */ XK_KP_Add, NoSymbol, -/* 79 86 */ XK_KP_End, XK_KP_1, -/* 80 87 */ XK_KP_Down, XK_KP_2, -/* 81 88 */ XK_KP_Page_Down, XK_KP_3, -/* 82 89 */ XK_KP_Insert, XK_KP_0, -/* 83 90 */ XK_KP_Delete, XK_KP_Decimal, -/* 84 91 */ NoSymbol, NoSymbol, -/* 85 92 */ NoSymbol, NoSymbol, -/* 86 93 */ NoSymbol, NoSymbol, -/* 87 94 */ XK_F11, NoSymbol, -/* 88 95 */ XK_F12, NoSymbol, - -/* These are remapped from the extended set (using ExtendMap) */ - -/* 89 96 */ XK_Control_R, NoSymbol, -/* 90 97 */ XK_KP_Enter, NoSymbol, -/* 91 98 */ XK_KP_Divide, NoSymbol, -/* 92 99 */ XK_Sys_Req, XK_Print, -/* 93 100 */ XK_Alt_R, XK_Meta_R, -/* 94 101 */ XK_Num_Lock, NoSymbol, -/* 95 102 */ XK_Home, NoSymbol, -/* 96 103 */ XK_Up, NoSymbol, -/* 97 104 */ XK_Page_Up, NoSymbol, -/* 98 105 */ XK_Left, NoSymbol, -/* 99 106 */ XK_Right, NoSymbol, -/* 100 107 */ XK_End, NoSymbol, -/* 101 108 */ XK_Down, NoSymbol, -/* 102 109 */ XK_Page_Down, NoSymbol, -/* 103 110 */ XK_Insert, NoSymbol, -/* 104 111 */ XK_Delete, NoSymbol, -/* 105 112 */ XK_Super_L, NoSymbol, -/* 106 113 */ XK_Super_R, NoSymbol, -/* 107 114 */ XK_Menu, NoSymbol, -/* 108 115 */ NoSymbol, NoSymbol, -/* 109 116 */ NoSymbol, NoSymbol, -/* 110 117 */ NoSymbol, NoSymbol, -/* 111 118 */ NoSymbol, NoSymbol, -/* 112 119 */ NoSymbol, NoSymbol, -}; - -/* - * List of locking key codes - */ - -CARD8 kdLockMap[] = { - 65, - 101, - 77, -}; - -#define NUM_LOCK (sizeof (kdLockMap) / sizeof (kdLockMap[0])) - -int kdNumLock = NUM_LOCK; - -/* - * Map containing list of keys which the X server makes locking when - * the KEYMAP_LOCKING_ALTGR flag is set in CEKeymapFlags - */ - -CARD8 kdOptionalLockMap[] = { - 100, -}; - -#define NUM_OPTIONAL_LOCK (sizeof (kdOptionalLockMap) / sizeof (kdOptionalLockMap[0])) - -int kdNumOptionalLock = NUM_OPTIONAL_LOCK; - -const CARD8 kdDefaultModMap[MAP_LENGTH]; - -unsigned long kdDefaultKeymapFlags = 0; - -const KeySymsRec kdDefaultKeySyms = { - kdDefaultKeymap, - KD_MIN_KEYCODE, - KD_MAX_KEYCODE, - KD_MAX_WIDTH -}; diff --git a/hw/kdrive/src/kkeymap.h b/hw/kdrive/src/kkeymap.h deleted file mode 100644 index f66cfa49a..000000000 --- a/hw/kdrive/src/kkeymap.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -/* - * All global variables and functions pertaining to keyboard key mapping - * live in this header file. - */ - -#ifndef _KKEYMAP_H -#define _KKEYMAP_H - -/* Offset of MIN_SCANCODE to 8 (X minimum scancode value) */ -#define KD_KEY_OFFSET (8 - kdMinScanCode) - -#define KD_MIN_KEYCODE 8 -#define KD_MAX_KEYCODE 254 -#define KD_MAX_WIDTH 4 -#define KD_MAX_LENGTH (KD_MAX_KEYCODE - KD_MIN_KEYCODE + 1) - -extern int kdMinScanCode; -extern int kdMaxScanCode; -extern int kdMinKeyCode; -extern int kdMaxKeyCode; -extern int kdKeymapWidth; - -extern KeySym kdKeymap[KD_MAX_LENGTH * KD_MAX_WIDTH]; - -extern CARD8 kdModMap[MAP_LENGTH]; - -extern KeySymsRec kdKeySyms; - -typedef struct { - KeySym modsym; - int modbit; -} KdKeySymModsRec; - -#endif /* _KKEYMAP_H */ |