root/include/color.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef CHDK_COLOR_H
   2 #define CHDK_COLOR_H
   3 
   4 // CHDK color definitions
   5 
   6 // Note: used in modules and platform independent code. 
   7 // Do not add platform dependent stuff in here (#ifdef/#endif compile options or camera dependent values)
   8 
   9 //==========================================================
  10 
  11 // Structures to store user configurable color entry
  12 #pragma pack(1)     // make sure they are packed as tightly as possible
  13 
  14 typedef struct {
  15     unsigned char   col;        // color value
  16     unsigned char   type;       // 0 = Canon palette index, 1 = CHDK color index (chdk_colors)
  17 } chdkColor;
  18 
  19 typedef struct {
  20     chdkColor       fg;         // foreground
  21     chdkColor       bg;         // background
  22 } confColor;
  23 
  24 #pragma pack()
  25 
  26 typedef int             coord;
  27 typedef unsigned char   color;
  28 typedef unsigned short  twoColors;
  29 
  30 #define MAKE_COLOR(bg, fg)  ((twoColors)(((color)(bg) << 8) | (color)(fg)))
  31 #define FG_COLOR(c)         ((color)(c     ))
  32 #define BG_COLOR(c)         ((color)(c >> 8))
  33 
  34 //==========================================================
  35 
  36 #endif

/* [<][>][^][v][top][bottom][index][help] */