tickit_pen_new - Man Page

create a new pen instance

Synopsis

#include <tickit.h>

TickitPen *tickit_pen_new(void);
TickitPen *tickit_pen_new_attrs(...);
TickitPen *tickit_pen_clone(const TickitPen *orig);

Link with -ltickit.

Description

tickit_pen_new() creates a new TickitPen instance. It initially has no attributes set.

tickit_pen_new_attrs() creates a new TickitPen instance and populates it with a given list of attribute values. The attributes are given as pairs; first a TickitPenAttr then an integer giving its value, terminated by a final 0 or -1.

Two additional attribute types are recognised here, TICKIT_PEN_FG_DESC and TICKIT_PEN_BG_DESC. These will expect to receive a string argument value, which will be parsed as for tickit_pen_set_colour_attr_desc(3).

tickit_pen_clone() creates a new TickitPen instance. It initially has the same attributes values set as the one given by orig.

The reference count of a newly-constructed pen instance will be one. This can be incremented or decremented using tickit_pen_ref(3) and tickit_pen_unref(3). When its reference count reaches zero it is destroyed.

Return Value

If successful, tickit_pen_new(), tickit_pen_new_attrs() and tickit_pen_clone() return a pointer to the new instance. On failure, NULL is returned with errno set to indicate the failure.

See Also

tickit_pen_ref(3), tickit_pen_unref(3), tickit_pen_bind_event(3), tickit_pen(7), tickit(7)

Referenced By

tickit_pen(7), tickit_pen_bind_event(3), tickit_pen_clear(3), tickit_pen_copy(3), tickit_pen_equiv_attr(3), tickit_pen_get_bool_attr(3), tickit_pen_get_colour_attr(3), tickit_pen_get_colour_attr_rgb8(3), tickit_pen_get_int_attr(3), tickit_pen_has_attr(3), tickit_pen_is_nonempty(3), tickit_pen_ref(3).

The man pages tickit_pen_clone(3) and tickit_pen_new_attrs(3) are aliases of tickit_pen_new(3).