aboutsummaryrefslogtreecommitdiff
path: root/termbox2/attrw.ha
blob: d337b8f12788f3bb4dc1203c966fd250b0e2b58a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// 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 = 64;

// Unsigned integer type for cell attributes, see [[termbox2::ATTRIBUTE]].
export type uattr = u64;

// 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 = 0x01000000,
	UNDERLINE: uattr = 0x02000000,
	REVERSE: uattr = 0x04000000,
	ITALIC: uattr = 0x08000000,
	BLINK: uattr = 0x10000000,
	HI_BLACK: uattr = 0x20000000,
	BRIGHT: uattr = 0x40000000,
	DIM: uattr = 0x80000000,
	STRIKEOUT: uattr = 0x0000000100000000,
	UNDERLINE_2: uattr = 0x0000000200000000,
	OVERLINE: uattr = 0x0000000400000000,
	INVISIBLE: uattr = 0x0000000800000000,
};

Generated with cgit - Back to sebastiano.tronto.net