]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - doc/html/man/curs_slk.3x.html
ncurses 6.4 - patch 20240414
[ncurses.git] / doc / html / man / curs_slk.3x.html
index e76dcc7e3f5c64043905b6c429002152dd9c2940..f0851713e6f7d0e9935ca553104f2c67664b6845 100644 (file)
@@ -1,7 +1,7 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
-<!-- 
+<!--
   ****************************************************************************
   ****************************************************************************
-  * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
+  * Copyright 2018-2023,2024 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            *
   *                                                                          *
   * 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.                                                           *
   ****************************************************************************
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_slk.3x,v 1.16 2007/06/02 20:40:07 tom Exp @
+  * @Id: curs_slk.3x,v 1.69 2024/03/16 15:35:01 tom Exp @
 -->
 -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
 <HEAD>
 <HTML>
 <HEAD>
-<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">
+<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 2024-03-16 ncurses 6.4 Library calls</TITLE>
+<link rel="author" href="mailto:bug-ncurses@gnu.org">
+
 </HEAD>
 <BODY>
 </HEAD>
 <BODY>
-<H1>curs_slk 3x</H1>
-<HR>
+<H1 class="no-header">curs_slk 3x 2024-03-16 ncurses 6.4 Library calls</H1>
 <PRE>
 <PRE>
-<!-- Manpage converted by man2html 3.0.1 -->
-<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>
 
 
 
 
 
 
 
 
-</PRE>
-<H2>NAME</H2><PRE>
-       <STRONG>slk_init</STRONG>, <STRONG>slk_set</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>curses</STRONG> soft label
-       routines
+</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> - <EM>curses</EM> soft label key routines
 
 
 
 
-</PRE>
-<H2>SYNOPSIS</H2><PRE>
+</PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
        <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
 
        <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
 
-       <STRONG>int</STRONG> <STRONG>slk_init(int</STRONG> <STRONG>fmt);</STRONG>
-       <STRONG>int</STRONG> <STRONG>slk_set(int</STRONG> <STRONG>labnum,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*label,</STRONG> <STRONG>int</STRONG> <STRONG>fmt);</STRONG>
+       <STRONG>int</STRONG> <STRONG>slk_init(int</STRONG> <EM>fmt</EM><STRONG>);</STRONG>
+
+       <STRONG>int</STRONG> <STRONG>slk_set(int</STRONG> <EM>labnum</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>label</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>align</EM><STRONG>);</STRONG>
+       <STRONG>int</STRONG> <STRONG>slk_wset(int</STRONG> <EM>labnum</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>wchar_t</STRONG> <STRONG>*</STRONG><EM>label</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>align</EM><STRONG>);</STRONG>
+
+       <STRONG>char</STRONG> <STRONG>*slk_label(int</STRONG> <EM>labnum</EM><STRONG>);</STRONG>
+
        <STRONG>int</STRONG> <STRONG>slk_refresh(void);</STRONG>
        <STRONG>int</STRONG> <STRONG>slk_noutrefresh(void);</STRONG>
        <STRONG>int</STRONG> <STRONG>slk_refresh(void);</STRONG>
        <STRONG>int</STRONG> <STRONG>slk_noutrefresh(void);</STRONG>
-       <STRONG>char</STRONG> <STRONG>*slk_label(int</STRONG> <STRONG>labnum);</STRONG>
        <STRONG>int</STRONG> <STRONG>slk_clear(void);</STRONG>
        <STRONG>int</STRONG> <STRONG>slk_restore(void);</STRONG>
        <STRONG>int</STRONG> <STRONG>slk_touch(void);</STRONG>
        <STRONG>int</STRONG> <STRONG>slk_clear(void);</STRONG>
        <STRONG>int</STRONG> <STRONG>slk_restore(void);</STRONG>
        <STRONG>int</STRONG> <STRONG>slk_touch(void);</STRONG>
-       <STRONG>int</STRONG> <STRONG>slk_attron(const</STRONG> <STRONG>chtype</STRONG> <STRONG>attrs);</STRONG>
-       <STRONG>int</STRONG> <STRONG>slk_attroff(const</STRONG> <STRONG>chtype</STRONG> <STRONG>attrs);</STRONG>
-       <STRONG>int</STRONG> <STRONG>slk_attrset(const</STRONG> <STRONG>chtype</STRONG> <STRONG>attrs);</STRONG>
-       <STRONG>int</STRONG> <STRONG>slk_attr_on(attr_t</STRONG> <STRONG>attrs,</STRONG> <STRONG>void*</STRONG> <STRONG>opts);</STRONG>
-       <STRONG>int</STRONG> <STRONG>slk_attr_off(const</STRONG> <STRONG>attr_t</STRONG> <STRONG>attrs,</STRONG> <STRONG>void</STRONG> <STRONG>*</STRONG> <STRONG>opts);</STRONG>
-       <STRONG>int</STRONG> <STRONG>slk_attr_set(const</STRONG> <STRONG>attr_t</STRONG> <STRONG>attrs,</STRONG>
-            <STRONG>short</STRONG> <STRONG>color_pair_number,</STRONG> <STRONG>void*</STRONG> <STRONG>opts);</STRONG>
+
+       <STRONG>int</STRONG> <STRONG>slk_attron(const</STRONG> <STRONG>chtype</STRONG> <EM>attrs</EM><STRONG>);</STRONG>
+       <STRONG>int</STRONG> <STRONG>slk_attroff(const</STRONG> <STRONG>chtype</STRONG> <EM>attrs</EM><STRONG>);</STRONG>
+       <STRONG>int</STRONG> <STRONG>slk_attrset(const</STRONG> <STRONG>chtype</STRONG> <EM>attrs</EM><STRONG>);</STRONG>
+       <STRONG>int</STRONG> <STRONG>slk_attr_on(attr_t</STRONG> <EM>attrs</EM><STRONG>,</STRONG> <STRONG>void</STRONG> <STRONG>*</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>
+       <EM>/*</EM> <EM>extension</EM> <EM>*/</EM>
        <STRONG>attr_t</STRONG> <STRONG>slk_attr(void);</STRONG>
        <STRONG>attr_t</STRONG> <STRONG>slk_attr(void);</STRONG>
-       <STRONG>int</STRONG> <STRONG>slk_color(short</STRONG> <STRONG>color_pair_number);</STRONG>
 
 
+       <STRONG>int</STRONG> <STRONG>slk_color(short</STRONG> <EM>pair</EM><STRONG>);</STRONG>
+       <EM>/*</EM> <EM>extension</EM> <EM>*/</EM>
+       <STRONG>int</STRONG> <STRONG>extended_slk_color(int</STRONG> <EM>pair</EM><STRONG>);</STRONG>
 
 
-</PRE>
-<H2>DESCRIPTION</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 labels, <STRONG>curses</STRONG> takes over the bottom
-       line of <STRONG>stdscr</STRONG>, reducing the size of <STRONG>stdscr</STRONG> and the  vari-
-       able  <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 la-
-       bels of up to five characters each. This  is  most  common
-       for  todays  PC  like  enduser  devices.  Please note that
-       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.
-
-       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.  Setting <EM>fmt</EM> to <STRONG>0</STRONG>
-       indicates a 3-2-3 arrangement of the labels, <STRONG>1</STRONG> indicates a
-       4-4 arrangement and <STRONG>2</STRONG> indicates the PC like 4-4-4 mode. If
-       <STRONG>fmt</STRONG> is set to <STRONG>3</STRONG>, it is again the PC like 4-4-4  mode,  but
-       in  addition  an index line is generated, helping the user
-       to identify the key numbers easily.
-
-       The <STRONG>slk_set</STRONG> routine requires <EM>labnum</EM> to be a label  number,
-       from <STRONG>1</STRONG> to <STRONG>8</STRONG> (resp. <STRONG>12</STRONG>); <EM>label</EM> must be the string to be put
-       on the label, up  to  eight  (resp.  five)  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 left-justified, centered, or right-justi-
-       fied, respectively, within the label.
-
-       The <STRONG>slk_refresh</STRONG> and <STRONG>slk_noutrefresh</STRONG> routines correspond to
-       the <STRONG>wrefresh</STRONG> and <STRONG>wnoutrefresh</STRONG> routines.
-
-       The  <STRONG>slk_label</STRONG> routine returns the current label for label
-       number <EM>labnum</EM>, with leading and trailing blanks  stripped.
-
-       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 <STRONG>slk_clear</STRONG> has been performed.
-
-       The  <STRONG>slk_touch</STRONG>  routine  forces  all the soft labels to be
-       output the next time a <STRONG>slk_noutrefresh</STRONG> is performed.
-
-       The <STRONG>slk_attron</STRONG>, <STRONG>slk_attrset</STRONG>, <STRONG>slk_attroff</STRONG> and <STRONG>slk_attr</STRONG> rou-
-       tines correspond 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 curses, which does
-       not document this fact).
-
-       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.
 
 
+</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
+       These functions manipulate the  soft  function  key  labels  that  some
+       hardware  terminals support.  For those terminals that do not have soft
+       labels, <EM>curses</EM> takes over the  bottom  line  of  <STRONG>stdscr</STRONG>,  reducing  its
+       vertical  size  and the value of <STRONG>LINES</STRONG> by one.  By default, <EM>curses</EM> uses
+       eight labels of up to eight characters each.
 
 
-</PRE>
-<H2>RETURN VALUE</H2><PRE>
-       These routines return <STRONG>ERR</STRONG> upon failure and OK (SVr4 speci-
-       fies only "an integer value other than <STRONG>ERR</STRONG>") upon success-
-       ful completion.
+       <EM>ncurses</EM> furthermore supports a mode comprising twelve labels of  up  to
+       five  characters  each,  following a convention associated with the IBM
+       PC/AT keyboard.  <EM>ncurses</EM> 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.
 
 
-       X/Open  defines  no error conditions.  In this implementa-
-       tion
 
 
-              <STRONG>slk_attr</STRONG>
-                   returns the attribute used for the soft  keys.
+</PRE><H3><a name="h3-Initialization">Initialization</a></H3><PRE>
+       <STRONG>slk_init</STRONG>  must  be  called  before  <STRONG>initscr</STRONG>  or  <STRONG>newterm</STRONG>.   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>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 soft-
-                   keys were not initialized.
+       <STRONG>0</STRONG>  indicates a 3-2-3 arrangement of the labels.
 
 
-              <STRONG>slk_attrset</STRONG>
-                   returns an error if the terminal or the  soft-
-                   keys were not initialized.
+       <STRONG>1</STRONG>  indicates a 4-4 arrangement
 
 
-              <STRONG>slk_attr_set</STRONG>
-                   returns  an error if the terminal or the soft-
-                   keys were not initialized, or the  color  pair
-                   is outside the range 0..COLOR_PAIRS-1, or opts
-                   is not null.
+       <STRONG>2</STRONG>  indicates the PC-like 4-4-4 mode.
 
 
-              <STRONG>slk_color</STRONG>
-                   returns an error if the terminal or the  soft-
-                   keys  were  not initialized, or the color pair
-                   is outside the range 0..COLOR_PAIRS-1.
+       <STRONG>3</STRONG>  is again the PC-like 4-4-4 mode, but in addition an  index  line  is
+          generated,  helping  the  user  to  associate  each  label  with its
+          numbered function key.  <STRONG>LINES</STRONG> and the vertical size  of  <STRONG>stdscr</STRONG>  are
+          further reduced.
 
 
-              <STRONG>slk_init</STRONG>
-                   returns an error if the  format  parameter  is
-                   outside the range 0..3.
 
 
-              <STRONG>slk_label</STRONG>
-                   returns <STRONG>NULL</STRONG> on error.
+</PRE><H3><a name="h3-Labels">Labels</a></H3><PRE>
+       Populate  the  labels  with  normal strings (<STRONG>slk_set</STRONG>) or wide-character
+       strings (<STRONG>slk_wset</STRONG>).  Each function takes three parameters.
 
 
-              <STRONG>slk_set</STRONG>
-                   returns  an error if the terminal or the soft-
-                   keys were not initialized, or the  <EM>labnum</EM>  pa-
-                   rameter  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.
+       <EM>labnum</EM>  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 if <EM>fmt</EM>
+               in <STRONG>slk_init</STRONG> is <STRONG>2</STRONG> or <STRONG>3</STRONG>) characters in length.  A empty string or
+               a null pointer sets up a blank label.
 
 
-</PRE>
-<H2>NOTES</H2><PRE>
-       Most applications would use <STRONG>slk_noutrefresh</STRONG> because a <STRONG>wre-</STRONG>
-       <STRONG>fresh</STRONG> is likely to follow soon.
+       <EM>align</EM>   is  <STRONG>0</STRONG>,  <STRONG>1</STRONG>,  or <STRONG>2</STRONG>, aligning <EM>label</EM> to the left, center, or right,
+               respectively, within the 8 (5) character cells housing it.
 
 
+       <STRONG>slk_label</STRONG> obtains the string assigned to label number <EM>labnum</EM>, with  any
+       leading and trailing blanks stripped.
 
 
-</PRE>
-<H2>PORTABILITY</H2><PRE>
-       The  XSI  Curses  standard, Issue 4, describes these func-
-       tions.  It changes the argument type of the  attribute-ma-
-       nipulation  functions <STRONG>slk_attron</STRONG>, <STRONG>slk_attroff</STRONG>, <STRONG>slk_attrset</STRONG>
-       to be <STRONG>attr_t</STRONG>, and adds <STRONG>const</STRONG> qualifiers. The format  codes
-       <STRONG>2</STRONG>  and <STRONG>3</STRONG> for <STRONG>slk_init()</STRONG> and the function <STRONG>slk_attr</STRONG> are spe-
-       cific to ncurses.
 
 
+</PRE><H3><a name="h3-Screen-Updates">Screen Updates</a></H3><PRE>
+       <STRONG>slk_refresh</STRONG>  and  <STRONG>slk_noutrefresh</STRONG>  affect  the  soft key label lines as
+       <STRONG>wrefresh</STRONG> and <STRONG>wnoutrefresh</STRONG> do the <EM>curses</EM> window.
 
 
-</PRE>
-<H2>SEE ALSO</H2><PRE>
-       <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,  <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>,   <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>,   <STRONG>curs_re-</STRONG>
-       <STRONG><A HREF="curs_refresh.3x.html">fresh(3x)</A></STRONG>
+       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
+       <STRONG>slk_clear</STRONG> has been performed.
+
+       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
+       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 key labels is
+       <STRONG>A_STANDOUT</STRONG> (as in System V <EM>curses</EM>, 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
+       if soft labels are simulated on the bottom line of the screen.
+
+       Because  <STRONG>slk_color</STRONG>  accepts  only <EM>short</EM> (signed 16-bit integer) values,
+       this implementation provides <STRONG>extended_slk_color</STRONG>, which accepts  an  <EM>int</EM>
+       value of at least 32 bits.
+
+
+</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
+       Routines  that  return  an integer 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 Curses 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_touch</STRONG>
+               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
+               initialized.
+
+          <STRONG>slk_attr_set</STRONG>
+               returns an error if the  terminal  or  the  softkeys  were  not
+               initialized,   or   the   color   pair  is  outside  the  range
+               0..<STRONG>COLOR_PAIRS</STRONG>-1.
+
+          <STRONG>slk_color</STRONG>
+               returns an error if the  terminal  or  the  softkeys  were  not
+               initialized,   or   the   color   pair  is  outside  the  range
+               0..<STRONG>COLOR_PAIRS</STRONG>-1.
+
+          <STRONG>slk_init</STRONG>
+               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
+               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-NOTES">NOTES</a></H2><PRE>
+       Most applications would  use  <STRONG>slk_noutrefresh</STRONG>  because  a  <STRONG>wrefresh</STRONG>  is
+       likely to follow soon.
+
+
+</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
+       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 <EM>int</EM>, and used to set the color pair
+       instead of the <EM>short</EM> pair parameter.
+
+
+</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
+       X/Open  Curses,  Issue  4,  describes  these   functions,   with   some
+       differences from SVr4 <EM>curses</EM>:
+
+       <STRONG>o</STRONG>   X/Open   added   functions  like  the  SVr4  attribute-manipulation
+           functions <STRONG>slk_attron</STRONG>, <STRONG>slk_attroff</STRONG>, and <STRONG>slk_attrset</STRONG>, but  which  use
+           <EM>attr</EM><STRONG>_</STRONG><EM>t</EM>  parameters (rather than <EM>chtype</EM>), along with a reserved <EM>opts</EM>
+           parameter.
+
+           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>   It added <EM>const</EM> qualifiers to parameters (unnecessarily), and
+
+       <STRONG>o</STRONG>   It added <STRONG>slk_color</STRONG>.
+
+       Although  <STRONG>slk_start</STRONG>  is  declared in the <EM>curses</EM> 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
+           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 <STRONG>fln</STRONG>
+           (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 <STRONG>fln</STRONG> capability, <STRONG>slk_start</STRONG> returns <STRONG>ERR</STRONG>.
+
+       <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  <EM>ncurses</EM>  in
+           1996.  PDCurses 2.4 added this feature in 2001.
+
+       The function <STRONG>slk_attr</STRONG> was added by <EM>ncurses</EM> in 1996.
+
+       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 <EM>short</EM>
+       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
+       <EM>int</EM> parameters, allowing applications to use larger  color-  and  pair-
+       numbers.
+
+
+</PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE>
+       SVr3 introduced these functions:
+         <STRONG>slk_clear</STRONG>
+         <STRONG>slk_init</STRONG>
+         <STRONG>slk_label</STRONG>
+         <STRONG>slk_noutrefresh</STRONG>
+         <STRONG>slk_refresh</STRONG>
+         <STRONG>slk_restore</STRONG>
+         <STRONG>slk_set</STRONG>
+         <STRONG>slk_touch</STRONG>
+
+       SVr4 added these functions:
+         <STRONG>slk_attroff</STRONG>
+         <STRONG>slk_attron</STRONG>
+         <STRONG>slk_attrset</STRONG>
+         <STRONG>slk_start</STRONG>
+
+       X/Open Curses added these:
+         <STRONG>slk_attr_off</STRONG>
+         <STRONG>slk_attr_on</STRONG>
+         <STRONG>slk_attr_set</STRONG>
+         <STRONG>slk_color</STRONG>
+         <STRONG>slk_wset</STRONG>
+
+
+</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
+       <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,    <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>,    <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>,    <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>,
+       <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>
 
 
 
 
 
 
-                                                           <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
+ncurses 6.4                       2024-03-16                      <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
 </PRE>
 </PRE>
-<HR>
-<ADDRESS>
-Man(1) output converted with
-<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
-</ADDRESS>
+<div class="nav">
+<ul>
+<li><a href="#h2-NAME">NAME</a></li>
+<li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#h2-DESCRIPTION">DESCRIPTION</a>
+<ul>
+<li><a href="#h3-Initialization">Initialization</a></li>
+<li><a href="#h3-Labels">Labels</a></li>
+<li><a href="#h3-Screen-Updates">Screen Updates</a></li>
+<li><a href="#h3-Video-Attributes">Video Attributes</a></li>
+<li><a href="#h3-Colors">Colors</a></li>
+</ul>
+</li>
+<li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
+<li><a href="#h2-NOTES">NOTES</a></li>
+<li><a href="#h2-EXTENSIONS">EXTENSIONS</a></li>
+<li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
+<li><a href="#h2-HISTORY">HISTORY</a></li>
+<li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
+</ul>
+</div>
 </BODY>
 </HTML>
 </BODY>
 </HTML>