diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2026-10-04 20:02:15 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2026-10-04 20:02:15 +0200 |
| commit | 2e31cbeb70d93bb0f5512064f181990db189d1f6 (patch) | |
| tree | 049f137715b692bcac0fd402fcbf04ef703523f0 /termbox2/attrw+attrw16.ha | |
| download | hare-termbox2-2e31cbeb70d93bb0f5512064f181990db189d1f6.tar.gz hare-termbox2-2e31cbeb70d93bb0f5512064f181990db189d1f6.zip | |
Initial commit
Diffstat (limited to 'termbox2/attrw+attrw16.ha')
| -rw-r--r-- | termbox2/attrw+attrw16.ha | 35 |
1 files changed, 35 insertions, 0 deletions
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 @@ | |||
| 1 | // Integer width of fg and bg attributes. Valid values (assuming system | ||
| 2 | // support) are 16, 32, and 64; see [[termbox2::uattr]]. 32 or 64 enables | ||
| 3 | // OUTPUT.TRUECOLOR, see [[termbox2::OUTPUT]] and | ||
| 4 | // [[termbox2::set_output_mode]]. 64 enables additional style attributes. | ||
| 5 | // Larger values consume more memory in exchange for more features. | ||
| 6 | // Defaults to 64. | ||
| 7 | export def OPT_ATTR_W: size = 16; | ||
| 8 | |||
| 9 | // Unsigned integer type for cell attributes, see [[termbox2::ATTRIBUTE]]. | ||
| 10 | export type uattr = u16; | ||
| 11 | |||
| 12 | // Colors (bitwise), see [[termbox2::cell]]. | ||
| 13 | export def COLOR = struct { | ||
| 14 | DEFAULT: uattr = 0x0000, | ||
| 15 | BLACK: uattr = 0x0001, | ||
| 16 | RED: uattr = 0x0002, | ||
| 17 | GREEN: uattr = 0x0003, | ||
| 18 | YELLOW: uattr = 0x0004, | ||
| 19 | BLUE: uattr = 0x0005, | ||
| 20 | MAGENTA: uattr = 0x0006, | ||
| 21 | CYAN: uattr = 0x0007, | ||
| 22 | WHITE: uattr = 0x0008, | ||
| 23 | }; | ||
| 24 | |||
| 25 | // Style attributes (bitwise), see termbox2::cell. | ||
| 26 | export def ATTRIBUTE = struct { | ||
| 27 | BOLD: uattr = 0x0100, | ||
| 28 | UNDERLINE: uattr = 0x0200, | ||
| 29 | REVERSE: uattr = 0x0400, | ||
| 30 | ITALIC: uattr = 0x0800, | ||
| 31 | BLINK: uattr = 0x1000, | ||
| 32 | HI_BLACK: uattr = 0x2000, | ||
| 33 | BRIGHT: uattr = 0x4000, | ||
| 34 | DIM: uattr = 0x8000, | ||
| 35 | }; | ||
