]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/curs_kernel.3x
ncurses 6.2 - patch 20210213
[ncurses.git] / man / curs_kernel.3x
index 727a2721cf71caee2d61219fb55b245fd638e8a5..a4e6c808b08e57ca5a06a0124e4c9cadd4fc71c8 100644 (file)
@@ -1,5 +1,6 @@
 .\"***************************************************************************
 .\"***************************************************************************
-.\" Copyright (c) 1998-2015,2016 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            *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" copy of this software and associated documentation files (the            *
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_kernel.3x,v 1.21 2016/10/15 16:42:55 tom Exp $
+.\" $Id: curs_kernel.3x,v 1.29 2020/10/17 23:22:35 tom Exp $
+.ie \n(.g .ds `` \(lq
+.el       .ds `` ``
+.ie \n(.g .ds '' \(rq
+.el       .ds '' ''
 .de bP
 .de bP
-.IP \(bu 4
+.ie n  .IP \(bu 4
+.el    .IP \(bu 2
 ..
 .TH curs_kernel 3X ""
 .na
 ..
 .TH curs_kernel 3X ""
 .na
 \fBint def_prog_mode(void);\fR
 .br
 \fBint def_shell_mode(void);\fR
 \fBint def_prog_mode(void);\fR
 .br
 \fBint def_shell_mode(void);\fR
-.br
+.sp
 \fBint reset_prog_mode(void);\fR
 .br
 \fBint reset_shell_mode(void);\fR
 \fBint reset_prog_mode(void);\fR
 .br
 \fBint reset_shell_mode(void);\fR
-.br
+.sp
 \fBint resetty(void);\fR
 .br
 \fBint savetty(void);\fR
 \fBint resetty(void);\fR
 .br
 \fBint savetty(void);\fR
-.br
+.sp
 \fBvoid getsyx(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR
 .br
 \fBvoid setsyx(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR
 \fBvoid getsyx(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR
 .br
 \fBvoid setsyx(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR
-.br
+.sp
 \fBint ripoffline(int \fP\fIline\fP\fB, int (*\fP\fIinit\fP\fB)(WINDOW *, int));\fR
 .br
 \fBint curs_set(int \fP\fIvisibility\fP\fB);\fR
 \fBint ripoffline(int \fP\fIline\fP\fB, int (*\fP\fIinit\fP\fB)(WINDOW *, int));\fR
 .br
 \fBint curs_set(int \fP\fIvisibility\fP\fB);\fR
 \fBint napms(int \fP\fIms\fP\fB);\fR
 .br
 .SH DESCRIPTION
 \fBint napms(int \fP\fIms\fP\fB);\fR
 .br
 .SH DESCRIPTION
-The following routines give low-level access to various \fBcurses\fR
-capabilities.  These routines typically are used inside library
-routines.
+The following routines give low-level access
+to various \fBcurses\fR capabilities.
+These routines typically are used inside library routines.
 .SS def_prog_mode, def_shell_mode
 .PP
 The \fBdef_prog_mode\fR and \fBdef_shell_mode\fR routines save the
 .SS def_prog_mode, def_shell_mode
 .PP
 The \fBdef_prog_mode\fR and \fBdef_shell_mode\fR routines save the
-current terminal modes as the "program" (in \fBcurses\fR) or "shell"
+current terminal modes as the \*(``program\*('' (in \fBcurses\fR) or \*(``shell\*(''
 (not in \fBcurses\fR) state for use by the \fBreset_prog_mode\fR and
 (not in \fBcurses\fR) state for use by the \fBreset_prog_mode\fR and
-\fBreset_shell_mode\fR routines.  This is done automatically by
-\fBinitscr\fR.  There is one such save area for each screen context
+\fBreset_shell_mode\fR routines.
+This is done automatically by \fBinitscr\fR.
+There is one such save area for each screen context
 allocated by \fBnewterm\fR.
 .SS reset_prog_mode, reset_shell_mode
 .PP
 The \fBreset_prog_mode\fR and \fBreset_shell_mode\fR routines restore
 allocated by \fBnewterm\fR.
 .SS reset_prog_mode, reset_shell_mode
 .PP
 The \fBreset_prog_mode\fR and \fBreset_shell_mode\fR routines restore
-the terminal to "program" (in \fBcurses\fR) or "shell" (out of
-\fBcurses\fR) state.  These are done automatically by \fBendwin\fR
-and, after an \fBendwin\fR, by \fBdoupdate\fR, so they normally are
-not called.
+the terminal to \*(``program\*('' (in \fBcurses\fR) or \*(``shell\*('' (out of
+\fBcurses\fR) state.
+These are done automatically by \fBendwin\fR(3X) and,
+after an \fBendwin\fR, by \fBdoupdate\fR,
+so they normally are not called.
 .SS resetty, savetty
 .PP
 The \fBresetty\fR and \fBsavetty\fR routines save and restore the
 .SS resetty, savetty
 .PP
 The \fBresetty\fR and \fBsavetty\fR routines save and restore the
-state of the terminal modes.  \fBsavetty\fR saves the current state in
+state of the terminal modes.
+\fBsavetty\fR saves the current state in
 a buffer and \fBresetty\fR restores the state to what it was at the
 last call to \fBsavetty\fR.
 .SS getsyx
 .PP
 a buffer and \fBresetty\fR restores the state to what it was at the
 last call to \fBsavetty\fR.
 .SS getsyx
 .PP
-The \fBgetsyx\fR routine returns the current coordinates of the virtual screen
-cursor in \fIy\fR and \fIx\fR.  If \fBleaveok\fR is currently \fBTRUE\fR, then
-\fB\-1\fR,\fB\-1\fR is returned.  If lines have been removed from the top of the
+The \fBgetsyx\fR routine returns the current coordinates
+of the \fIvirtual screen\fP cursor in \fIy\fR and \fIx\fR.
+If \fBleaveok\fR is currently \fBTRUE\fR, then
+\fB\-1\fR,\fB\-1\fR is returned.
+If lines have been removed from the top of the
 screen, using \fBripoffline\fR, \fIy\fR and \fIx\fR include these lines;
 therefore, \fIy\fR and \fIx\fR should be used only as arguments for
 \fBsetsyx\fR.
 screen, using \fBripoffline\fR, \fIy\fR and \fIx\fR include these lines;
 therefore, \fIy\fR and \fIx\fR should be used only as arguments for
 \fBsetsyx\fR.
+.PP
+Few applications will use this feature,
+most use \fBgetyx\fP instead.
 .SS setsyx
 .PP
 .SS setsyx
 .PP
-The \fBsetsyx\fR routine sets the virtual screen cursor to
-\fIy\fR, \fIx\fR.  If \fIy\fR and \fIx\fR are both \fB\-1\fR, then
-\fBleaveok\fR is set.  The two routines \fBgetsyx\fR and \fBsetsyx\fR
+The \fBsetsyx\fR routine sets
+the \fIvirtual screen\fP cursor to \fIy\fR, \fIx\fR.
+If \fIy\fR and \fIx\fR are both \fB\-1\fR, then
+\fBleaveok\fR is set.
+The two routines \fBgetsyx\fR and \fBsetsyx\fR
 are designed to be used by a library routine, which manipulates
 \fBcurses\fR windows but does not want to change the current position
 are designed to be used by a library routine, which manipulates
 \fBcurses\fR windows but does not want to change the current position
-of the program's cursor.  The library routine would call \fBgetsyx\fR
+of the program's cursor.
+The library routine would call \fBgetsyx\fR
 at the beginning, do its manipulation of its own windows, do a
 \fBwnoutrefresh\fR on its windows, call \fBsetsyx\fR, and then call
 \fBdoupdate\fR.
 at the beginning, do its manipulation of its own windows, do a
 \fBwnoutrefresh\fR on its windows, call \fBsetsyx\fR, and then call
 \fBdoupdate\fR.
+.PP
+Few applications will use this feature,
+most use \fBwmove\fP instead.
 .SS ripoffline
 .PP
 The \fBripoffline\fR routine provides access to the same facility that
 \fBslk_init\fR [see \fBcurs_slk\fR(3X)] uses to reduce the size of the
 .SS ripoffline
 .PP
 The \fBripoffline\fR routine provides access to the same facility that
 \fBslk_init\fR [see \fBcurs_slk\fR(3X)] uses to reduce the size of the
-screen.  \fBripoffline\fR must be called before \fBinitscr\fR or
+screen.
+\fBripoffline\fR must be called before \fBinitscr\fR or
 \fBnewterm\fR is called, to prepare these initial actions:
 .bP
 If \fIline\fR is positive, a line is removed from the top of \fBstdscr\fR.
 \fBnewterm\fR is called, to prepare these initial actions:
 .bP
 If \fIline\fR is positive, a line is removed from the top of \fBstdscr\fR.
@@ -138,9 +159,8 @@ an integer with the number of columns in the window.
 .PP
 Inside this initialization routine, the integer variables \fBLINES\fR
 and \fBCOLS\fR (defined in \fB<curses.h>\fR) are not guaranteed to be
 .PP
 Inside this initialization routine, the integer variables \fBLINES\fR
 and \fBCOLS\fR (defined in \fB<curses.h>\fR) are not guaranteed to be
-accurate and \fBwrefresh\fR or \fBdoupdate\fR must not be called.  It
-is allowable to call \fBwnoutrefresh\fR during the initialization
-routine.
+accurate and \fBwrefresh\fR or \fBdoupdate\fR must not be called.
+It is allowable to call \fBwnoutrefresh\fR during the initialization routine.
 .PP
 \fBripoffline\fR can be called up to five times before calling \fBinitscr\fR or
 \fBnewterm\fR.
 .PP
 \fBripoffline\fR can be called up to five times before calling \fBinitscr\fR or
 \fBnewterm\fR.
@@ -148,9 +168,10 @@ routine.
 .PP
 The \fBcurs_set\fR routine sets the cursor state to invisible,
 normal, or very visible for \fBvisibility\fR equal to \fB0\fR,
 .PP
 The \fBcurs_set\fR routine sets the cursor state to invisible,
 normal, or very visible for \fBvisibility\fR equal to \fB0\fR,
-\fB1\fR, or \fB2\fR respectively.  If the terminal supports the
-\fIvisibility\fR requested, the previous \fIcursor\fR state is
-returned; otherwise, \fBERR\fR is returned.
+\fB1\fR, or \fB2\fR respectively.
+If the terminal supports the \fIvisibility\fR requested,
+the previous \fIcursor\fR state is returned;
+otherwise, \fBERR\fR is returned.
 .SS napms
 .PP
 The \fBnapms\fR routine is used to sleep for \fIms\fR milliseconds.
 .SS napms
 .PP
 The \fBnapms\fR routine is used to sleep for \fIms\fR milliseconds.
@@ -180,8 +201,9 @@ exceeds the maximum (NRIPS = 5).
 Note that \fBgetsyx\fR is a macro, so \fB&\fR is not necessary before
 the variables \fIy\fR and \fIx\fR.
 .PP
 Note that \fBgetsyx\fR is a macro, so \fB&\fR is not necessary before
 the variables \fIy\fR and \fIx\fR.
 .PP
-Older SVr4 man pages warn that the return value of \fBcurs_set\fR "is currently
-incorrect".  This implementation gets it right, but it may be unwise to count
+Older SVr4 man pages warn that the return value
+of \fBcurs_set\fR \*(``is currently incorrect\*(''.
+This implementation gets it right, but it may be unwise to count
 on the correctness of the return value anywhere else.
 .PP
 Both ncurses and SVr4 will call \fBcurs_set\fR in \fBendwin\fR
 on the correctness of the return value anywhere else.
 .PP
 Both ncurses and SVr4 will call \fBcurs_set\fR in \fBendwin\fR
@@ -191,11 +213,13 @@ invisible or very visible.
 There is no way for ncurses to determine the initial cursor state to
 restore that.
 .SH PORTABILITY
 There is no way for ncurses to determine the initial cursor state to
 restore that.
 .SH PORTABILITY
-The functions \fBsetsyx\fR and \fBgetsyx\fR are not described in the XSI
-Curses standard, Issue 4.  All other functions are as described in XSI Curses.
+The \fIvirtual screen\fP functions \fBsetsyx\fR and \fBgetsyx\fR
+are not described in the XSI Curses standard, Issue 4.
+All other functions are as described in XSI Curses.
 .PP
 .PP
-The SVr4 documentation describes \fBsetsyx\fR and \fBgetsyx\fR as having return
-type int. This is misleading, as they are macros with no documented semantics
+The SVr4 documentation describes \fBsetsyx\fR and \fBgetsyx\fR
+as having return type int.
+This is misleading, as they are macros with no documented semantics
 for the return value.
 .SH SEE ALSO
 \fBcurses\fR(3X),
 for the return value.
 .SH SEE ALSO
 \fBcurses\fR(3X),