Terminal: added SUPPORT to the plugin, for mojo to display the keyStates
[webos-internals:applications.git] / termplugin / common.h
1 #ifndef __COMMON_H__
2 #define __COMMON_H__
3
4 #ifndef NDEBUG
5 #define DEBUG_OUTPUT                    //      allow debug output
6 #endif
7
8 //#define USE_MOJO_FOR_KEYSTATE
9
10 #ifdef DEBUG_OUTPUT
11 #define my_fprintf                              fprintf
12 #else
13 #define my_fprintf(io, fmt, ...)
14 #endif
15
16 #define RGB(r,g,b)              (((r) << 16) | ((g) << 8) | (b) | 0xFF000000)
17 //#define RGB(r, g, b)  (colorAlpha | ((r)<<16) | ((g)<<8) | (b))
18 #define max(a, b)               (       ((a) >= (b))    ? (a) : (b)     )
19 #define min(a, b)               (       ((a) <= (b))    ? (a) : (b)     )
20 //void debugLog(int line, const char *format, ...);
21 double CurrentTime();
22
23 typedef enum
24 {
25         colorAlpha              = 0xFF000000,
26         colorBlack              = colorAlpha | 0,
27         colorWhite              = colorAlpha | 0xFFFFFF,
28         colorLightGrey  = colorAlpha | 0x808080,
29         colorMediumGrey = colorAlpha | 0x777777,
30         colorRed                = colorAlpha | 0xFF0000,
31         colorGreen              = colorAlpha | 0x00FF00,
32         colorBlue               = colorAlpha | 0x0000FF,
33         colorFuchsia    = colorAlpha | 0xFF00FF,
34         colorYellow             = colorAlpha | 0xFFFF00,
35         colorAqua               = colorAlpha | 0x00FFFF,
36 }eRGB_Color;
37
38
39 typedef enum
40 {
41         ansiBlack               = 0,
42         ansiRed                 = 1,
43         ansiGreen               = 2,
44         ansiYellow              = 3,
45         ansiBlue                = 4,
46         ansiMagenta             = 5,
47         ansiCyan                = 6,
48         ansiWhite               = 7,
49         ansiColorMask   = 7,
50         ansiDefault             = 9,
51 } eANSI_Color;
52 #endif //__COMMON_H__