]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/curs_kernel.3x
ncurses 6.0 - patch 20170826
[ncurses.git] / man / curs_kernel.3x
index 712bc20fd9ee57ea8ad1ca23f4d711ce4467d82d..505ea1eee8e7336cdc8112430f3e23fff6448b99 100644 (file)
@@ -1,5 +1,5 @@
 .\"***************************************************************************
-.\" Copyright (c) 1998-2005,2010 Free Software Foundation, Inc.                        *
+.\" Copyright (c) 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            *
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_kernel.3x,v 1.18 2010/10/02 23:20:13 tom Exp $
+.\" $Id: curs_kernel.3x,v 1.22 2017/01/07 19:25:15 tom Exp $
+.de bP
+.IP \(bu 4
+..
 .TH curs_kernel 3X ""
 .na
 .hy 0
 .br
 \fBint savetty(void);\fR
 .br
-\fBvoid getsyx(int y, int x);\fR
+\fBvoid getsyx(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR
 .br
-\fBvoid setsyx(int y, int x);\fR
+\fBvoid setsyx(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR
 .br
-\fBint ripoffline(int line, int (*init)(WINDOW *, int));\fR
+\fBint ripoffline(int \fP\fIline\fP\fB, int (*\fP\fIinit\fP\fB)(WINDOW *, int));\fR
 .br
-\fBint curs_set(int visibility);\fR
+\fBint curs_set(int \fP\fIvisibility\fP\fB);\fR
 .br
-\fBint napms(int ms);\fR
+\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.
+.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"
 (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
-allocated by \fBnewterm()\fR.
+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
+\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
 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
 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
@@ -98,6 +105,7 @@ cursor in \fIy\fR and \fIx\fR.  If \fBleaveok\fR is currently \fBTRUE\fR, then
 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.
+.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
@@ -108,16 +116,26 @@ 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.
+.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
-\fBnewterm\fR is called.  If \fIline\fR is positive, a line is removed
-from the top of \fBstdscr\fR; if \fIline\fR is negative, a line is
-removed from the bottom.  When this is done inside \fBinitscr\fR, the
+\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.
+.bP
+if \fIline\fR is negative, a line is removed from the bottom.
+.PP
+When the resulting initialization is done inside \fBinitscr\fR, the
 routine \fBinit\fR (supplied by the user) is called with two
-arguments: a window pointer to the one-line window that has been
-allocated and an integer with the number of columns in the window.
+arguments:
+.bP
+a window pointer to the one-line window that has been
+allocated and
+.bP
+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
 accurate and \fBwrefresh\fR or \fBdoupdate\fR must not be called.  It
@@ -126,12 +144,14 @@ routine.
 .PP
 \fBripoffline\fR can be called up to five times before calling \fBinitscr\fR or
 \fBnewterm\fR.
+.SS curs_set
 .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.
+.SS napms
 .PP
 The \fBnapms\fR routine is used to sleep for \fIms\fR milliseconds.
 .SH RETURN VALUE
@@ -143,9 +163,12 @@ requested \fIvisibility\fR is not supported.
 .PP
 X/Open defines no error conditions.
 In this implementation
-.RS
 .TP 5
+.na
+.hy 0
 \fBdef_prog_mode\fR, \fBdef_shell_mode\fR, \fBreset_prog_mode\fR, \fBreset_shell_mode\fR
+.hy
+.ad
 return an error
 if the terminal was not initialized, or
 if the I/O call to obtain the terminal settings fails.
@@ -153,7 +176,6 @@ if the I/O call to obtain the terminal settings fails.
 \fBripoffline\fP
 returns an error if the maximum number of ripped-off lines
 exceeds the maximum (NRIPS = 5).
-.RE
 .SH NOTES
 Note that \fBgetsyx\fR is a macro, so \fB&\fR is not necessary before
 the variables \fIy\fR and \fIx\fR.
@@ -183,9 +205,3 @@ for the return value.
 \fBcurs_scr_dump\fR(3X),
 \fBcurs_slk\fR(3X),
 \fBcurs_variables\fR(3X).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End: