Changeset 3606 for libcaca/trunk


Ignore:
Timestamp:
Aug 2, 2009, 1:09:35 PM (10 years ago)
Author:
Sam Hocevar
Message:

Make the libcaca color values an enum again.

Location:
libcaca/trunk/caca
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/caca.h

    r3604 r3606  
    6868 *
    6969 *  @{ */
    70 #define CACA_BLACK 0x00 /**< The colour index for black. */
    71 #define CACA_BLUE 0x01 /**< The colour index for blue. */
    72 #define CACA_GREEN 0x02 /**< The colour index for green. */
    73 #define CACA_CYAN 0x03 /**< The colour index for cyan. */
    74 #define CACA_RED 0x04 /**< The colour index for red. */
    75 #define CACA_MAGENTA 0x05 /**< The colour index for magenta. */
    76 #define CACA_BROWN 0x06 /**< The colour index for brown. */
    77 #define CACA_LIGHTGRAY 0x07 /**< The colour index for light gray. */
    78 #define CACA_DARKGRAY 0x08 /**< The colour index for dark gray. */
    79 #define CACA_LIGHTBLUE 0x09 /**< The colour index for blue. */
    80 #define CACA_LIGHTGREEN 0x0a /**< The colour index for light green. */
    81 #define CACA_LIGHTCYAN 0x0b /**< The colour index for light cyan. */
    82 #define CACA_LIGHTRED 0x0c /**< The colour index for light red. */
    83 #define CACA_LIGHTMAGENTA 0x0d /**< The colour index for light magenta. */
    84 #define CACA_YELLOW 0x0e /**< The colour index for yellow. */
    85 #define CACA_WHITE 0x0f /**< The colour index for white. */
    86 #define CACA_DEFAULT 0x10 /**< The output driver's default colour. */
    87 #define CACA_TRANSPARENT 0x20 /**< The transparent colour. */
    88 
    89 #define CACA_BOLD 0x01 /**< The style mask for bold. */
    90 #define CACA_ITALICS 0x02 /**< The style mask for italics. */
    91 #define CACA_UNDERLINE 0x04 /**< The style mask for underline. */
    92 #define CACA_BLINK 0x08 /**< The style mask for blink. */
     70enum caca_color
     71{
     72    CACA_BLACK =        0x00, /**< The colour index for black. */
     73    CACA_BLUE =         0x01, /**< The colour index for blue. */
     74    CACA_GREEN =        0x02, /**< The colour index for green. */
     75    CACA_CYAN =         0x03, /**< The colour index for cyan. */
     76    CACA_RED =          0x04, /**< The colour index for red. */
     77    CACA_MAGENTA =      0x05, /**< The colour index for magenta. */
     78    CACA_BROWN =        0x06, /**< The colour index for brown. */
     79    CACA_LIGHTGRAY =    0x07, /**< The colour index for light gray. */
     80    CACA_DARKGRAY =     0x08, /**< The colour index for dark gray. */
     81    CACA_LIGHTBLUE =    0x09, /**< The colour index for blue. */
     82    CACA_LIGHTGREEN =   0x0a, /**< The colour index for light green. */
     83    CACA_LIGHTCYAN =    0x0b, /**< The colour index for light cyan. */
     84    CACA_LIGHTRED =     0x0c, /**< The colour index for light red. */
     85    CACA_LIGHTMAGENTA = 0x0d, /**< The colour index for light magenta. */
     86    CACA_YELLOW =       0x0e, /**< The colour index for yellow. */
     87    CACA_WHITE =        0x0f, /**< The colour index for white. */
     88    CACA_DEFAULT =      0x10, /**< The output driver's default colour. */
     89    CACA_TRANSPARENT =  0x20, /**< The transparent colour. */
     90};
     91
     92enum caca_style
     93{
     94    CACA_BOLD =      0x01, /**< The style mask for bold. */
     95    CACA_ITALICS =   0x02, /**< The style mask for italics. */
     96    CACA_UNDERLINE = 0x04, /**< The style mask for underline. */
     97    CACA_BLINK =     0x08, /**< The style mask for blink. */
     98};
    9399/*  @} */
    94100
  • libcaca/trunk/caca/caca0.h

    r3604 r3606  
    5959__extern unsigned char __caca0_bg;
    6060
     61/* This enum still exists in libcaca 1.x, thus cannot be redefined */
     62#define CACA_COLOR_BLACK        CACA_BLACK
     63#define CACA_COLOR_BLUE         CACA_BLUE
     64#define CACA_COLOR_GREEN        CACA_GREEN
     65#define CACA_COLOR_CYAN         CACA_CYAN
     66#define CACA_COLOR_RED          CACA_RED
     67#define CACA_COLOR_MAGENTA      CACA_MAGENTA
     68#define CACA_COLOR_BROWN        CACA_BROWN
     69#define CACA_COLOR_LIGHTGRAY    CACA_LIGHTGRAY
     70#define CACA_COLOR_DARKGRAY     CACA_DARKGRAY
     71#define CACA_COLOR_LIGHTBLUE    CACA_LIGHTBLUE
     72#define CACA_COLOR_LIGHTGREEN   CACA_LIGHTGREEN
     73#define CACA_COLOR_LIGHTCYAN    CACA_LIGHTCYAN
     74#define CACA_COLOR_LIGHTRED     CACA_LIGHTRED
     75#define CACA_COLOR_LIGHTMAGENTA CACA_LIGHTMAGENTA
     76#define CACA_COLOR_YELLOW       CACA_YELLOW
     77#define CACA_COLOR_WHITE        CACA_WHITE
     78
    6179/* These enums and macros changed names or values */
    62 enum caca_color
    63 {
    64     CACA_COLOR_BLACK = CACA_BLACK,
    65     CACA_COLOR_BLUE = CACA_BLUE,
    66     CACA_COLOR_GREEN = CACA_GREEN,
    67     CACA_COLOR_CYAN = CACA_CYAN,
    68     CACA_COLOR_RED = CACA_RED,
    69     CACA_COLOR_MAGENTA = CACA_MAGENTA,
    70     CACA_COLOR_BROWN = CACA_BROWN,
    71     CACA_COLOR_LIGHTGRAY = CACA_LIGHTGRAY,
    72     CACA_COLOR_DARKGRAY = CACA_DARKGRAY,
    73     CACA_COLOR_LIGHTBLUE = CACA_LIGHTBLUE,
    74     CACA_COLOR_LIGHTGREEN = CACA_LIGHTGREEN,
    75     CACA_COLOR_LIGHTCYAN = CACA_LIGHTCYAN,
    76     CACA_COLOR_LIGHTRED = CACA_LIGHTRED,
    77     CACA_COLOR_LIGHTMAGENTA = CACA_LIGHTMAGENTA,
    78     CACA_COLOR_YELLOW = CACA_YELLOW,
    79     CACA_COLOR_WHITE = CACA_WHITE,
    80 };
    81 
    8280enum caca_feature
    8381{
Note: See TracChangeset for help on using the changeset viewer.