00001 // DasherTypes.h 00002 // 00004 // 00005 // Copyright (c) 2001-2002 David Ward 00006 // 00008 00009 00010 #ifndef __DasherTypes_h__ 00011 #define __DasherTypes_h__ 00012 00013 namespace Dasher 00014 { 00015 /* TODO: note by IAM 08/2002 {{{ 00016 00017 MS docs tell us the __int64 type has no ANSI equivalent 00018 I've checked and currently a 32bit long leads to problems. 00019 The code could probably be altered to get around this 64bit 00020 precision requirement. If not a custom class could be found 00021 (or implemented fairly easily). However, as GCC supports 00022 "long long int" I'm giving this low priority until someone 00023 complains... 00024 00025 "ISO C99 supports data types for integers that are at least 64 bits wide, 00026 and as an extension GCC supports them in C89 mode and in C++." 00027 00028 I've heard some compilers have a "quad int". If "long long int" does not 00029 work, try that. 00030 }}} */ 00031 #ifdef _MSC_VER 00032 typedef __int64 myint; 00033 #define LLONG_MAX 9223372036854775807 00034 #define LLONG_MIN (-LLONG_MAX - 1) 00035 #else 00036 typedef long long int myint; 00037 #define LLONG_MAX 9223372036854775807LL 00038 #define LLONG_MIN (-LLONG_MAX - 1LL) 00039 #endif 00040 00041 // Using a signed symbol type allows "Out of band" ie negative {{{ 00042 // values to be used to flag non-symbol data. For example commands 00043 // in dasher nodes. 00044 //typedef unsigned int symbol; // }}} 00045 typedef int symbol; 00046 00047 // typedef unsigned int uint; 00048 // typedef unsigned short ushort; 00049 00050 namespace Opts 00051 { 00052 // Numbers should be applied to elements of the following two enumerations as these preferences may be stored to file. Constancy between 00053 // 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. 00054 enum FileEncodingFormats {UserDefault=-1, AlphabetDefault=-2, UTF8=65001, UTF16LE=1200, UTF16BE=1201}; 00055 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}; 00056 enum ScreenOrientations {Alphabet=-2, LeftToRight=0, RightToLeft=1, TopToBottom=2, BottomToTop=3}; 00057 // TODO: Possibly make colors long and add an RGB item to this {{{ 00058 // Would allow literal as well as semantic colors for 00059 // greater flexibility. }}} 00060 enum ColorSchemes {Nodes1=0, Nodes2=1, Special1=2, Special2=3, Groups=4, Objects=5}; 00061 enum FontSize {Normal=1, Big=2, VBig=4}; 00062 } 00063 00064 } 00065 00066 #endif /* #ifndef __DasherTypes_h__ */
1.4.2