author | mickeyl <mickeyl> | 2003-09-27 11:29:26 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-09-27 11:29:26 (UTC) |
commit | 651b6c612db4e809c506973996f2580c4158ac3a (patch) (unidiff) | |
tree | 8c8edc86e4b206dd4542a6b556ad1a319d6698ab /inputmethods/dasher/DasherTypes.h | |
parent | d1a11b45e805fe7771ea05944757d767c3c4c8ea (diff) | |
download | opie-651b6c612db4e809c506973996f2580c4158ac3a.zip opie-651b6c612db4e809c506973996f2580c4158ac3a.tar.gz opie-651b6c612db4e809c506973996f2580c4158ac3a.tar.bz2 |
merge dasher which has been introduced in BRANCH first (wtf?) into HEAD
Diffstat (limited to 'inputmethods/dasher/DasherTypes.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/dasher/DasherTypes.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/inputmethods/dasher/DasherTypes.h b/inputmethods/dasher/DasherTypes.h new file mode 100644 index 0000000..8885052 --- a/dev/null +++ b/inputmethods/dasher/DasherTypes.h | |||
@@ -0,0 +1,66 @@ | |||
1 | // DasherTypes.h | ||
2 | // | ||
3 | ///////////////////////////////////////////////////////////////////////////// | ||
4 | // | ||
5 | // Copyright (c) 2001-2002 David Ward | ||
6 | // | ||
7 | ///////////////////////////////////////////////////////////////////////////// | ||
8 | |||
9 | |||
10 | #ifndef __DasherTypes_h__ | ||
11 | #define __DasherTypes_h__ | ||
12 | |||
13 | namespace Dasher | ||
14 | { | ||
15 | /* TODO: note by IAM 08/2002 {{{ | ||
16 | |||
17 | MS docs tell us the __int64 type has no ANSI equivalent | ||
18 | I've checked and currently a 32bit long leads to problems. | ||
19 | The code could probably be altered to get around this 64bit | ||
20 | precision requirement. If not a custom class could be found | ||
21 | (or implemented fairly easily). However, as GCC supports | ||
22 | "long long int" I'm giving this low priority until someone | ||
23 | complains... | ||
24 | |||
25 | "ISO C99 supports data types for integers that are at least 64 bits wide, | ||
26 | and as an extension GCC supports them in C89 mode and in C++." | ||
27 | |||
28 | I've heard some compilers have a "quad int". If "long long int" does not | ||
29 | work, try that. | ||
30 | }}} */ | ||
31 | #ifdef _MSC_VER | ||
32 | typedef __int64 myint; | ||
33 | #define LLONG_MAX 9223372036854775807 | ||
34 | #define LLONG_MIN (-LLONG_MAX - 1) | ||
35 | #else | ||
36 | typedef long long int myint; | ||
37 | #define LLONG_MAX 9223372036854775807LL | ||
38 | #define LLONG_MIN (-LLONG_MAX - 1LL) | ||
39 | #endif | ||
40 | |||
41 | // Using a signed symbol type allows "Out of band" ie negative {{{ | ||
42 | // values to be used to flag non-symbol data. For example commands | ||
43 | // in dasher nodes. | ||
44 | //typedef unsigned int symbol; // }}} | ||
45 | typedef int symbol; | ||
46 | |||
47 | //typedef unsigned int uint; | ||
48 | //typedef unsigned short ushort; | ||
49 | |||
50 | namespace Opts | ||
51 | { | ||
52 | // Numbers should be applied to elements of the following two enumerations as these preferences may be stored to file. Constancy between | ||
53 | // versions is a good idea. It should *not* be assumed that the numbers map onto anything useful. Different codepages may be appropriate on different systems for different character sets. | ||
54 | enum FileEncodingFormats {UserDefault=-1, AlphabetDefault=-2, UTF8=65001, UTF16LE=1200, UTF16BE=1201}; | ||
55 | enum AlphabetTypes {MyNone=0, Arabic=1256, Baltic=1257, CentralEurope=1250, ChineseSimplified=936, ChineseTraditional=950, Cyrillic=1251, Greek=1253, Hebrew=1255, Japanese=932, Korean=949, Thai=874, Turkish=1254, VietNam=1258, Western=1252}; | ||
56 | enum ScreenOrientations {Alphabet=-2, LeftToRight=0, RightToLeft=1, TopToBottom=2, BottomToTop=3}; | ||
57 | // TODO: Possibly make colors long and add an RGB item to this {{{ | ||
58 | // Would allow literal as well as semantic colors for | ||
59 | // greater flexibility. }}} | ||
60 | enum ColorSchemes {Nodes1=0, Nodes2=1, Special1=2, Special2=3, Groups=4, Objects=5}; | ||
61 | enum FontSize {Normal=1, Big=2, VBig=4}; | ||
62 | } | ||
63 | |||
64 | } | ||
65 | |||
66 | #endif /* #ifndef __DasherTypes_h__ */ | ||