Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
TICKIT_PEN...R_ATTR_RGB8(3) Library Functions Manual TICKIT_PEN...R_ATTR_RGB8(3)

NAME
     tickit_pen_get_colour_attr_rgb8,		tickit_pen_set_colour_attr_rgb8,
     tickit_pen_has_attr_rgb8 - manipulate a secondary RGB8  colour  pen  colour
     attribute

SYNOPSIS
     #include <tickit.h>

     typedef struct {
	 uint8_t r;
	 uint8_t g;
	 uint8_t b;
     } TickitPenRGB8;

     TickitPenRGB8 tickit_pen_get_colour_attr_rgb8(const TickitPen *pen,
	 TickitPenAttr attr);
     void tickit_pen_set_colour_attr_rgb8(TickitPen *pen,
	 TickitPenAttr attr, TickitPenRGB8 value);

     bool tickit_pen_has_attr_rgb8(const TickitPen *pen,
	 TickitPenAttr attr);

     Link with -ltickit.

DESCRIPTION
     tickit_pen_get_colour_attr_rgb8()	returns the current secondary RGB8 value
     of the given colour attribute. If the attribute is not defined or does  not
     have a secondary RGB8 value, the return value is not specified.

     tickit_pen_set_colour_attr_rgb8()	provides  a  new value for the secondary
     RGB8 value of the given colour attribute on the  pen.  This  will	only  be
     stored  if  the  pen already has a (primary) index value set for the corre-
     sponding attribute. It will invoke the TICKIT_EV_CHANGE event  on	the  pen
     instance if it successfully stores the value.

     tickit_pen_has_colour_attr_rgb8()	returns  true  if  the pen instance cur-
     rently stores a secondary RGB8 value for the given colour attribute.

NOTES
     A pen instance will only store a secondary RGB8 value if  a  primary  index
     value  is	already set. Additionally, calling tickit_pen_set_colour_attr(3)
     will clear an associated secondary RGB8 value. This design aims to  encour-
     age  that	any  use of an RGB8 colour also has an index as well, to support
     the majority of terminals which do not in fact understand RGB8  values.  It
     is recommended that applications wishing to make use of these values should
     set both at the same time, in sequence.

       tickit_pen_set_colour_attr(pen, index);
       tickit_pen_set_colour_attr_rgb8(pen,
	   (TickitPenRGB8){.r = red, .g = green, .b = blue});

RETURN VALUE
     tickit_pen_get_colour_attr_rgb8() returns a three-field colour value struc-
     ture.	tickit_pen_set_colour_attr_rgb8()      returns	   no	  value.
     tickit_pen_has_colour_attr_rgb8() returns a boolean.

SEE ALSO
     tickit_pen_new(3), tickit_pen_set_colour_attr(3), tickit_pen_clear_attr(3),
     tickit_pen(7), tickit(7)

						     TICKIT_PEN...R_ATTR_RGB8(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=tickit_pen_get_colour_attr_rgb8&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help