GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
TICKIT_PEN_GET_COLOUR_ATTR(3) FreeBSD Library Functions Manual TICKIT_PEN_GET_COLOUR_ATTR(3)

tickit_pen_get_colour_attr, tickit_pen_set_colour_attr, tickit_pen_set_colour_attr_desc - manipulate a colour pen attribute

#include <tickit.h>

int tickit_pen_get_colour_attr(TickitPen *pen, TickitPenAttr attr);
void tickit_pen_set_colour_attr(TickitPen *pen, TickitPenAttr attr, int val);
bool tickit_pen_set_colour_attr_desc(TickitPen *pen, TickitPenAttr attr,
    const char *desc);

Link with -ltickit.

tickit_pen_get_colour_attr() returns the current value of the given colour attribute on the pen as a palette index, or -1 if that attribute is not defined.

tickit_pen_set_colour_attr() provides a new value for the given colour attribute on the pen as a palette index. If the pen previously stored a secondary RGB8 value for this attribute it will be cleared. It will invoke the TICKIT_EV_CHANGE event on the pen instance.

tickit_pen_set_colour_attr_desc() provides a new value for the given colour attribute on the pen as a textual description string, converting it into a colour index. It will invoke the TICKIT_EV_CHANGE event on the pen instance. It recognises decimal integers and the names of the first eight VGA colours (black, red, green, yellow, blue, magenta, cyan and white, respectively). It also recognises the prefix of "hi-" before one of the eight VGA colour names, to indicate the high-brightness versions at colour indexes 8 to 15. If it recognises the given string it returns a true value, or false if not.

Additionally, the string may be followed by an RGB8 specification formed from a hash symbol and 6 hexadecimal characters. If present, the secondary RGB8 value will also be set. Optional space characters between the base colour name and the hash symbol will be ignored.

For example,

  tickit_pen_set_colour_attr_desc(pen, TICKIT_PEN_FG, "red #FF1515");

is eqiuvalent to setting the basic red colour along with the secondary RGB8 value of { .r = 0xFF, .g = 0x15, .b = 0x15}.

tickit_pen_get_colour_attr() returns an integer value. tickit_pen_set_colour_attr() returns no value. tickit_pen_set_colour_attr_desc() returns a boolean indicating success.

tickit_pen_new(3), tickit_pen_has_attr(3), tickit_pen_set_bool_attr(3), tickit_pen_set_int_attr(3), tickit_pen_clear_attr(3), tickit_pen(7), tickit(7)

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.