]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - doc/html/man/curs_kernel.3x.html
ncurses 6.2 - patch 20210619
[ncurses.git] / doc / html / man / curs_kernel.3x.html
index a91bb850a175d9f95b73f4bee2d855058babd541..334e5a9faf5419a64244965c79671062c86852f8 100644 (file)
@@ -1,6 +1,7 @@
-<!-- 
+<!--
   ****************************************************************************
-  * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc.              *
+  * Copyright 2018-2019,2020 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_kernel.3x,v 1.22 2017/01/07 19:25:15 tom Exp @
+  * @Id: curs_kernel.3x,v 1.29 2020/10/17 23:22:35 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 http://invisible-island.net/scripts/readme.html#others_scripts">
-<TITLE>curs_kernel 3x</TITLE>
-<link rev=made href="mailto:bug-ncurses@gnu.org">
+<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
+<TITLE>curs_kernel 3X</TITLE>
+<link rel="author" href="mailto:bug-ncurses@gnu.org">
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 </HEAD>
 <BODY>
-<H1 class="no-header">curs_kernel 3x</H1>
+<H1 class="no-header">curs_kernel 3X</H1>
 <PRE>
-<STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>                                         <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>
+<B><A HREF="curs_kernel.3X.html">curs_kernel(3X)</A></B>                                                <B><A HREF="curs_kernel.3X.html">curs_kernel(3X)</A></B>
 
 
 
 
 </PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
-       <STRONG>def_prog_mode</STRONG>, <STRONG>def_shell_mode</STRONG>, <STRONG>reset_prog_mode</STRONG>,
-       <STRONG>reset_shell_mode</STRONG>, <STRONG>resetty</STRONG>, <STRONG>savetty</STRONG>, <STRONG>getsyx</STRONG>, <STRONG>setsyx</STRONG>,
-       <STRONG>ripoffline</STRONG>, <STRONG>curs_set</STRONG>, <STRONG>napms</STRONG> - low-level <STRONG>curses</STRONG> routines
+       <B>def_prog_mode</B>, <B>def_shell_mode</B>, <B>reset_prog_mode</B>, <B>reset_shell_mode</B>,
+       <B>resetty</B>, <B>savetty</B>, <B>getsyx</B>, <B>setsyx</B>, <B>ripoffline</B>, <B>curs_set</B>, <B>napms</B> - low-
+       level <B>curses</B> routines
 
 
 </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
-       <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
+       <B>#include</B> <B>&lt;curses.h&gt;</B>
 
-       <STRONG>int</STRONG> <STRONG>def_prog_mode(void);</STRONG>
-       <STRONG>int</STRONG> <STRONG>def_shell_mode(void);</STRONG>
-       <STRONG>int</STRONG> <STRONG>reset_prog_mode(void);</STRONG>
-       <STRONG>int</STRONG> <STRONG>reset_shell_mode(void);</STRONG>
-       <STRONG>int</STRONG> <STRONG>resetty(void);</STRONG>
-       <STRONG>int</STRONG> <STRONG>savetty(void);</STRONG>
-       <STRONG>void</STRONG> <STRONG>getsyx(int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>);</STRONG>
-       <STRONG>void</STRONG> <STRONG>setsyx(int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>);</STRONG>
-       <STRONG>int</STRONG> <STRONG>ripoffline(int</STRONG> <EM>line</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <STRONG>(*</STRONG><EM>init</EM><STRONG>)(WINDOW</STRONG> <STRONG>*,</STRONG> <STRONG>int));</STRONG>
-       <STRONG>int</STRONG> <STRONG>curs_set(int</STRONG> <EM>visibility</EM><STRONG>);</STRONG>
-       <STRONG>int</STRONG> <STRONG>napms(int</STRONG> <EM>ms</EM><STRONG>);</STRONG>
+       <B>int</B> <B>def_prog_mode(void);</B>
+       <B>int</B> <B>def_shell_mode(void);</B>
+
+       <B>int</B> <B>reset_prog_mode(void);</B>
+       <B>int</B> <B>reset_shell_mode(void);</B>
+
+       <B>int</B> <B>resetty(void);</B>
+       <B>int</B> <B>savetty(void);</B>
+
+       <B>void</B> <B>getsyx(int</B> <I>y</I><B>,</B> <B>int</B> <I>x</I><B>);</B>
+       <B>void</B> <B>setsyx(int</B> <I>y</I><B>,</B> <B>int</B> <I>x</I><B>);</B>
+
+       <B>int</B> <B>ripoffline(int</B> <I>line</I><B>,</B> <B>int</B> <B>(*</B><I>init</I><B>)(WINDOW</B> <B>*,</B> <B>int));</B>
+       <B>int</B> <B>curs_set(int</B> <I>visibility</I><B>);</B>
+       <B>int</B> <B>napms(int</B> <I>ms</I><B>);</B>
 
 
 </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
-       The  following  routines  give low-level access to various
-       <STRONG>curses</STRONG> capabilities.  These routines  typically  are  used
-       inside library routines.
+       The following routines give low-level access to various <B>curses</B> capabil-
+       ities.  These routines typically are used inside library routines.
 
 
 </PRE><H3><a name="h3-def_prog_mode_-def_shell_mode">def_prog_mode, def_shell_mode</a></H3><PRE>
-       The  <STRONG>def_prog_mode</STRONG>  and  <STRONG>def_shell_mode</STRONG>  routines save the
-       current terminal modes as the  "program"  (in  <STRONG>curses</STRONG>)  or
-       "shell"   (not  in  <STRONG>curses</STRONG>)  state  for  use  by  the  <STRONG>re-</STRONG>
-       <STRONG>set_prog_mode</STRONG> and <STRONG>reset_shell_mode</STRONG> routines.  This is done
-       automatically by <STRONG>initscr</STRONG>.  There is one such save area for
-       each screen context allocated by <STRONG>newterm</STRONG>.
+       The <B>def_prog_mode</B> and <B>def_shell_mode</B> routines save the current terminal
+       modes as the "program" (in <B>curses</B>) or "shell" (not in <B>curses</B>) state for
+       use by the <B>reset_prog_mode</B> and <B>reset_shell_mode</B> routines.  This is done
+       automatically  by <B>initscr</B>.  There is one such save area for each screen
+       context allocated by <B>newterm</B>.
 
 
 </PRE><H3><a name="h3-reset_prog_mode_-reset_shell_mode">reset_prog_mode, reset_shell_mode</a></H3><PRE>
-       The <STRONG>reset_prog_mode</STRONG> and <STRONG>reset_shell_mode</STRONG> routines  restore
-       the  terminal  to "program" (in <STRONG>curses</STRONG>) or "shell" (out of
-       <STRONG>curses</STRONG>) state.  These are done automatically by <STRONG><A HREF="curs_initscr.3x.html">endwin(3x)</A></STRONG>
-       and,  after  an  <STRONG>endwin</STRONG>, by <STRONG>doupdate</STRONG>, so they normally are
-       not called.
+       The <B>reset_prog_mode</B> and <B>reset_shell_mode</B> routines restore the  terminal
+       to  "program"  (in <B>curses</B>) or "shell" (out of <B>curses</B>) state.  These are
+       done automatically by <B><A HREF="curs_initscr.3X.html">endwin(3X)</A></B> and, after an <B>endwin</B>, by <B>doupdate</B>,  so
+       they normally are not called.
 
 
 </PRE><H3><a name="h3-resetty_-savetty">resetty, savetty</a></H3><PRE>
-       The <STRONG>resetty</STRONG> and <STRONG>savetty</STRONG>  routines  save  and  restore  the
-       state  of  the  terminal modes.  <STRONG>savetty</STRONG> saves the current
-       state in a buffer and <STRONG>resetty</STRONG> restores the state  to  what
-       it was at the last call to <STRONG>savetty</STRONG>.
+       The <B>resetty</B> and <B>savetty</B> routines save and restore the state of the ter-
+       minal modes.  <B>savetty</B> saves the current state in a buffer  and  <B>resetty</B>
+       restores the state to what it was at the last call to <B>savetty</B>.
 
 
 </PRE><H3><a name="h3-getsyx">getsyx</a></H3><PRE>
-       The  <STRONG>getsyx</STRONG> routine returns the current coordinates of the
-       virtual screen cursor in <EM>y</EM> and <EM>x</EM>.  If <STRONG>leaveok</STRONG> is currently
-       <STRONG>TRUE</STRONG>,  then <STRONG>-1</STRONG>,<STRONG>-1</STRONG> is returned.  If lines have been removed
-       from the top of the screen, using <STRONG>ripoffline</STRONG>, <EM>y</EM> and <EM>x</EM>  in-
-       clude  these lines; therefore, <EM>y</EM> and <EM>x</EM> should be used only
-       as arguments for <STRONG>setsyx</STRONG>.
+       The  <B>getsyx</B>  routine  returns  the  current  coordinates of the <I>virtual</I>
+       <I>screen</I> cursor in <I>y</I> and <I>x</I>.  If <B>leaveok</B> is currently <B>TRUE</B>, then <B>-1</B>,<B>-1</B>  is
+       returned.  If lines have been removed from the top of the screen, using
+       <B>ripoffline</B>, <I>y</I> and <I>x</I> include these lines; therefore, <I>y</I> and <I>x</I>  should  be
+       used only as arguments for <B>setsyx</B>.
+
+       Few applications will use this feature, most use <B>getyx</B> instead.
 
 
 </PRE><H3><a name="h3-setsyx">setsyx</a></H3><PRE>
-       The <STRONG>setsyx</STRONG> routine sets the virtual screen cursor to <EM>y</EM>, <EM>x</EM>.
-       If <EM>y</EM> and <EM>x</EM> are both <STRONG>-1</STRONG>, then <STRONG>leaveok</STRONG> is set.  The two rou-
-       tines <STRONG>getsyx</STRONG> and <STRONG>setsyx</STRONG> are designed to be used by  a  li-
-       brary  routine,  which manipulates <STRONG>curses</STRONG> windows but does
-       not want to change the current position of  the  program's
-       cursor.   The library routine would call <STRONG>getsyx</STRONG> at the be-
-       ginning, do its manipulation of  its  own  windows,  do  a
-       <STRONG>wnoutrefresh</STRONG>  on  its  windows, call <STRONG>setsyx</STRONG>, and then call
-       <STRONG>doupdate</STRONG>.
+       The  <B>setsyx</B> routine sets the <I>virtual</I> <I>screen</I> cursor to <I>y</I>, <I>x</I>.  If <I>y</I> and <I>x</I>
+       are both <B>-1</B>, then <B>leaveok</B> is set.  The two routines <B>getsyx</B>  and  <B>setsyx</B>
+       are  designed to be used by a library routine, which manipulates <B>curses</B>
+       windows but does not want to change the current position  of  the  pro-
+       gram's cursor.  The library routine would call <B>getsyx</B> at the beginning,
+       do its manipulation of its own windows, do a <B>wnoutrefresh</B> on  its  win-
+       dows, call <B>setsyx</B>, and then call <B>doupdate</B>.
+
+       Few applications will use this feature, most use <B>wmove</B> instead.
 
 
 </PRE><H3><a name="h3-ripoffline">ripoffline</a></H3><PRE>
-       The <STRONG>ripoffline</STRONG> routine provides access to the same facili-
-       ty  that  <STRONG>slk_init</STRONG>  [see  <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>] uses to reduce the
-       size of the screen.   <STRONG>ripoffline</STRONG>  must  be  called  before
-       <STRONG>initscr</STRONG> or <STRONG>newterm</STRONG> is called, to prepare these initial ac-
-       tions:
+       The  <B>ripoffline</B>  routine  provides  access  to  the  same facility that
+       <B>slk_init</B> [see <B><A HREF="curs_slk.3X.html">curs_slk(3X)</A></B>] uses to reduce  the  size  of  the  screen.
+       <B>ripoffline</B>  must be called before <B>initscr</B> or <B>newterm</B> is called, to pre-
+       pare these initial actions:
 
-       <STRONG>o</STRONG>   If <EM>line</EM> is positive, a line is removed from the top of
-           <STRONG>stdscr</STRONG>.
+       <B>o</B>   If <I>line</I> is positive, a line is removed from the top of <B>stdscr</B>.
 
-       <STRONG>o</STRONG>   if  <EM>line</EM>  is negative, a line is removed from the bot-
-           tom.
+       <B>o</B>   if <I>line</I> is negative, a line is removed from the bottom.
 
-       When the resulting initialization is done inside  <STRONG>initscr</STRONG>,
-       the routine <STRONG>init</STRONG> (supplied by the user) is called with two
-       arguments:
+       When the resulting initialization is done inside <B>initscr</B>,  the  routine
+       <B>init</B> (supplied by the user) is called with two arguments:
 
-       <STRONG>o</STRONG>   a window pointer to the one-line window that has  been
-           allocated and
+       <B>o</B>   a window pointer to the one-line window that has been allocated and
 
-       <STRONG>o</STRONG>   an integer with the number of columns in the window.
+       <B>o</B>   an integer with the number of columns in the window.
 
-       Inside  this initialization routine, the integer variables
-       <STRONG>LINES</STRONG> and <STRONG>COLS</STRONG> (defined in <STRONG>&lt;curses.h&gt;</STRONG>) are not  guaranteed
-       to  be  accurate  and  <STRONG>wrefresh</STRONG>  or  <STRONG>doupdate</STRONG>  must not be
-       called.  It is allowable to call <STRONG>wnoutrefresh</STRONG>  during  the
-       initialization routine.
+       Inside  this  initialization  routine,  the integer variables <B>LINES</B> and
+       <B>COLS</B> (defined in <B>&lt;curses.h&gt;</B>) are not guaranteed to be accurate and <B>wre-</B>
+       <B>fresh</B> or <B>doupdate</B> must not be called.  It is allowable to call <B>wnoutre-</B>
+       <B>fresh</B> during the initialization routine.
 
-       <STRONG>ripoffline</STRONG>  can  be called up to five times before calling
-       <STRONG>initscr</STRONG> or <STRONG>newterm</STRONG>.
+       <B>ripoffline</B> can be called up to five times  before  calling  <B>initscr</B>  or
+       <B>newterm</B>.
 
 
 </PRE><H3><a name="h3-curs_set">curs_set</a></H3><PRE>
-       The <STRONG>curs_set</STRONG> routine sets the cursor state  to  invisible,
-       normal, or very visible for <STRONG>visibility</STRONG> equal to <STRONG>0</STRONG>, <STRONG>1</STRONG>, or <STRONG>2</STRONG>
-       respectively.  If the terminal supports the <EM>visibility</EM> re-
-       quested, the previous <EM>cursor</EM> state is returned; otherwise,
-       <STRONG>ERR</STRONG> is returned.
+       The  <B>curs_set</B>  routine  sets  the cursor state to invisible, normal, or
+       very visible for <B>visibility</B> equal to <B>0</B>, <B>1</B>, or <B>2</B> respectively.   If  the
+       terminal  supports  the <I>visibility</I> requested, the previous <I>cursor</I> state
+       is returned; otherwise, <B>ERR</B> is returned.
 
 
 </PRE><H3><a name="h3-napms">napms</a></H3><PRE>
-       The <STRONG>napms</STRONG> routine is used to sleep for <EM>ms</EM> milliseconds.
+       The <B>napms</B> routine is used to sleep for <I>ms</I> milliseconds.
 
 
 </PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
-       Except for <STRONG>curs_set</STRONG>, these routines always return <STRONG>OK</STRONG>.
+       Except for <B>curs_set</B>, these routines always return <B>OK</B>.
 
-       <STRONG>curs_set</STRONG> returns the previous cursor state, or <STRONG>ERR</STRONG> if  the
-       requested <EM>visibility</EM> is not supported.
+       <B>curs_set</B> returns the previous cursor state, or  <B>ERR</B>  if  the  requested
+       <I>visibility</I> is not supported.
 
-       X/Open  defines  no error conditions.  In this implementa-
-       tion
+       X/Open defines no error conditions.  In this implementation
 
-       <STRONG>def_prog_mode</STRONG>, <STRONG>def_shell_mode</STRONG>, <STRONG>reset_prog_mode</STRONG>,
-       <STRONG>reset_shell_mode</STRONG>
-            return  an error if the terminal was not initialized,
-            or if the I/O call to obtain  the  terminal  settings
-            fails.
+       <B>def_prog_mode</B>, <B>def_shell_mode</B>, <B>reset_prog_mode</B>, <B>reset_shell_mode</B>
+            return an error if the terminal was not initialized, or if the I/O
+            call to obtain the terminal settings fails.
 
-       <STRONG>ripoffline</STRONG>
-            returns  an error if the maximum number of ripped-off
-            lines exceeds the maximum (NRIPS = 5).
+       <B>ripoffline</B>
+            returns an error if the maximum number of ripped-off lines exceeds
+            the maximum (NRIPS = 5).
 
 
 </PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
-       Note that <STRONG>getsyx</STRONG> is a macro, so <STRONG>&amp;</STRONG> is not necessary  before
-       the variables <EM>y</EM> and <EM>x</EM>.
+       Note that <B>getsyx</B> is a macro, so <B>&amp;</B> is not necessary before the variables
+       <I>y</I> and <I>x</I>.
 
-       Older  SVr4  man  pages  warn  that  the  return  value of
-       <STRONG>curs_set</STRONG> "is currently  incorrect".   This  implementation
-       gets  it  right, but it may be unwise to count on the cor-
-       rectness of the return value anywhere else.
+       Older SVr4 man pages warn that the return value of  <B>curs_set</B>  "is  cur-
+       rently  incorrect".   This  implementation gets it right, but it may be
+       unwise to count on the correctness of the return value anywhere else.
 
-       Both ncurses and SVr4 will  call  <STRONG>curs_set</STRONG>  in  <STRONG>endwin</STRONG>  if
-       <STRONG>curs_set</STRONG>  has  been  called  to make the cursor other than
-       normal, i.e., either invisible or very visible.  There  is
-       no  way  for ncurses to determine the initial cursor state
-       to restore that.
+       Both ncurses and SVr4 will call <B>curs_set</B> in <B>endwin</B> if <B>curs_set</B> has been
+       called  to make the cursor other than normal, i.e., either invisible or
+       very visible.  There is no way for ncurses  to  determine  the  initial
+       cursor state to restore that.
 
 
 </PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
-       The functions <STRONG>setsyx</STRONG> and <STRONG>getsyx</STRONG> are not described  in  the
-       XSI  Curses standard, Issue 4.  All other functions are as
-       described in XSI Curses.
+       The <I>virtual</I> <I>screen</I> functions <B>setsyx</B> and <B>getsyx</B> are not described in the
+       XSI Curses standard, Issue 4.  All other functions are as described  in
+       XSI Curses.
 
-       The SVr4 documentation describes <STRONG>setsyx</STRONG> and <STRONG>getsyx</STRONG> as hav-
-       ing  return  type  int.  This  is  misleading, as they are
-       macros with no documented semantics for the return value.
+       The  SVr4  documentation  describes  <B>setsyx</B> and <B>getsyx</B> as having return
+       type int.  This is misleading, as they are macros  with  no  documented
+       semantics for the return value.
 
 
 </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_initscr.3x.html">curs_initscr(3x)</A></STRONG>,  <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>,  <STRONG>curs_re-</STRONG>
-       <STRONG><A HREF="curs_refresh.3x.html">fresh(3x)</A></STRONG>,   <STRONG><A HREF="curs_scr_dump.3x.html">curs_scr_dump(3x)</A></STRONG>,  <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>,  <STRONG>curs_vari-</STRONG>
-       <STRONG><A HREF="curs_variables.3x.html">ables(3x)</A></STRONG>.
+       <B><A HREF="curses.3X.html">curses(3X)</A></B>,   <B><A HREF="curs_initscr.3X.html">curs_initscr(3X)</A></B>,   <B><A HREF="curs_outopts.3X.html">curs_outopts(3X)</A></B>,   <B><A HREF="curs_refresh.3X.html">curs_refresh(3X)</A></B>,
+       <B><A HREF="curs_scr_dump.3X.html">curs_scr_dump(3X)</A></B>, <B><A HREF="curs_slk.3X.html">curs_slk(3X)</A></B>, <B><A HREF="curs_variables.3X.html">curs_variables(3X)</A></B>.
 
 
 
-                                                        <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>
+                                                               <B><A HREF="curs_kernel.3X.html">curs_kernel(3X)</A></B>
 </PRE>
 <div class="nav">
 <ul>