* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_slk.3x,v 1.48 2023/07/01 15:43:20 tom Exp @
+ * @Id: curs_slk.3x,v 1.53 2023/09/16 23:37:03 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
-<TITLE>curs_slk 3x 2023-07-01 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_slk 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_slk 3x 2023-07-01 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_slk 3x 2023-09-16 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
</PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
- <STRONG>slk_init</STRONG>, <STRONG>slk_set</STRONG>, <STRONG>slk_wset</STRONG>, <STRONG>slk_refresh</STRONG>, <STRONG>slk_noutrefresh</STRONG>, <STRONG>slk_label</STRONG>,
- <STRONG>slk_clear</STRONG>, <STRONG>slk_restore</STRONG>, <STRONG>slk_touch</STRONG>, <STRONG>slk_attron</STRONG>, <STRONG>slk_attrset</STRONG>,
- <STRONG>slk_attroff</STRONG>, <STRONG>slk_attr_on</STRONG>, <STRONG>slk_attr_set</STRONG>, <STRONG>slk_attr_off</STRONG>, <STRONG>slk_attr</STRONG>,
- <STRONG>slk_color</STRONG>, <STRONG>extended_slk_color</STRONG> - <STRONG>curses</STRONG> soft label routines
+ <STRONG>slk_init</STRONG>, <STRONG>slk_set</STRONG>, <STRONG>slk_wset</STRONG>, <STRONG>slk_refresh</STRONG>, <STRONG>slk_noutrefresh</STRONG>, <STRONG>slk_label</STRONG>,
+ <STRONG>slk_clear</STRONG>, <STRONG>slk_restore</STRONG>, <STRONG>slk_touch</STRONG>, <STRONG>slk_attron</STRONG>, <STRONG>slk_attrset</STRONG>,
+ <STRONG>slk_attroff</STRONG>, <STRONG>slk_attr_on</STRONG>, <STRONG>slk_attr_set</STRONG>, <STRONG>slk_attr_off</STRONG>, <STRONG>slk_attr</STRONG>,
+ <STRONG>slk_color</STRONG>, <STRONG>extended_slk_color</STRONG> - <EM>curses</EM> soft label key routines
</PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
The slk* functions manipulate the set of soft function-key labels that
- exist on many terminals. For those terminals that do not have soft la-
- bels, <STRONG>curses</STRONG> takes over the bottom line of <STRONG>stdscr</STRONG>, reducing the size of
- <STRONG>stdscr</STRONG> and the variable <STRONG>LINES</STRONG>. <STRONG>curses</STRONG> standardizes on eight labels of
- up to eight characters each. In addition to this, the ncurses imple-
- mentation supports a mode where it simulates 12 labels of up to five
- characters each. This is useful for PC-like enduser devices. ncurses
- simulates this mode by taking over up to two lines at the bottom of the
- screen; it does not try to use any hardware support for this mode.
+ exist on many terminals. For those terminals that do not have soft
+ labels, <STRONG>curses</STRONG> takes over the bottom line of <STRONG>stdscr</STRONG>, reducing the size
+ of <STRONG>stdscr</STRONG> and the variable <STRONG>LINES</STRONG>. <STRONG>curses</STRONG> standardizes on eight labels
+ of up to eight characters each. In addition to this, the ncurses
+ implementation supports a mode where it simulates 12 labels of up to
+ five characters each. This is useful for PC-like enduser devices.
+ ncurses simulates this mode by taking over up to two lines at the
+ bottom of the screen; it does not try to use any hardware support for
+ this mode.
</PRE><H3><a name="h3-Initialization">Initialization</a></H3><PRE>
- The <STRONG>slk_init</STRONG> routine must be called before <STRONG>initscr</STRONG> or <STRONG>newterm</STRONG> is
- called. If <STRONG>initscr</STRONG> eventually uses a line from <STRONG>stdscr</STRONG> to emulate the
- soft labels, then <EM>fmt</EM> determines how the labels are arranged on the
+ The <STRONG>slk_init</STRONG> routine must be called before <STRONG>initscr</STRONG> or <STRONG>newterm</STRONG> is
+ called. If <STRONG>initscr</STRONG> eventually uses a line from <STRONG>stdscr</STRONG> to emulate the
+ soft labels, then <EM>fmt</EM> determines how the labels are arranged on the
screen:
<STRONG>0</STRONG> indicates a 3-2-3 arrangement of the labels.
</PRE><H3><a name="h3-Labels">Labels</a></H3><PRE>
- The <STRONG>slk_set</STRONG> routine (and the <STRONG>slk_wset</STRONG> routine for the wide-character
+ The <STRONG>slk_set</STRONG> routine (and the <STRONG>slk_wset</STRONG> routine for the wide-character
library) has three parameters:
<EM>labnum</EM>
<STRONG>3</STRONG>);
<EM>label</EM>
- is be the string to put on the label, up to eight (five if <EM>fmt</EM>
- in <STRONG>slk_init</STRONG> is <STRONG>2</STRONG> or <STRONG>3</STRONG>) characters in length. A null string or
+ is be the string to put on the label, up to eight (five if <EM>fmt</EM>
+ in <STRONG>slk_init</STRONG> is <STRONG>2</STRONG> or <STRONG>3</STRONG>) characters in length. A null string or
a null pointer sets up a blank label.
- <EM>fmt</EM> is either <STRONG>0</STRONG>, <STRONG>1</STRONG>, or <STRONG>2</STRONG>, indicating whether the label is to be
+ <EM>fmt</EM> is either <STRONG>0</STRONG>, <STRONG>1</STRONG>, or <STRONG>2</STRONG>, indicating whether the label is to be
left-justified, centered, or right-justified, respectively,
within the label.
- The <STRONG>slk_label</STRONG> routine returns the current label for label number <EM>lab-</EM>
- <EM>num</EM>, with leading and trailing blanks stripped.
+ The <STRONG>slk_label</STRONG> routine returns the current label for label number
+ <EM>labnum</EM>, with leading and trailing blanks stripped.
</PRE><H3><a name="h3-Screen-updates">Screen updates</a></H3><PRE>
The <STRONG>slk_clear</STRONG> routine clears the soft labels from the screen.
- The <STRONG>slk_restore</STRONG> routine restores the soft labels to the screen after a
+ The <STRONG>slk_restore</STRONG> routine restores the soft labels to the screen after a
<STRONG>slk_clear</STRONG> has been performed.
- The <STRONG>slk_touch</STRONG> routine forces all the soft labels to be output the next
+ The <STRONG>slk_touch</STRONG> routine forces all the soft labels to be output the next
time a <STRONG>slk_noutrefresh</STRONG> is performed.
</PRE><H3><a name="h3-Video-attributes">Video attributes</a></H3><PRE>
- The <STRONG>slk_attron</STRONG>, <STRONG>slk_attrset</STRONG>, <STRONG>slk_attroff</STRONG> and <STRONG>slk_attr</STRONG> routines corre-
- spond to <STRONG>attron</STRONG>, <STRONG>attrset</STRONG>, <STRONG>attroff</STRONG> and <STRONG>attr_get</STRONG>, respectively. They
- have an effect only if soft labels are simulated on the bottom line of
- the screen. The default highlight for soft keys is A_STANDOUT (as in
- System V curses, which does not document this fact).
+ The <STRONG>slk_attron</STRONG>, <STRONG>slk_attrset</STRONG>, <STRONG>slk_attroff</STRONG> and <STRONG>slk_attr</STRONG> routines
+ correspond to <STRONG>attron</STRONG>, <STRONG>attrset</STRONG>, <STRONG>attroff</STRONG> and <STRONG>attr_get</STRONG>, respectively.
+ They have an effect only if soft labels are simulated on the bottom
+ line of the screen. The default highlight for soft keys is A_STANDOUT
+ (as in System V curses, which does not document this fact).
</PRE><H3><a name="h3-Colors">Colors</a></H3><PRE>
- The <STRONG>slk_color</STRONG> routine corresponds to <STRONG>color_set</STRONG>. It has an effect only
+ The <STRONG>slk_color</STRONG> routine corresponds to <STRONG>color_set</STRONG>. It has an effect only
if soft labels are simulated on the bottom line of the screen.
- Because <STRONG>slk_color</STRONG> accepts only <STRONG>short</STRONG> (signed 16-bit integer) values,
- this implementation provides <STRONG>extended_slk_color</STRONG> which accepts an inte-
- ger value, e.g., 32-bits.
+ Because <STRONG>slk_color</STRONG> accepts only <STRONG>short</STRONG> (signed 16-bit integer) values,
+ this implementation provides <STRONG>extended_slk_color</STRONG> which accepts an
+ integer value, e.g., 32-bits.
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
- These routines return <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG> (SVr4 specifies only "an
+ These routines return <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG> (SVr4 specifies only "an
integer value other than <STRONG>ERR</STRONG>") upon successful completion.
X/Open defines no error conditions. In this implementation
<STRONG>slk_attr</STRONG>
returns the attribute used for the soft keys.
- <STRONG>slk_attroff</STRONG>, <STRONG>slk_attron</STRONG>, <STRONG>slk_clear</STRONG>, <STRONG>slk_noutrefresh</STRONG>, <STRONG>slk_refresh</STRONG>,
+ <STRONG>slk_attroff</STRONG>, <STRONG>slk_attron</STRONG>, <STRONG>slk_clear</STRONG>, <STRONG>slk_noutrefresh</STRONG>, <STRONG>slk_refresh</STRONG>,
<STRONG>slk_touch</STRONG>
- return an error if the terminal or the softkeys were not ini-
- tialized.
+ return an error if the terminal or the softkeys were not
+ initialized.
<STRONG>slk_attrset</STRONG>
- returns an error if the terminal or the softkeys were not ini-
- tialized.
+ returns an error if the terminal or the softkeys were not
+ initialized.
<STRONG>slk_attr_set</STRONG>
- returns an error if the terminal or the softkeys were not ini-
- tialized, or the color pair is outside the range 0..COL-
- OR_PAIRS-1.
+ returns an error if the terminal or the softkeys were not
+ initialized, or the color pair is outside the range
+ 0..COLOR_PAIRS-1.
<STRONG>slk_color</STRONG>
- returns an error if the terminal or the softkeys were not ini-
- tialized, or the color pair is outside the range 0..COL-
- OR_PAIRS-1.
+ returns an error if the terminal or the softkeys were not
+ initialized, or the color pair is outside the range
+ 0..COLOR_PAIRS-1.
<STRONG>slk_init</STRONG>
- returns an error if the format parameter is outside the range
+ returns an error if the format parameter is outside the range
0..3.
<STRONG>slk_label</STRONG>
returns <STRONG>NULL</STRONG> on error.
<STRONG>slk_set</STRONG>
- returns an error if the terminal or the softkeys were not ini-
- tialized, or the <EM>labnum</EM> parameter is outside the range of label
- counts, or if the format parameter is outside the range 0..2,
- or if memory for the labels cannot be allocated.
+ returns an error if the terminal or the softkeys were not
+ initialized, or the <EM>labnum</EM> parameter is outside the range of
+ label counts, or if the format parameter is outside the range
+ 0..2, or if memory for the labels cannot be allocated.
</PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE>
</PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE>
- X/Open Curses documents the <EM>opts</EM> argument as reserved for future use,
- saying that it must be null. This implementation uses that parameter
+ X/Open Curses documents the <EM>opts</EM> argument as reserved for future use,
+ saying that it must be null. This implementation uses that parameter
in ABI 6 for the functions which have a color-pair parameter to support
extended color pairs.
- For functions which modify the color, e.g., <STRONG>slk_attr_set</STRONG>, if <EM>opts</EM> is
- set it is treated as a pointer to <STRONG>int</STRONG>, and used to set the color
+ For functions which modify the color, e.g., <STRONG>slk_attr_set</STRONG>, if <EM>opts</EM> is
+ set it is treated as a pointer to <STRONG>int</STRONG>, and used to set the color
pair instead of the <STRONG>short</STRONG> pair parameter.
</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
- Most applications would use <STRONG>slk_noutrefresh</STRONG> because a <STRONG>wrefresh</STRONG> is like-
- ly to follow soon.
+ Most applications would use <STRONG>slk_noutrefresh</STRONG> because a <STRONG>wrefresh</STRONG> is
+ likely to follow soon.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- The XSI Curses standard, Issue 4, described the soft-key functions,
+ The XSI Curses standard, Issue 4, described the soft-key functions,
with some differences from SVr4 curses:
- <STRONG>o</STRONG> It added functions like the SVr4 attribute-manipulation functions
- <STRONG>slk_attron</STRONG>, <STRONG>slk_attroff</STRONG>, <STRONG>slk_attrset</STRONG>, but which use <STRONG>attr_t</STRONG> parame-
- ters (rather than <STRONG>chtype</STRONG>), along with a reserved <EM>opts</EM> parameter.
+ <STRONG>o</STRONG> It added functions like the SVr4 attribute-manipulation functions
+ <STRONG>slk_attron</STRONG>, <STRONG>slk_attroff</STRONG>, <STRONG>slk_attrset</STRONG>, but which use <STRONG>attr_t</STRONG>
+ parameters (rather than <STRONG>chtype</STRONG>), along with a reserved <EM>opts</EM>
+ parameter.
- Two of these new functions (unlike the SVr4 functions) have no pro-
- vision for color: <STRONG>slk_attr_on</STRONG> and <STRONG>slk_attr_off</STRONG>.
+ Two of these new functions (unlike the SVr4 functions) have no
+ provision for color: <STRONG>slk_attr_on</STRONG> and <STRONG>slk_attr_off</STRONG>.
The third function (<STRONG>slk_attr_set</STRONG>) has a color-pair parameter.
<STRONG>o</STRONG> Soft-key groups are an array of <EM>ng</EM> integers.
<STRONG>o</STRONG> In SVr4, <STRONG>slk_init</STRONG> calls <STRONG>slk_start</STRONG> passing a null for <EM>gp</EM>. For this
- case, <STRONG>slk_start</STRONG> uses the number of groups <EM>ng</EM> (3 for the 3-2-3 lay-
- out, 2 for the 4-4 layout) which <STRONG>slk_init</STRONG> provided.
+ case, <STRONG>slk_start</STRONG> uses the number of groups <EM>ng</EM> (3 for the 3-2-3
+ layout, 2 for the 4-4 layout) which <STRONG>slk_init</STRONG> provided.
- If <EM>ng</EM> is neither 2 or 3, <STRONG>slk_start</STRONG> checks the terminfo <EM>fln</EM> (la-
- bel_format) capability, interpreting that as a comma-separated list
- of numbers, e.g., "3,2,3" for the 3-2-3 layout.
+ If <EM>ng</EM> is neither 2 or 3, <STRONG>slk_start</STRONG> checks the terminfo <EM>fln</EM>
+ (label_format) capability, interpreting that as a comma-separated
+ list of numbers, e.g., "3,2,3" for the 3-2-3 layout.
Finally, if there is no <EM>fln</EM> capability, <STRONG>slk_start</STRONG> returns ERR.
-ncurses 6.4 2023-07-01 <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
+ncurses 6.4 2023-09-16 <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>