浏览代码

Make the libcaca color values an enum again.

tags/v0.99.beta17
Sam Hocevar sam 15 年前
父节点
当前提交
48ecccd284
共有 2 个文件被更改,包括 47 次插入43 次删除
  1. +29
    -23
      caca/caca.h
  2. +18
    -20
      caca/caca0.h

+ 29
- 23
caca/caca.h 查看文件

@@ -67,29 +67,35 @@ typedef struct caca_event caca_event_t;
* Colours and styles that can be used with caca_set_attr(). * Colours and styles that can be used with caca_set_attr().
* *
* @{ */ * @{ */
#define CACA_BLACK 0x00 /**< The colour index for black. */ enum caca_color
#define CACA_BLUE 0x01 /**< The colour index for blue. */ {
#define CACA_GREEN 0x02 /**< The colour index for green. */ CACA_BLACK = 0x00, /**< The colour index for black. */
#define CACA_CYAN 0x03 /**< The colour index for cyan. */ CACA_BLUE = 0x01, /**< The colour index for blue. */
#define CACA_RED 0x04 /**< The colour index for red. */ CACA_GREEN = 0x02, /**< The colour index for green. */
#define CACA_MAGENTA 0x05 /**< The colour index for magenta. */ CACA_CYAN = 0x03, /**< The colour index for cyan. */
#define CACA_BROWN 0x06 /**< The colour index for brown. */ CACA_RED = 0x04, /**< The colour index for red. */
#define CACA_LIGHTGRAY 0x07 /**< The colour index for light gray. */ CACA_MAGENTA = 0x05, /**< The colour index for magenta. */
#define CACA_DARKGRAY 0x08 /**< The colour index for dark gray. */ CACA_BROWN = 0x06, /**< The colour index for brown. */
#define CACA_LIGHTBLUE 0x09 /**< The colour index for blue. */ CACA_LIGHTGRAY = 0x07, /**< The colour index for light gray. */
#define CACA_LIGHTGREEN 0x0a /**< The colour index for light green. */ CACA_DARKGRAY = 0x08, /**< The colour index for dark gray. */
#define CACA_LIGHTCYAN 0x0b /**< The colour index for light cyan. */ CACA_LIGHTBLUE = 0x09, /**< The colour index for blue. */
#define CACA_LIGHTRED 0x0c /**< The colour index for light red. */ CACA_LIGHTGREEN = 0x0a, /**< The colour index for light green. */
#define CACA_LIGHTMAGENTA 0x0d /**< The colour index for light magenta. */ CACA_LIGHTCYAN = 0x0b, /**< The colour index for light cyan. */
#define CACA_YELLOW 0x0e /**< The colour index for yellow. */ CACA_LIGHTRED = 0x0c, /**< The colour index for light red. */
#define CACA_WHITE 0x0f /**< The colour index for white. */ CACA_LIGHTMAGENTA = 0x0d, /**< The colour index for light magenta. */
#define CACA_DEFAULT 0x10 /**< The output driver's default colour. */ CACA_YELLOW = 0x0e, /**< The colour index for yellow. */
#define CACA_TRANSPARENT 0x20 /**< The transparent colour. */ CACA_WHITE = 0x0f, /**< The colour index for white. */

CACA_DEFAULT = 0x10, /**< The output driver's default colour. */
#define CACA_BOLD 0x01 /**< The style mask for bold. */ CACA_TRANSPARENT = 0x20, /**< The transparent colour. */
#define CACA_ITALICS 0x02 /**< The style mask for italics. */ };
#define CACA_UNDERLINE 0x04 /**< The style mask for underline. */ enum caca_style
#define CACA_BLINK 0x08 /**< The style mask for blink. */ {
CACA_BOLD = 0x01, /**< The style mask for bold. */
CACA_ITALICS = 0x02, /**< The style mask for italics. */
CACA_UNDERLINE = 0x04, /**< The style mask for underline. */
CACA_BLINK = 0x08, /**< The style mask for blink. */
};
/* @} */ /* @} */


/** \brief User event type enumeration. /** \brief User event type enumeration.


+ 18
- 20
caca/caca0.h 查看文件

@@ -58,27 +58,25 @@ __extern caca_display_t *__caca0_dp;
__extern unsigned char __caca0_fg; __extern unsigned char __caca0_fg;
__extern unsigned char __caca0_bg; __extern unsigned char __caca0_bg;


/* These enums and macros changed names or values */ /* This enum still exists in libcaca 1.x, thus cannot be redefined */
enum caca_color #define CACA_COLOR_BLACK CACA_BLACK
{ #define CACA_COLOR_BLUE CACA_BLUE
CACA_COLOR_BLACK = CACA_BLACK, #define CACA_COLOR_GREEN CACA_GREEN
CACA_COLOR_BLUE = CACA_BLUE, #define CACA_COLOR_CYAN CACA_CYAN
CACA_COLOR_GREEN = CACA_GREEN, #define CACA_COLOR_RED CACA_RED
CACA_COLOR_CYAN = CACA_CYAN, #define CACA_COLOR_MAGENTA CACA_MAGENTA
CACA_COLOR_RED = CACA_RED, #define CACA_COLOR_BROWN CACA_BROWN
CACA_COLOR_MAGENTA = CACA_MAGENTA, #define CACA_COLOR_LIGHTGRAY CACA_LIGHTGRAY
CACA_COLOR_BROWN = CACA_BROWN, #define CACA_COLOR_DARKGRAY CACA_DARKGRAY
CACA_COLOR_LIGHTGRAY = CACA_LIGHTGRAY, #define CACA_COLOR_LIGHTBLUE CACA_LIGHTBLUE
CACA_COLOR_DARKGRAY = CACA_DARKGRAY, #define CACA_COLOR_LIGHTGREEN CACA_LIGHTGREEN
CACA_COLOR_LIGHTBLUE = CACA_LIGHTBLUE, #define CACA_COLOR_LIGHTCYAN CACA_LIGHTCYAN
CACA_COLOR_LIGHTGREEN = CACA_LIGHTGREEN, #define CACA_COLOR_LIGHTRED CACA_LIGHTRED
CACA_COLOR_LIGHTCYAN = CACA_LIGHTCYAN, #define CACA_COLOR_LIGHTMAGENTA CACA_LIGHTMAGENTA
CACA_COLOR_LIGHTRED = CACA_LIGHTRED, #define CACA_COLOR_YELLOW CACA_YELLOW
CACA_COLOR_LIGHTMAGENTA = CACA_LIGHTMAGENTA, #define CACA_COLOR_WHITE CACA_WHITE
CACA_COLOR_YELLOW = CACA_YELLOW,
CACA_COLOR_WHITE = CACA_WHITE,
};


/* These enums and macros changed names or values */
enum caca_feature enum caca_feature
{ {
CACA_BACKGROUND = 0x10, CACA_BACKGROUND = 0x10,


||||||
x
 
000:0
正在加载...
取消
保存