tickit_pen_new(3)

tickit_pen_new3

Create a new pen instance

Usage

#include <tickit.h>

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

Link with -ltickit.

Overview

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.

Releases

4 releases since Debian 10 (Buster); the text changed 1 time.

  1. 10
  2. 11–13

From libtickit-dev 0.4.3-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.