1notcurses_channels(3)                                    notcurses_channels(3)
2
3
4

NAME

6       notcurses_channels - operations on notcurses channels
7

SYNOPSIS

9       #include <notcurses/notcurses.h>
10
11              #define CHANNELS_RGB_INITIALIZER(fr, fg, fb, br, bg, bb) \
12                (((((uint64_t)(fr) << 16u) + ((uint64_t)(fg) << 8u) + (uint64_t)(fb)) << 32ull) + \
13                 (((br) << 16u) + ((bg) << 8u) + (bb)) + CELL_BGDEFAULT_MASK + CELL_FGDEFAULT_MASK)
14
15              #define CHANNEL_RGB_INITIALIZER(r, g, b) \
16                (((uint32_t)r << 16u) + ((uint32_t)g << 8u) + (b) + CELL_BGDEFAULT_MASK)
17
18       uint32_t channel_r(uint32_t channel);
19
20       uint32_t channel_g(uint32_t channel);
21
22       uint32_t channel_b(uint32_t channel);
23
24       uint32_t channel_rgb8(uint32_t channel, uint32_t* restrict r, uint32_t*
25       restrict g, uint32_t* restrict b);
26
27       int channel_set_rgb8(uint32_t* channel, int r, int g, int b);
28
29       int channel_set(uint32_t* channel, uint32_t rgb);
30
31       unsigned channel_palindex(uint32_t channel);
32
33       int channel_set_palindex(uint32_t* channel, int idx);
34
35       uint32_t channel_alpha(uint32_t channel);
36
37       int channel_set_alpha(uint32_t* channel, unsigned alpha);
38
39       bool channel_default_p(uint32_t channel);
40
41       uint32_t channel_set_default(uint32_t* channel);
42
43       unsigned channels_fg_rgb(uint64_t channels);
44
45       unsigned channels_bg_rgb(uint64_t channels);
46
47       int channels_set_fg_rgb(uint64_t* channels, unsigned rgb);
48
49       int channels_set_bg_rgb(uint64_t* channels, unsigned rgb);
50
51       unsigned channels_fg_alpha(uint64_t channels);
52
53       unsigned channels_bg_alpha(uint64_t channels);
54
55       int channels_set_fg_alpha(uint64_t* channels, int alpha);
56
57       int channels_set_bg_alpha(uint64_t* channels, int alpha);
58
59       unsigned channels_fg_palindex(uint64_t channels);
60
61       unsigned channels_bg_palindex(uint64_t channels);
62
63       int channels_set_fg_palindex(uint64_t* channels, int idx);
64
65       int channels_set_bg_palindex(uint64_t* channels, int idx);
66
67       unsigned channels_fg_rgb8(uint64_t channels, unsigned* r, unsigned*  g,
68       unsigned* b);
69
70       unsigned  channels_bg_rgb8(uint64_t channels, unsigned* r, unsigned* g,
71       unsigned* b);
72
73       int channels_set_fg_rgb8(uint64_t* channels, int r, int g, int b);
74
75       int channels_set_bg_rgb8(uint64_t* channels, int r, int g, int b);
76
77       bool channels_fg_default_p(uint64_t channels);
78
79       bool channels_bg_default_p(uint64_t channels);
80
81       uint64_t channels_set_fg_default(uint64_t* channels);
82
83       uint64_t channels_set_bg_default(uint64_t* channels);
84

DESCRIPTION

RETURN VALUES

87       Functions returning int return -1 on failure, or 0 on success.  Failure
88       is  always  due to invalid inputs.  Functions returning bool are predi‐
89       cates, and return the requested value.   Functions  returning  unsigned
90       forms return the input, modified as requested.
91

SEE ALSO

93       notcurses(3),   notcurses_cell(3),  notcurses_plane(3),  notcurses_out‐
94       put(3)
95

AUTHORS

97       nick black <nickblack@linux.com>.
98
99
100
101                                    v2.2.3               notcurses_channels(3)
Impressum