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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
'\" te
.\" Copyright 1989 AT&T
.\" Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH CURS_SLK 3CURSES "Dec 31, 1996"
.SH NAME
curs_slk, slk_init, slk_set, slk_refresh, slk_noutrefresh, slk_label,
slk_clear, slk_restore, slk_touch, slk_attron, slk_attrset, slk_attroff \-
curses soft label routines
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lcurses\fR [ \fIlibrary\fR ... ]
#include <curses.h>
\fBint\fR \fBslk_init\fR(\fBint\fR \fIfmt\fR);
.fi
.LP
.nf
\fBint\fR \fBslk_set\fR(\fBint\fR \fIlabnum\fR, \fBchar *\fR\fIlabel\fR, \fBint\fR \fIfmt\fR);
.fi
.LP
.nf
\fBint\fR \fBslk_refresh\fR(\fBvoid\fR);
.fi
.LP
.nf
\fBint\fR \fBslk_noutrefresh\fR(\fBvoid\fR);
.fi
.LP
.nf
\fBchar *\fR\fBslk_label\fR(\fBint\fR \fIlabnum\fR);
.fi
.LP
.nf
\fBint\fR \fBslk_clear\fR(\fBvoid\fR);
.fi
.LP
.nf
\fBint\fR \fBslk_restore\fR(\fBvoid\fR);
.fi
.LP
.nf
\fBint\fR \fBslk_touch\fR(\fBvoid\fR);
.fi
.LP
.nf
\fBint\fR \fBslk_attron\fR(\fBchtype\fR \fIattrs\fR);
.fi
.LP
.nf
\fBint\fR \fBslk_attrset\fR(\fBchtype\fR \fIattrs\fR);
.fi
.LP
.nf
\fBint\fR \fBslk_attroff\fR(\fBchtype\fR \fIattrs\fR);
.fi
.SH DESCRIPTION
.sp
.LP
\fBcurses\fR manipulates the set of soft function-key labels that exist on many
terminals. For those terminals that do not have soft labels, \fBcurses\fR takes
over the bottom line of \fBstdscr\fR, reducing the size of \fBstdscr\fR and the
variable \fBLINES\fR. \fBcurses\fR standardizes on eight labels of up to eight
characters each.
.sp
.LP
To use soft labels, the \fBslk_init()\fR routine must be called before
\fBinitscr()\fR or \fBnewterm()\fR is called. If \fBinitscr()\fR eventually
uses a line from \fBstdscr\fR to emulate the soft labels, then \fBfmt\fR
determines how the labels are arranged on the screen. Setting \fBfmt\fR to
\fB0\fR indicates a 3-2-3 arrangement of the labels; \fB1\fR indicates a 4-4
arrangement.
.sp
.LP
With the \fBslk_set()\fR routine, \fIlabnum\fR is the label number, from
\fB1\fR to \fB8\fR. \fIlabel\fR is the string to be put on the label, up to
eight characters in length. A null string or a null pointer sets up a blank
label. \fBfmt\fR is either \fB0\fR, \fB1\fR, or \fB2\fR, indicating whether the
label is to be left-justified, centered, or right-justified, respectively,
within the label.
.sp
.LP
The \fBslk_refresh()\fR and \fBslk_noutrefresh()\fR routines correspond to the
\fBwrefresh()\fR and \fBwnoutrefresh()\fR routines.
.sp
.LP
With the \fBslk_label()\fR routine, the current label for label number
\fIlabnum\fR is returned with leading and trailing blanks stripped.
.sp
.LP
With the \fBslk_clear()\fR routine, the soft labels are cleared from the
screen.
.sp
.LP
With the \fBslk_restore()\fR routine, the soft labels are restored to the
screen after a \fBslk_clear()\fR is performed.
.sp
.LP
With the \fBslk_touch()\fR routine, all the soft labels are forced to be output
the next time a \fBslk_noutrefresh()\fR is performed.
.sp
.LP
The \fBslk_attron()\fR, \fBslk_attrset()\fR, and \fBslk_attroff()\fR routines
correspond to \fBattron()\fR, \fBattrset()\fR, and \fBattroff()\fR. They have
an effect only if soft labels are simulated on the bottom line of the screen.
.SH RETURN VALUES
.sp
.LP
Routines that return an integer return \fBERR\fR upon failure and an integer
value other than \fBERR\fR upon successful completion.
.sp
.LP
\fBslk_label()\fR returns \fINULL\fR on error.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
MT-Level Unsafe
.TE
.SH SEE ALSO
.sp
.LP
.BR curs_attr (3CURSES),
.BR curs_initscr (3CURSES),
.BR curs_refresh (3CURSES),
.BR curses (3CURSES),
.BR attributes (7)
.SH NOTES
.sp
.LP
The header <\fBcurses.h\fR> automatically includes the headers <\fBstdio.h\fR>
and <\fBunctrl.h\fR>.
.sp
.LP
Most applications would use \fBslk_noutrefresh()\fR because a \fBwrefresh()\fR
is likely to follow soon.
|