1 #ifndef KEYMAP_INTERN_H
2 #define KEYMAP_INTERN_H
4 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
7 Desc: Keymaps internal structure
10 #ifndef AROS_LIBCALL_H
11 # include <aros/libcall.h>
13 #ifndef EXEC_EXECBASE_H
14 # include <exec/execbase.h>
17 # include <exec/types.h>
19 #ifndef DEVICES_KEYMAP_H
20 # include <devices/keymap.h>
24 #define KEYMAPNAME "keymap.library"
26 #define DEBUG 0 /* This must be set globally because of cpak */
29 extern const UBYTE keymaptype_table
[8][8];
30 extern const UBYTE keymapstr_table
[8][8];
42 UBYTE Key_MapType
; /* KCF_xxx */
44 /* 4 character combo, pointer to string descr, or pointer to deadkey descr,
45 ** all ccording to Key_MapType
49 UBYTE KCFQual
; /* The qualifiers for the keycode, converted to KCF_xxx format */
54 BOOL
WriteToBuffer(struct BufInfo
*bufinfo
, UBYTE
*string
, LONG numchars
);
55 WORD
GetKeyInfo(struct KeyInfo
*ki
, UWORD code
, UWORD qual
, struct KeyMap
*km
);
56 WORD
GetDeadKeyIndex(UWORD code
, UWORD qual
, struct KeyMap
*km
);
59 #define GetBitProperty(ubytearray, idx) \
60 ( (ubytearray)[(idx) / 8] & ( 1 << ((idx) & 0x07) ))
62 /* Get one of the for characters in km_LoKeyMap or km_HiKeyMap addresses,
63 ** id can be 0, 1, 2, 3
65 #define GetMapChar(key_mapping, idx) \
66 ( (key_mapping >> ((3 - (idx)) * 8)) & 0x000000FF )
68 #define KMBase(x) ((struct KeymapBase *)x)
71 /* Librarybase struct */
74 struct Library LibNode
;
75 struct KeyMap
*DefaultKeymap
;
76 struct KeyMapResource KeymapResource
;
80 #endif /* KEYMAP_INTERN_H */