summaryrefslogtreecommitdiff
path: root/src/xkbcomp/ast-build.h
diff options
context:
space:
mode:
authorRan Benita <ran234@gmail.com>2012-09-27 18:49:13 +0200
committerRan Benita <ran234@gmail.com>2012-09-27 21:12:08 +0200
commit3b389b15bfaa33874ee6a2c308241984c8727faa (patch)
tree8302997228575ce60ba9bcfccfc710961a9f7444 /src/xkbcomp/ast-build.h
parent53cfe8c36211fe3d1fb7576d2c9498f7f67ea6af (diff)
downloadlibxkbcommon-3b389b15bfaa33874ee6a2c308241984c8727faa.tar.gz
libxkbcommon-3b389b15bfaa33874ee6a2c308241984c8727faa.tar.bz2
libxkbcommon-3b389b15bfaa33874ee6a2c308241984c8727faa.zip
Don't limit key names to 4 characters
Currently you can't give a key in xkb_keycodes a name of more than XKB_KEY_NAME_LENGTH (= 4) chars. This is a pretty annoying and arbitrary limitation; it leads to names such as <RTSH>, <COMP>, <PRSC>, <KPAD> etc. which may be hard to decipher, and makes it impossible to give more standard names (e.g. from linux/input.h) to keycodes. The purpose of this, as far as I can tell, was to save memory and to allow encoding a key name directly to a 32 bit value (unsigned long it was). We remove this limitation by just storing the names as atoms; this lifts the limit, allows for easy comparison like the unsigned long thing, and doesn't use more memory than previous solution. It also relieves us from doing all of the annoying conversions to/from long. This has a large diffstat only because KeyNameText, which is used a lot, now needs to take the context in order to resolve the atom. Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/xkbcomp/ast-build.h')
-rw-r--r--src/xkbcomp/ast-build.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xkbcomp/ast-build.h b/src/xkbcomp/ast-build.h
index 4f19d2c..d433240 100644
--- a/src/xkbcomp/ast-build.h
+++ b/src/xkbcomp/ast-build.h
@@ -41,10 +41,10 @@ ExprDef *
ExprCreateBinary(enum expr_op_type op, ExprDef *left, ExprDef *right);
KeycodeDef *
-KeycodeCreate(char keyName[XKB_KEY_NAME_LENGTH], unsigned long value);
+KeycodeCreate(xkb_atom_t name, unsigned long value);
KeyAliasDef *
-KeyAliasCreate(char keyName[XKB_KEY_NAME_LENGTH], char real[XKB_KEY_NAME_LENGTH]);
+KeyAliasCreate(xkb_atom_t alias, xkb_atom_t real);
VModDef *
VModCreate(xkb_atom_t name, ExprDef *value);
@@ -62,7 +62,7 @@ KeyTypeDef *
KeyTypeCreate(xkb_atom_t name, VarDef *body);
SymbolsDef *
-SymbolsCreate(char keyName[XKB_KEY_NAME_LENGTH], ExprDef *symbols);
+SymbolsCreate(xkb_atom_t keyName, ExprDef *symbols);
GroupCompatDef *
GroupCompatCreate(int group, ExprDef *def);