From 2e31cbeb70d93bb0f5512064f181990db189d1f6 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 4 Oct 2026 20:02:15 +0200 Subject: Initial commit --- termbox2/attrw+attrw16.ha | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 termbox2/attrw+attrw16.ha (limited to 'termbox2/attrw+attrw16.ha') diff --git a/termbox2/attrw+attrw16.ha b/termbox2/attrw+attrw16.ha new file mode 100644 index 0000000..69f457d --- /dev/null +++ b/termbox2/attrw+attrw16.ha @@ -0,0 +1,35 @@ +// Integer width of fg and bg attributes. Valid values (assuming system +// support) are 16, 32, and 64; see [[termbox2::uattr]]. 32 or 64 enables +// OUTPUT.TRUECOLOR, see [[termbox2::OUTPUT]] and +// [[termbox2::set_output_mode]]. 64 enables additional style attributes. +// Larger values consume more memory in exchange for more features. +// Defaults to 64. +export def OPT_ATTR_W: size = 16; + +// Unsigned integer type for cell attributes, see [[termbox2::ATTRIBUTE]]. +export type uattr = u16; + +// Colors (bitwise), see [[termbox2::cell]]. +export def COLOR = struct { + DEFAULT: uattr = 0x0000, + BLACK: uattr = 0x0001, + RED: uattr = 0x0002, + GREEN: uattr = 0x0003, + YELLOW: uattr = 0x0004, + BLUE: uattr = 0x0005, + MAGENTA: uattr = 0x0006, + CYAN: uattr = 0x0007, + WHITE: uattr = 0x0008, +}; + +// Style attributes (bitwise), see termbox2::cell. +export def ATTRIBUTE = struct { + BOLD: uattr = 0x0100, + UNDERLINE: uattr = 0x0200, + REVERSE: uattr = 0x0400, + ITALIC: uattr = 0x0800, + BLINK: uattr = 0x1000, + HI_BLACK: uattr = 0x2000, + BRIGHT: uattr = 0x4000, + DIM: uattr = 0x8000, +}; -- cgit v1.3