slk_attroff(3XC)
NAME
slk_attroff, slk_attr_off, slk_attron, slk_attr_on, slk_attrset, slk_attr_set, slk_clear, slk_color, slk_init, slk_label, slk_noutrefresh, slk_refresh, slk_restore, slk_set, slk_touch, slk_wset − manipulate soft labels
SYNOPSIS
#include <term.h>
int slk_attroff(const chtypeattrs);
int slk_attr_off(const attr_t attrs, void ∗opts);
int slk_attron(const chtype attrs);
int slk_attr_on(const attr_t attrs, void ∗opts);
int slk_attrset(const chtype attrs);
int slk_attr_set(const attr_t attrs, short color_pair, void ∗opts);
int slk_clear(void);
int slk_color(short color_pair);
int slk_init(int fmt);
char ∗slk_label(int labnum);
int slk_noutrefresh(void);
int slk_refresh(void);
int slk_restore(void);
int slk_set(int labnum, const char ∗label, int justify);
int slk_touch(void);
int slk_wset(int labnum, const wchar_t ∗label, int justify);
ARGUMENTS
attrsare the foreground window attributes to be added or removed.
optsIs reserved for future use. Currently, this must be a null pointer.
color_pair
Is a color pair.
fmtIs the format of how the labels are arranged on the screen.
labnumIs the number of the soft label.
labelIs the name to be given to a soft label.
justifyIs a number indicating how to justify the label name.
DESCRIPTION
These functions manipulate the soft function-key labels that many terminals feature. For terminals without soft labels, X/Open Curses uses ripoffline(3XC) to allocate the bottom line of stdscr to emulating them. There can be up to eight soft labels, each with a width of up to eight display columns.
The slk_init() function must be called before calling initscr(3XC), newterm(3XC), or ripoffline() if you are going to use soft labels. It has the effect of calling ripoffline() to reserve a screen line. The fmt argument specifies how the labels are to be arranged on the screen. If fmt is 0, there is a 3-2-3 arrangement of labels. If fmt is 1, there is a 4-4 arrangement.
The slk_set() and slk_wset() functions assign the label name label to the soft label numbered labnum (from 1 to 8). label can be no more than eight display columns in width. The justify argument indicates how the label name is justified within its reserved space:
| 0 | Left justify the label name |
| 1 | Center the label name |
| 2 | Right justify the label name |
The slk_refresh() and slk_noutrefresh() functions correspond to the wrefresh(3XC) and wnoutrefresh(3XC) functions described in the doupdate(3XC) man page and are used to update the actual soft label text on the screen.
The slk_label() returns the label name assigned to the label number labnum.
The slk_clear() clears the soft labels from the screen.
The slk_restore() restores the soft label information to the screen after a call to slk_clear().
The slk_touch() marks all soft labels as needing to be updated when slk_refressh() or slk_noutrefresh() is next called.
The slk_attron(), slk_attrset(), and slk_attroff() functions behave similarly to the attron(3XC), attrset(3XC), and attroff(3XC) functions.
The slk_attr_on(), slk_attr_off(), slk_attr_set() and slk_color() functions behave similarly to the attr_on(3XC), attr_off(3XC), attr_set(3XC), and color_set(3XC) functions. As a result, they support color and the attribute constants whose name begin with WA_.
RETURN VALUES
On success, the slk_label() function returns the requested label name. Otherwise, it returns a null pointer.
On success, the other functions return OK. Otherwise, they return ERR.
ERRORS
None.
SEE ALSO
attr_get(3XC), attroff(3XC), delscreen(3XC), ripoffline(3XC)
SunOS 5.6 — Last change: 1 Jun 1996