Move XKB_KEY_NoSymbol to xkbcommon-keysyms.h

This avoids a couple of special cases in the code, and is more
consistent. Since anyone who includes xkbcommon.h also gets
xkbcommon-keysyms.h, and anyone who include xkbcommon-keysyms.h would
want NoSymbol anyway, there's no down side.

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2012-05-20 20:39:35 +03:00
parent 1c27bb8e77
commit 58b030bb90
4 changed files with 1 additions and 13 deletions

View File

@ -112,6 +112,7 @@ SOFTWARE.
* *
*/ */
#define XKB_KEY_NoSymbol 0x000000 /* Special KeySym */
#define XKB_KEY_VoidSymbol 0xffffff /* Void symbol */ #define XKB_KEY_VoidSymbol 0xffffff /* Void symbol */
/* /*

View File

@ -87,8 +87,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <xkbcommon/xkbcommon-names.h> #include <xkbcommon/xkbcommon-names.h>
#include <xkbcommon/xkbcommon-keysyms.h> #include <xkbcommon/xkbcommon-keysyms.h>
#define XKB_KEY_NoSymbol 0L /* special KeySym */
typedef uint32_t xkb_keycode_t; typedef uint32_t xkb_keycode_t;
typedef uint32_t xkb_keysym_t; typedef uint32_t xkb_keysym_t;
typedef uint32_t xkb_mod_index_t; typedef uint32_t xkb_mod_index_t;

View File

@ -132,11 +132,6 @@ main(int argc, char *argv[])
fclose(fptr); fclose(fptr);
} }
/* Special case XKB_KEY_NoSymbol. */
info[ksnum].name = strdup("NoSymbol");
info[ksnum].val = XKB_KEY_NoSymbol;
ksnum++;
printf("/* This file is generated from keysymdef.h. */\n"); printf("/* This file is generated from keysymdef.h. */\n");
printf("/* Do not edit. */\n"); printf("/* Do not edit. */\n");
printf("\n"); printf("\n");

View File

@ -44,12 +44,6 @@ xkb_keysym_get_name(xkb_keysym_t ks, char *buffer, size_t size)
return; return;
} }
/* Not listed in keysymdef.h for hysterical raisins. */
if (ks == XKB_KEY_NoSymbol) {
snprintf(buffer, size, "NoSymbol");
return;
}
/* Try to find it in our hash table. */ /* Try to find it in our hash table. */
if (ks <= 0x1fffffff) { if (ks <= 0x1fffffff) {
val1 = ks >> 24; val1 = ks >> 24;