-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththeme.man2
More file actions
55 lines (55 loc) · 1.05 KB
/
theme.man2
File metadata and controls
55 lines (55 loc) · 1.05 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
.TH THEME 2
.SH NAME
themeinit, themeend, themeget \- read colors for a graphical color theme
.SH SYNOPSIS
.B #include <u.h>
.br
.B #include <libc.h>
.br
.B #include <theme.h>
.PP
.B
void themeinit(char *name);
.PP
.B
void themeend(void);
.PP
.B
ulong themeget(char *color, ulong def);
.SH DESCRIPTION
These routines handle a
.IR ndb (6)
formatted database of color themes.
.PP
.I themeinit
initializes the theme database for use. The database is by default located in
.BI $home/lib/theme .
If that file cannot be opened,
.B /lib/theme
is used. The
.I theme
argument selects which records from the database to use.
.PP
.I themeend
closes the database and frees all resources allocated by
.IB themeinit .
.PP
.I themeget
looks up a color value for the name
.IB color ,
and returns
.I def
if no color exists.
.PP
If no color is found in the theme record named by the argument passed to
.IB themeinit ,
the color is looked up in the
.B theme=default
record.
.SH DIAGNOSTICS
.I themeget
will always return
.I def
if the theme database can't be opened.
.SH "SEE ALSO"
.IR ndb (6)