-<!--
+<!--
****************************************************************************
- * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. *
+ * Copyright 2018-2022,2023 Thomas E. Dickey *
+ * Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_slk.3x,v 1.33 2017/11/21 00:46:31 tom Exp @
+ * @Id: curs_slk.3x,v 1.48 2023/07/01 15:43:20 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</TITLE>
-<link rev=made href="mailto:bug-ncurses@gnu.org">
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<TITLE>curs_slk 3x 2023-07-01 ncurses 6.4 Library calls</TITLE>
+<link rel="author" href="mailto:bug-ncurses@gnu.org">
+
</HEAD>
<BODY>
-<H1 class="no-header">curs_slk 3x</H1>
+<H1 class="no-header">curs_slk 3x 2023-07-01 ncurses 6.4 Library calls</H1>
<PRE>
-<STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG> <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
+<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>
<STRONG>int</STRONG> <STRONG>slk_attr_on(attr_t</STRONG> <EM>attrs</EM><STRONG>,</STRONG> <STRONG>void*</STRONG> <EM>opts</EM><STRONG>);</STRONG>
<STRONG>int</STRONG> <STRONG>slk_attr_off(const</STRONG> <STRONG>attr_t</STRONG> <EM>attrs</EM><STRONG>,</STRONG> <STRONG>void</STRONG> <STRONG>*</STRONG> <EM>opts</EM><STRONG>);</STRONG>
<STRONG>int</STRONG> <STRONG>slk_attr_set(const</STRONG> <STRONG>attr_t</STRONG> <EM>attrs</EM><STRONG>,</STRONG> <STRONG>short</STRONG> <EM>pair</EM><STRONG>,</STRONG> <STRONG>void*</STRONG> <EM>opts</EM><STRONG>);</STRONG>
-
+ /* extension */
<STRONG>attr_t</STRONG> <STRONG>slk_attr(void);</STRONG>
<STRONG>int</STRONG> <STRONG>slk_color(short</STRONG> <EM>pair</EM><STRONG>);</STRONG>
library) has three parameters:
<EM>labnum</EM>
- is the label number, from <STRONG>1</STRONG> to <STRONG>8</STRONG> (12 for <EM>fmt</EM> in <STRONG>slk_init</STRONG> is <STRONG>2</STRONG>
- or <STRONG>3</STRONG>);
+ is the label number, from <STRONG>1</STRONG> to <STRONG>8</STRONG> (12 if <EM>fmt</EM> in <STRONG>slk_init</STRONG> is <STRONG>2</STRONG> or
+ <STRONG>3</STRONG>);
<EM>label</EM>
- is be the string to put on the label, up to eight (five for <EM>fmt</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
a null pointer sets up a blank label.
</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>. 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 curs-
- es, which does not document this fact).
+ 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).
</PRE><H3><a name="h3-Colors">Colors</a></H3><PRE>
or if memory for the labels cannot be allocated.
+</PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE>
+ SVr3 introduced these functions:
+ slk_clear
+ slk_init
+ slk_label
+ slk_noutrefresh
+ slk_refresh
+ slk_restore
+ slk_set
+ slk_touch
+
+ SVr4 added these functions:
+ slk_attroff
+ slk_attron
+ slk_attrset
+ slk_start
+
+ X/Open Curses added these:
+ slk_attr_off
+ slk_attr_on
+ slk_attr_set
+ slk_color
+ slk_wset
+
+
</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
<STRONG>o</STRONG> It added <STRONG>slk_color</STRONG>.
- The format codes <STRONG>2</STRONG> and <STRONG>3</STRONG> for <STRONG>slk_init</STRONG> and the function <STRONG>slk_attr</STRONG> are
- specific to ncurses.
+ Although <STRONG>slk_start</STRONG> is declared in the curses header file, it was not
+ documented by SVr4 other than its presence in a list of libtermlib.so.1
+ symbols. Reading the source code (i.e., Illumos):
+
+ <STRONG>o</STRONG> <STRONG>slk_start</STRONG> has two parameters:
+
+ <STRONG>o</STRONG> <EM>ng</EM> (number of groups) and
+
+ <STRONG>o</STRONG> <EM>gp</EM> (group pointer).
+
+ <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.
+
+ 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.
+
+ Finally, if there is no <EM>fln</EM> capability, <STRONG>slk_start</STRONG> returns ERR.
+
+ <STRONG>o</STRONG> If <STRONG>slk_start</STRONG> is given a non-null <EM>gp</EM>, it copies the <EM>ng</EM> elements of
+ the group of soft-keys, up to 16.
+
+ If there are more than 16 elements, <STRONG>slk_start</STRONG> returns an error.
+
+ <STRONG>o</STRONG> The format codes <STRONG>2</STRONG> and <STRONG>3</STRONG> for <STRONG>slk_init</STRONG> were added by ncurses in
+ 1996. PDCurses 2.4 added this feature in 2001.
+
+ The function <STRONG>slk_attr</STRONG> was added by ncurses in 1996.
- X/Open Curses does not specify a limit for the number of colors and
+ X/Open Curses does not specify a limit for the number of colors and
color pairs which a terminal can support. However, in its use of <STRONG>short</STRONG>
- for the parameters, it carries over SVr4's implementation detail for
+ for the parameters, it carries over SVr4's implementation detail for
the compiled terminfo database, which uses signed 16-bit numbers. This
- implementation provides extended versions of those functions which use
- <STRONG>short</STRONG> parameters, allowing applications to use larger color- and pair-
+ implementation provides extended versions of those functions which use
+ <STRONG>int</STRONG> parameters, allowing applications to use larger color- and pair-
numbers.
- <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
+ncurses 6.4 2023-07-01 <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
</ul>
</li>
<li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
+<li><a href="#h2-HISTORY">HISTORY</a></li>
<li><a href="#h2-EXTENSIONS">EXTENSIONS</a></li>
<li><a href="#h2-NOTES">NOTES</a></li>
<li><a href="#h2-PORTABILITY">PORTABILITY</a></li>