summaryrefslogtreecommitdiff
path: root/src/fe-text/term.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-text/term.h')
-rw-r--r--src/fe-text/term.h31
1 files changed, 25 insertions, 6 deletions
diff --git a/src/fe-text/term.h b/src/fe-text/term.h
index 27174c83..5a40d4b2 100644
--- a/src/fe-text/term.h
+++ b/src/fe-text/term.h
@@ -4,12 +4,29 @@
typedef struct _TERM_WINDOW TERM_WINDOW;
/* text attributes */
-#define ATTR_RESETFG 0x0100
-#define ATTR_RESETBG 0x0200
-#define ATTR_BOLD 0x0400
-#define ATTR_BLINK 0x0800
-#define ATTR_UNDERLINE 0x1000
-#define ATTR_REVERSE 0x2000
+
+
+#define FG_MASK ( 0x00ff )
+#define BG_MASK ( 0xff00 )
+
+#define ATTR_RESETFG ( 0x010000 )
+#define ATTR_RESETBG ( 0x020000 )
+#define ATTR_BOLD ( 0x040000 )
+#define ATTR_BLINK ( 0x080000 )
+#define ATTR_UNDERLINE ( 0x100000 )
+#define ATTR_REVERSE ( 0x200000 )
+
+/* can also mean default color, probably. */
+#define ATTR_COLOR_UNDEFINED ( -1 )
+
+#define EXT_COLOR_BLACK ( 0 )
+#define EXT_COLOR_RED ( 1 )
+#define EXT_COLOR_GREEN ( 2 )
+#define EXT_COLOR_YELLOW ( 3 )
+#define EXT_COLOR_BLUE ( 4 )
+#define EXT_COLOR_MAGENTA ( 5 )
+#define EXT_COLOR_CYAN ( 6 )
+#define EXT_COLOR_WHITE ( 7 )
#define ATTR_RESET (ATTR_RESETFG|ATTR_RESETBG)
@@ -65,6 +82,8 @@ void term_window_scroll(TERM_WINDOW *window, int count);
void term_set_color(TERM_WINDOW *window, int col);
+void term_set_extended_color(TERM_WINDOW *window, int fg, int bg);
+
void term_move(TERM_WINDOW *window, int x, int y);
void term_addch(TERM_WINDOW *window, char chr);
void term_add_unichar(TERM_WINDOW *window, unichar chr);