Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ slk_attroff(3X) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mbstowcs(3C)

wcswidth(3C)

attroff(3X)

curses(3X)

delscreen(3X)

ripoffline(3X)

stdscr(3X)

curses(5)

slk_attroff(3X)                                             slk_attroff(3X)

NAME
     slkattroff, slkattroff, slkattron, slkattron, slkattrset,
     slkattrset, slkclear, slkcolor, slkinit, slklabel,
     slknoutrefresh, slkrefresh, slkrestore, slkset, slktouch,
     slkwset - soft label functions

SYNOPSIS
     cc [flag ...] file ... -lcurses [library ...]

     #include <curses.h>

     int slkattroff(const chtype attrs);

     int slkattroff(const attrt attrs, void *opts);

     int slkattron(const chtype attrs);

     int slkattron(const attrt attrs, void *opts);

     int slkattrset(const chtype attrs);

     int slkattrset(const attrt attrs, short colorpairnumber, void *opts);

     int slkclear(void);

     int slkcolor(short colorpairnumber);

     int slkinit(int fmt);

     char *slklabel(int labnum);

     int slknoutrefresh(void);

     int slkrefresh(void);

     int slkrestore(void);

     int slkset(int labnum, const char *label, int justify);

     int slktouch(void);

     int slkwset(int labnum, const wchart *label, int justify);

DESCRIPTION
     The Curses interface manipulates the set of soft function-key labels
     that exist on many terminals. For those terminals that do not have
     soft labels, Curses takes over the bottom line of stdscr, reducing the
     size of stdscr and the value of the LINES external variable. There can
     be up to eight labels of up to eight display columns each.






Page 1                       Reliant UNIX 5.44                Printed 11/98

slk_attroff(3X)                                             slk_attroff(3X)

     To use soft labels, slkinit() must be called before initscr(),
     newterm() or ripoffline() is called. If initscr() eventually uses a
     line from stdscr to emulate the soft labels, then fmt determines how
     the labels are arranged on the screen. Setting fmt to 0 indicates a
     3-2-3 arrangement of the labels; 1 indicates a 4-4 arrangement. Other
     values for fmt are unspecified.

     The slkinit() function has the effect of calling ripoffline() to
     reserve one screen line to accommodate the requested format.

     The slkset() and slkwset() functions specify the text of soft label
     number labnum, within the range from 1 to and including 8. The label
     argument is the string to be put on the label. With slkset(), and
     slkwset(), the width of the label is limited to eight column posi-
     tions. A null string or a null pointer specifies a blank label. The
     justify argument can have the following values to indicate how to jus-
     tify label within the space reserved for it:

     0    Align the start of label with the start of the space

     1    Center label within the space

     2    Align the end of label with the end of the space

     The slkrefresh() and slknoutrefresh() functions correspond to the
     wrefresh() and wnoutrefresh() functions.

     The slklabel() function obtains soft label number labnum.

     The slkclear() function immediately clears the soft labels from the
     screen.

     The slkrestore() function immediately restores the soft labels to the
     screen after a call to slkclear().

     The slktouch() function forces all the soft labels to be output the
     next time slknoutrefresh() or slkrefresh() is called.

     The slkattron(), slkattrset() and slkattroff() functions correspond
     to attron(), attrset(), and attroff(). They have an effect only if
     soft labels are simulated on the bottom line of the screen.

     The slkattroff(), slkattron(), slkattrset(), and slkcolor()
     functions correspond to slkattroff(), slkattrond(), slkattrset()
     and colorset() and thus support the attribute constants with the WA
     prefix and colour.

     The opts argument is reserved for definition in a future edition of
     this manual page. Currently, the application must provide a null
     pointer as opts.




Page 2                       Reliant UNIX 5.44                Printed 11/98

slk_attroff(3X)                                             slk_attroff(3X)

RETURN VALUE
     Upon successful completion, slklabel() returns the requested label
     with leading and trailing blanks stripped. Otherwise, it returns a
     null pointer.

     Upon successful completion, the other functions return OK. Otherwise,
     they return ERR.

ERRORS
     No errors are defined.

NOTES
     When using multi-byte character sets, applications should check the
     width of the string by calling mbstowcs() and then wcswidth() before
     calling slkset(). When using wide characters, applications should
     check the width of the string by calling wcswidth() before calling
     slkset().

     Since the number of columns that a wide character string will occupy
     is codeset-specific, call wcwidth() and wcswidth() to check the number
     of column positions in the string before calling slkwset().

     Most applications would use slknoutrefresh() because a wrefresh() is
     likely to follow soon.

SEE ALSO
     mbstowcs(3C), wcswidth(3C), attrget(3X), attroff(3X), curses(3X),
     delscreen(3X), ripoffline(3X), stdscr(3X), curses(5).


























Page 3                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026