1curs_slk(3CURSES) Curses Library Functions curs_slk(3CURSES)
2
3
4
6 curs_slk, slk_init, slk_set, slk_refresh, slk_noutrefresh, slk_label,
7 slk_clear, slk_restore, slk_touch, slk_attron, slk_attrset, slk_attroff
8 - curses soft label routines
9
11 cc [ flag ... ] file ... -lcurses [ library ... ]
12 #include <curses.h>
13
14 int slk_init(int fmt);
15
16
17 int slk_set(int labnum, char *label, int fmt);
18
19
20 int slk_refresh(void);
21
22
23 int slk_noutrefresh(void);
24
25
26 char *slk_label(int labnum);
27
28
29 int slk_clear(void);
30
31
32 int slk_restore(void);
33
34
35 int slk_touch(void);
36
37
38 int slk_attron(chtype attrs);
39
40
41 int slk_attrset(chtype attrs);
42
43
44 int slk_attroff(chtype attrs);
45
46
48 curses manipulates the set of soft function-key labels that exist on
49 many terminals. For those terminals that do not have soft labels,
50 curses takes over the bottom line of stdscr, reducing the size of std‐
51 scr and the variable LINES. curses standardizes on eight labels of up
52 to eight characters each.
53
54
55 To use soft labels, the slk_init() routine must be called before
56 initscr() or newterm() is called. If initscr() eventually uses a line
57 from stdscr to emulate the soft labels, then fmt determines how the
58 labels are arranged on the screen. Setting fmt to 0 indicates a 3-2-3
59 arrangement of the labels; 1 indicates a 4-4 arrangement.
60
61
62 With the slk_set() routine, labnum is the label number, from 1 to 8.
63 label is the string to be put on the label, up to eight characters in
64 length. A null string or a null pointer sets up a blank label. fmt is
65 either 0, 1, or 2, indicating whether the label is to be left-justi‐
66 fied, centered, or right-justified, respectively, within the label.
67
68
69 The slk_refresh() and slk_noutrefresh() routines correspond to the
70 wrefresh() and wnoutrefresh() routines.
71
72
73 With the slk_label() routine, the current label for label number labnum
74 is returned with leading and trailing blanks stripped.
75
76
77 With the slk_clear() routine, the soft labels are cleared from the
78 screen.
79
80
81 With the slk_restore() routine, the soft labels are restored to the
82 screen after a slk_clear() is performed.
83
84
85 With the slk_touch() routine, all the soft labels are forced to be out‐
86 put the next time a slk_noutrefresh() is performed.
87
88
89 The slk_attron(), slk_attrset(), and slk_attroff() routines correspond
90 to attron(), attrset(), and attroff(). They have an effect only if soft
91 labels are simulated on the bottom line of the screen.
92
94 Routines that return an integer return ERR upon failure and an integer
95 value other than ERR upon successful completion.
96
97
98 slk_label() returns NULL on error.
99
101 See attributes(5) for descriptions of the following attributes:
102
103
104
105
106 ┌─────────────────────────────┬─────────────────────────────┐
107 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
108 ├─────────────────────────────┼─────────────────────────────┤
109 │MT-Level │Unsafe │
110 └─────────────────────────────┴─────────────────────────────┘
111
113 curs_attr(3CURSES), curs_initscr(3CURSES), curs_refresh(3CURSES),
114 curses(3CURSES), attributes(5)
115
117 The header <curses.h> automatically includes the headers <stdio.h> and
118 <unctrl.h>.
119
120
121 Most applications would use slk_noutrefresh() because a wrefresh() is
122 likely to follow soon.
123
124
125
126SunOS 5.11 31 Dec 1996 curs_slk(3CURSES)