X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fcurs_kernel.3x.html;h=d8932e326a916572257701f8634ad1d521bc9d9f;hp=a7303ec549c82e9b7ac081bf01fd567964d01df8;hb=HEAD;hpb=ed646e3f683083e787c6ba773364401dc9fa9d40 diff --git a/doc/html/man/curs_kernel.3x.html b/doc/html/man/curs_kernel.3x.html index a7303ec5..90042caf 100644 --- a/doc/html/man/curs_kernel.3x.html +++ b/doc/html/man/curs_kernel.3x.html @@ -1,6 +1,7 @@ - - -curs_kernel 3x - - + +curs_kernel 3x 2024-04-20 ncurses 6.5 Library calls + + -

curs_kernel 3x

+

curs_kernel 3x 2024-04-20 ncurses 6.5 Library calls

-curs_kernel(3x)                                                curs_kernel(3x)
+curs_kernel(3x)                  Library calls                 curs_kernel(3x)
 
 
 
 
 

NAME

-       def_prog_mode, def_shell_mode, reset_prog_mode, reset_shell_mode,
-       resetty, savetty, getsyx, setsyx, ripoffline, curs_set, napms - low-
-       level curses routines
+       def_prog_mode,   def_shell_mode,   reset_prog_mode,   reset_shell_mode,
+       resetty, savetty, getsyx, setsyx, ripoffline, curs_set,  napms  -  low-
+       level curses routines
 
 
 

SYNOPSIS

@@ -56,66 +57,74 @@
 
        int def_prog_mode(void);
        int def_shell_mode(void);
+
        int reset_prog_mode(void);
        int reset_shell_mode(void);
+
        int resetty(void);
        int savetty(void);
+
        void getsyx(int y, int x);
        void setsyx(int y, int x);
+
        int ripoffline(int line, int (*init)(WINDOW *, int));
        int curs_set(int visibility);
        int napms(int ms);
 
 
 

DESCRIPTION

-       The following routines give low-level access to various curses capabil-
-       ities.  These routines typically are used inside library routines.
+       The   following  routines  give  low-level  access  to  various  curses
+       capabilities.   These  routines  typically  are  used  inside   library
+       routines.
 
 
-

def_prog_mode, def_shell_mode

+

def_prog_mode, def_shell_mode

        The def_prog_mode and def_shell_mode routines save the current terminal
        modes as the "program" (in curses) or "shell" (not in curses) state for
        use by the reset_prog_mode and reset_shell_mode routines.  This is done
-       automatically  by initscr.  There is one such save area for each screen
+       automatically by initscr.  There is one such save area for each  screen
        context allocated by newterm.
 
 
-

reset_prog_mode, reset_shell_mode

-       The reset_prog_mode and reset_shell_mode routines restore the  terminal
-       to  "program"  (in curses) or "shell" (out of curses) state.  These are
-       done automatically by endwin(3x) and, after an endwin, by doupdate,  so
+

reset_prog_mode, reset_shell_mode

+       The  reset_prog_mode and reset_shell_mode routines restore the terminal
+       to "program" (in curses) or "shell" (out of curses) state.   These  are
+       done  automatically by endwin(3x) and, after an endwin, by doupdate, so
        they normally are not called.
 
 
-

resetty, savetty

-       The resetty and savetty routines save and restore the state of the ter-
-       minal modes.  savetty saves the current state in a buffer  and  resetty
-       restores the state to what it was at the last call to savetty.
+

resetty, savetty

+       The resetty and savetty routines save and  restore  the  state  of  the
+       terminal  modes.   savetty  saves  the  current  state  in a buffer and
+       resetty restores the state to what it was at the last call to savetty.
 
 
 

getsyx

-       The  getsyx  routine  returns  the  current  coordinates of the virtual
-       screen cursor in y and x.  If leaveok is currently TRUE, then -1,-1  is
+       The getsyx routine returns  the  current  coordinates  of  the  virtual
+       screen  cursor in y and x.  If leaveok is currently TRUE, then -1,-1 is
        returned.  If lines have been removed from the top of the screen, using
-       ripoffline, y and x include these lines; therefore, y and x  should  be
+       ripoffline,  y  and x include these lines; therefore, y and x should be
        used only as arguments for setsyx.
 
+       Few applications will use this feature, most use getyx instead.
+
 
 

setsyx

-       The  setsyx routine sets the virtual screen cursor to y, x.  If y and x
-       are both -1, then leaveok is set.  The two routines getsyx  and  setsyx
-       are  designed to be used by a library routine, which manipulates curses
-       windows but does not want to change the current position  of  the  pro-
-       gram's cursor.  The library routine would call getsyx at the beginning,
-       do its manipulation of its own windows, do a wnoutrefresh on  its  win-
-       dows, call setsyx, and then call doupdate.
+       The setsyx routine sets the virtual screen cursor to y, x.  If y and  x
+       are  both  -1, then leaveok is set.  The two routines getsyx and setsyx
+       are designed to be used by a library routine, which manipulates  curses
+       windows  but  does  not  want  to  change  the  current position of the
+       program's cursor.   The  library  routine  would  call  getsyx  at  the
+       beginning, do its manipulation of its own windows, do a wnoutrefresh on
+       its windows, call setsyx, and then call doupdate.
+
+       Few applications will use this feature, most use wmove instead.
 
 
 

ripoffline

-       The  ripoffline  routine  provides  access  to  the  same facility that
-       slk_init [see curs_slk(3x)] uses to reduce  the  size  of  the  screen.
-       ripoffline  must be called before initscr or newterm is called, to pre-
-       pare these initial actions:
+       ripoffline provides access to the same facility that slk_init(3x)  uses
+       to  reduce  the  size  of the screen.  ripoffline must be called before
+       initscr or newterm is called, to prepare these initial actions:
 
        o   If line is positive, a line is removed from the top of stdscr.
 
@@ -129,9 +138,9 @@
        o   an integer with the number of columns in the window.
 
        Inside  this  initialization  routine,  the integer variables LINES and
-       COLS (defined in <curses.h>) are not guaranteed to be accurate and wre-
-       fresh or doupdate must not be called.  It is allowable to call wnoutre-
-       fresh during the initialization routine.
+       COLS (defined in <curses.h>) are not  guaranteed  to  be  accurate  and
+       wrefresh  or  doupdate  must  not  be  called.  It is allowable to call
+       wnoutrefresh during the initialization routine.
 
        ripoffline can be called up to five times  before  calling  initscr  or
        newterm.
@@ -145,13 +154,14 @@
 
 
 

napms

-       The napms routine is used to sleep for ms milliseconds.
+       napms sleeps  for  ms  milliseconds.   If  ms  exceeds  30,000  (thirty
+       seconds), it is capped at that value.
 
 
 

RETURN VALUE

        Except for curs_set, these routines always return OK.
 
-       curs_set returns the previous cursor state, or  ERR  if  the  requested
+       curs_set  returns  the  previous  cursor state, or ERR if the requested
        visibility is not supported.
 
        X/Open defines no error conditions.  In this implementation
@@ -162,39 +172,43 @@
 
        ripoffline
             returns an error if the maximum number of ripped-off lines exceeds
-            the maximum (NRIPS = 5).
+            the maximum (5).
 
 
 

NOTES

        Note that getsyx is a macro, so & is not necessary before the variables
        y and x.
 
-       Older SVr4 man pages warn that the return value of  curs_set  "is  cur-
-       rently  incorrect".   This  implementation gets it right, but it may be
+       Older  SVr4  man  pages  warn  that  the  return  value of curs_set "is
+       currently 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 curs_set in endwin if curs_set 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
+       Both ncurses and SVr4 will call curs_set in endwin if curs_set 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.
 
 
 

PORTABILITY

-       The  functions  setsyx  and  getsyx are not described in the XSI Curses
-       standard, Issue 4.  All other functions are as described in XSI Curses.
+       The virtual screen functions setsyx and getsyx  are  not  described  in
+       X/Open Curses, Issue 4.  All other functions are as described in X/Open
+       Curses.
 
        The SVr4 documentation describes setsyx and  getsyx  as  having  return
-       type int. This is misleading, as they are macros with no documented se-
-       mantics for the return value.
+       type  int.   This  is misleading, as they are macros with no documented
+       semantics for the return value.
+
+       If interrupted, ncurses restarts napms.  That, and the limitation to 30
+       seconds, are different from other implementations.
 
 
 

SEE ALSO

        curses(3x),   curs_initscr(3x),   curs_outopts(3x),   curs_refresh(3x),
-       curs_scr_dump(3x), curs_slk(3x), curs_variables(3x).
+       curs_scr_dump(3x), curs_slk(3x), curs_variables(3x)
 
 
 
-                                                               curs_kernel(3x)
+ncurses 6.5                       2024-04-20                   curs_kernel(3x)