1TICKIT_PEN_GET_COLOUR_ATTR_RLGiBb8r(a3r)y FunctionsTMIaCnKuIaTl_PEN_GET_COLOUR_ATTR_RGB8(3)
2
3
4

NAME

6       tickit_pen_get_colour_attr_rgb8,       tickit_pen_set_colour_attr_rgb8,
7       tickit_pen_has_attr_rgb8 -  manipulate  a  secondary  RGB8  colour  pen
8       colour attribute
9

SYNOPSIS

11       #include <tickit.h>
12
13       typedef struct {
14           uint8_t r;
15           uint8_t g;
16           uint8_t b;
17       } TickitPenRGB8;
18
19       TickitPenRGB8 tickit_pen_get_colour_attr_rgb8(const TickitPen *pen,
20           TickitPenAttr attr);
21       void tickit_pen_set_colour_attr_rgb8(TickitPen *pen,
22           TickitPenAttr attr, TickitPenRGB8 value);
23
24       bool tickit_pen_has_attr_rgb8(const TickitPen *pen,
25           TickitPenAttr attr);
26
27       Link with -ltickit.
28

DESCRIPTION

30       tickit_pen_get_colour_attr_rgb8()  returns  the  current secondary RGB8
31       value of the given colour attribute. If the attribute is not defined or
32       does  not  have  a secondary RGB8 value, the return value is not speci‐
33       fied.
34
35       tickit_pen_set_colour_attr_rgb8() provides a new  value  for  the  sec‐
36       ondary  RGB8  value of the given colour attribute on the pen. This will
37       only be stored if the pen already has a (primary) index value  set  for
38       the  corresponding attribute. It will invoke the TICKIT_EV_CHANGE event
39       on the pen instance if it successfully stores the value.
40
41       tickit_pen_has_colour_attr_rgb8() returns true if the pen instance cur‐
42       rently stores a secondary RGB8 value for the given colour attribute.
43

NOTES

45       A  pen  instance  will  only  store a secondary RGB8 value if a primary
46       index    value    is     already     set.     Additionally,     calling
47       tickit_pen_set_colour_attr(3)  will  clear an associated secondary RGB8
48       value. This design aims to encourage that any use  of  an  RGB8  colour
49       also  has  an index as well, to support the majority of terminals which
50       do not in fact understand RGB8 values. It is recommended that  applica‐
51       tions  wishing  to make use of these values should set both at the same
52       time, in sequence.
53
54         tickit_pen_set_colour_attr(pen, index);
55         tickit_pen_set_colour_attr_rgb8(pen,
56             (TickitPenRGB8){.r = red, .g = green, .b = blue});
57

RETURN VALUE

59       tickit_pen_get_colour_attr_rgb8() returns a  three-field  colour  value
60       structure.    tickit_pen_set_colour_attr_rgb8()   returns   no   value.
61       tickit_pen_has_colour_attr_rgb8() returns a boolean.
62

SEE ALSO

64       tickit_pen_new(3),                       tickit_pen_set_colour_attr(3),
65       tickit_pen_clear_attr(3), tickit_pen(7), tickit(7)
66
67
68
69                                            TICKIT_PEN_GET_COLOUR_ATTR_RGB8(3)
Impressum