2 .\" Copyright (c) 1990, 1995 by Mortice Kern Systems Inc. All Rights Reserved Portions Copyright (c) 1999, Sun Microsystems, Inc. All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH SLK_ATTROFF 3XCURSES "Jun 5, 2002"
8 slk_attroff, slk_attr_off, slk_attron, slk_attr_on, slk_attrset, slk_attr_set,
9 slk_clear, slk_color, slk_init, slk_label, slk_noutrefresh, slk_refresh,
10 slk_restore, slk_set, slk_touch, slk_wset \- soft label functions
14 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-I\fR /usr/xpg4/include \fB -L \fR /usr/xpg4/lib \e
15 \fB -R \fR /usr/xpg4/lib \fB -lcurses \fR [ \fIlibrary\fR... ]
17 \fBc89\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lcurses\fR [ \fIlibrary\fR... ]
21 \fBint\fR \fBslk_attroff\fR(\fBconst chtype\fR \fIattrs\fR);
26 \fBint\fR \fBslk_attr_off\fR(\fBconst attr_t\fR \fIattrs\fR, \fBvoid *\fR\fIopts\fR);
31 \fBint\fR \fBslk_attron\fR(\fBconst chtype\fR \fIattrs\fR);
36 \fBint\fR \fBslk_attr_on\fR(\fBconst attr_t\fR \fIattrs\fR, \fBvoid *\fR\fIopts\fR);
41 \fBint\fR \fBslk_attrset\fR(\fBconst chtype\fR \fIattrs\fR);
46 \fBint\fR \fBslk_attr_set\fR(\fBconst attr_t\fR \fIattrs\fR, \fBshort\fR \fIcolor_pair_number\fR, \fBvoid *\fR\fIopts\fR);
51 \fBint\fR \fBslk_clear\fR(\fBvoid\fR);
56 \fBint\fR \fBslk_color\fR(\fBshort\fR \fIcolor_pair_number\fR);
61 \fBint\fR \fBslk_init\fR(\fBint\fR \fIfmt\fR);
66 \fBchar *\fR\fBslk_label\fR(\fBint\fR \fIlabnum\fR);
71 \fBint\fR \fBslk_noutrefresh\fR(\fBvoid\fR);
76 \fBint\fR \fBslk_refresh\fR(\fBvoid\fR);
81 \fBint\fR \fBslk_restore\fR(\fBvoid\fR);
86 \fBint\fR \fBslk_set\fR(\fBint\fR \fIlabnum\fR, \fBconst char *\fR\fIlabel\fR, \fBint\fR \fIjustify\fR);
91 \fBint\fR \fBslk_touch\fR(\fBvoid\fR);
96 \fBint\fR \fBslk_wset\fR(\fBint\fR \fIlabnum\fR, \fBconst wchar_t *\fR\fIlabel\fR, \fBint\fR \fIjustify\fR);
106 are the window attributes to be added or removed.
115 Is reserved for future use. Currently, this must be a null pointer.
121 \fB\fIcolor_pair_number\fR\fR
133 Is the format of how the labels are arranged on the screen.
142 Is the number of the soft label.
151 Is the name to be given to a soft label.
160 Is a number indicating how to justify the label name.
166 The Curses interface manipulates the set of soft function-key labels that exist
167 on many terminals. For those terminals that do not have soft labels, Curses
168 takes over the bottom line of \fIstdscr\fR, reducing the size of \fIstdscr\fR
169 and the value of the \fBLINES\fR external variable. There can be up to eight
170 labels of up to eight display columns each.
173 To use soft labels, \fBslk_init()\fR must be called before calling
174 \fBinitscr\fR(3XCURSES), \fBnewterm\fR(3XCURSES), or
175 \fBripoffline\fR(3XCURSES). If \fBinitscr()\fR eventually uses a line from
176 \fIstdscr\fR to emulate the soft labels, then \fIfmt\fR determines how the
177 labels are arranged on the screen. Setting \fIfmt\fR to 0 indicates a 3-2-3
178 arrangement of the labels; 1 indicates a 4-4 arrangement. Other values for
179 \fIfmt\fR are unspecified.
182 The \fBslk_init()\fR function has the effect of calling \fBripoffline()\fR to
183 reserve one screen line to accommodate the requested format.
186 The \fBslk_set()\fR and \fBslk_wset()\fR functions specify the text of soft
187 label number \fIlabnum\fR, within the range from 1 to and including 8. The
188 \fIlabel\fR argument is the string to be put the lable. With \fBslk_set()\fR
189 and \fBslk_wset()\fR, the width of the label is limited to eight columns
190 positions. A null string or a null pointer specifies a blank label. The
191 \fIjustify\fR argument can have the following values to indicate how to justify
192 \fIlabel\fR within the space reserved for it:
199 Align the start of \fIlabel\fR with the start of the space
208 Center \fIlabel\fR within the space
217 Align the end of \fIlabel\fR with the end of the space
222 The \fBslk_refresh()\fR and \fBslk_noutrefresh()\fR functions correspond to the
223 \fBwrefresh\fR(3XCURSES) and \fBwnoutrefresh\fR(3XCURSES) functions.
226 The \fBslk_label()\fR function obtains soft label number \fIlabnum\fR.
229 The \fBslk_clear()\fR function immediately clears the soft labels from the
233 The \fBslk_restore()\fR function immediately restores the soft labels to the
234 screen after a call to \fBslk_clear()\fR.
237 The \fBslk_touch()\fR function forces all the soft labels to be output the next
238 time \fBslk_refresh()\fR or \fBslk_noutrefresh()\fR is called.
241 The \fBslk_attron()\fR, \fBslk_attrset()\fR, and \fBslk_attroff()\fR functions
242 correspond to the \fBattron\fR(3XCURSES), \fBattrset\fR(3XCURSES), and
243 \fBattroff\fR(3XCURSES) functions. They have an effect only if soft labels are
244 stimulated on the bottom line of the screen.
247 The \fBslk_attr_on()\fR, \fBslk_attr_off()\fR, \fBslk_attr_set()\fR and
248 \fBslk_color()\fR functions correspond to the \fBattr_on\fR(3XCURSES),
249 \fBattr_off\fR(3XCURSES), \fBattr_set\fR(3XCURSES), and
250 \fBcolor_set\fR(3XCURSES) functions. As a result, they support color and the
251 attribute constants with the \fBWA_\fR prefix.
254 The \fIopts\fR argument is reserved for definition in a future release.
255 Currently, the \fIopts\fR argument is a null pointer.
259 Upon successful completion, the \fBslk_label()\fR function returns the
260 requested label with leading and trailing blanks stripped. Otherwise, it
261 returns a null pointer.
264 Upon successful completion, the other functions return \fBOK\fR. Otherwise,
265 they return \fBERR\fR.
269 No errors are defined.
273 When using multi-byte character sets, applications should check the width of
274 the string by calling \fBmbstowcs\fR(3C) and then \fBwcswidth\fR(3C) before
275 calling \fBslk_set()\fR. When using wide characters, applications should check
276 the width of the string by calling \fBwcswidth()\fR before calling
280 Since the number of columns that a wide string will occupy is codeset-specific,
281 call \fBwcwidth\fR(3C) and \fBwcswidth\fR(3C) to check the number of column
282 positions in the string before calling \fBslk_wset()\fR.
285 Most applications would use \fBslk_noutrefresh()\fR because a \fBwrefresh()\fR
286 is likely to follow soon.
290 See \fBattributes\fR(5) for descriptions of the following attributes:
298 ATTRIBUTE TYPE ATTRIBUTE VALUE
300 Interface Stability Standard
308 \fBattr_get\fR(3XCURSES), \fBattroff\fR(3XCURSES), \fBdelscreen\fR(3XCURSES),
309 \fBlibcurses\fR(3XCURSES), \fBmbstowcs\fR(3C), \fBripoffline\fR(3XCURSES),
310 \fBwcswidth\fR(3C), \fBwcwidth\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)