summaryrefslogtreecommitdiff
path: root/man/tickit_pen_new.3
blob: 7c9f2206803e3d7de892bba468c547d38026237d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.TH TICKIT_PEN_NEW 3
.SH NAME
tickit_pen_new \- create a new pen instance
.SH SYNOPSIS
.EX
.B #include <tickit.h>
.sp
.BI "TickitPen *tickit_pen_new(void);"
.BI "TickitPen *tickit_pen_new_attrs(...);"
.BI "TickitPen *tickit_pen_clone(const TickitPen *" orig );
.EE
.sp
Link with \fI\-ltickit\fP.
.SH DESCRIPTION
\fBtickit_pen_new\fP() creates a new \fBTickitPen\fP instance. It initially has no attributes set.
.PP
\fBtickit_pen_new_attrs\fP() creates a new \fBTickitPen\fP instance and populates it with a given list of attribute values. The attributes are given as pairs; first a \fBTickitPenAttr\fP then an integer giving its value, terminated by a final 0 or -1.
.PP
\fBtickit_pen_clone\fP() creates a new \fBTickitPen\fP instance. It initially has the same attributes values set as the one given by \fIorig\fP.
.PP
The reference count of a newly-constructed pen instance will be one. This can be incremented or decremented using \fBtickit_pen_ref\fP(3) and \fBtickit_pen_unref\fP(3). When its reference count reaches zero it is destroyed.
.SH "RETURN VALUE"
If successful, \fBtickit_pen_new\fP(), \fBtickit_pen_new_attrs\fP() and \fBtickit_pen_clone\fP() return a pointer to the new instance. On failure, \fBNULL\fP is returned with \fIerrno\fP set to indicate the failure.
.SH "SEE ALSO"
.BR tickit_pen_ref (3),
.BR tickit_pen_unref (3),
.BR tickit_pen_bind_event (3),
.BR tickit_pen (7),
.BR tickit (7)