summaryrefslogtreecommitdiff
path: root/imtable.h
blob: f6efe8c7ec1e6fce82b48f547b2c7b09a7778dbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//Generic Input Method Used in Testing, see boshiamy.h for full implementation
//number of entries



//indicators for turning the im on and off
#define IM_ON_INDICATOR "開"
//string length in bytes
#define IM_ON_INDICATOR_LEN 3
#define IM_OFF_INDICATOR "關"
#define IM_OFF_INDICATOR_LEN 3
//width of the indicator as displayed on the terminal
#define IM_INDICATOR_WIDTH 2


//length of input method table
#define IM_TABLE_LEN 5
//length of entry fields in bytes
#define IM_TABLE_ENTRY_LEN 8
//maximum entry width as displayed on terminal
#define IM_TABLE_ENTRY_WIDTH 2

//the first field is the sequence of ascii characters (including space and
//numbers) used to get to a character, second field is the character itself,
//last firled is unused.

//NOTE: This list HAS TO BE SORTED, as a binary search is used on it

//For example, pressing "a<space>" will yield 對
char im_table[][3][IM_TABLE_ENTRY_LEN] = {
	{"a ", "對", "100"},
	{"aa ", "對", "100"},
	{"b ", "八", "100"},
	{"ba ", "不", "100"},
	{"e1", "一", "100"},
};