Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | .\"*************************************************************************** |
| 2 | .\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * |
| 3 | .\" * |
| 4 | .\" Permission is hereby granted, free of charge, to any person obtaining a * |
| 5 | .\" copy of this software and associated documentation files (the * |
| 6 | .\" "Software"), to deal in the Software without restriction, including * |
| 7 | .\" without limitation the rights to use, copy, modify, merge, publish, * |
| 8 | .\" distribute, distribute with modifications, sublicense, and/or sell * |
| 9 | .\" copies of the Software, and to permit persons to whom the Software is * |
| 10 | .\" furnished to do so, subject to the following conditions: * |
| 11 | .\" * |
| 12 | .\" The above copyright notice and this permission notice shall be included * |
| 13 | .\" in all copies or substantial portions of the Software. * |
| 14 | .\" * |
| 15 | .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * |
| 16 | .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * |
| 17 | .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * |
| 18 | .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * |
| 19 | .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * |
| 20 | .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * |
| 21 | .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * |
| 22 | .\" * |
| 23 | .\" Except as contained in this notice, the name(s) of the above copyright * |
| 24 | .\" holders shall not be used in advertising or otherwise to promote the * |
| 25 | .\" sale, use or other dealings in this Software without prior written * |
| 26 | .\" authorization. * |
| 27 | .\"*************************************************************************** |
| 28 | .\" |
| 29 | .\" $Id: curs_scroll.3x,v 1.13 2006/02/25 21:49:19 tom Exp $ |
| 30 | .TH curs_scroll 3X "" |
| 31 | .na |
| 32 | .hy 0 |
| 33 | .SH NAME |
| 34 | \fBscroll\fR, |
| 35 | \fBscrl\fR, |
| 36 | \fBwscrl\fR - scroll a \fBcurses\fR window |
| 37 | .ad |
| 38 | .hy |
| 39 | .SH SYNOPSIS |
| 40 | \fB#include <curses.h>\fR |
| 41 | .sp |
| 42 | \fBint scroll(WINDOW *win);\fR |
| 43 | .br |
| 44 | \fBint scrl(int n);\fR |
| 45 | .br |
| 46 | \fBint wscrl(WINDOW *win, int n);\fR |
| 47 | .br |
| 48 | .SH DESCRIPTION |
| 49 | The \fBscroll\fR routine scrolls the window up one line. |
| 50 | This involves moving |
| 51 | the lines in the window data structure. |
| 52 | As an optimization, if the scrolling |
| 53 | region of the window is the entire screen, the physical screen may be scrolled |
| 54 | at the same time. |
| 55 | .PP |
| 56 | For positive \fIn\fR, the \fBscrl\fR and \fBwscrl\fR routines scroll the |
| 57 | window up \fIn\fR lines (line \fIi\fR+\fIn\fR becomes \fIi\fR); otherwise |
| 58 | scroll the window down \fIn\fR lines. |
| 59 | This involves moving the lines in the |
| 60 | window character image structure. |
| 61 | The current cursor position is not changed. |
| 62 | .PP |
| 63 | For these functions to work, scrolling must be enabled via \fBscrollok\fR. |
| 64 | .SH RETURN VALUE |
| 65 | These routines return \fBERR\fR upon failure, and \fBOK\fR (SVr4 only specifies |
| 66 | "an integer value other than \fBERR\fR") upon successful completion. |
| 67 | .PP |
| 68 | X/Open defines no error conditions. |
| 69 | .PP |
| 70 | This implementation returns an error |
| 71 | if the window pointer is null, or |
| 72 | if scrolling is not enabled in the window, e.g., with \fBscrollok\fP. |
| 73 | .SH NOTES |
| 74 | Note that \fBscrl\fR and \fBscroll\fR may be macros. |
| 75 | .PP |
| 76 | The SVr4 documentation says that the optimization of physically scrolling |
| 77 | immediately if the scroll region is the entire screen "is" performed, not |
| 78 | "may be" performed. |
| 79 | This implementation deliberately does not guarantee |
| 80 | that this will occur, to leave open the possibility of smarter |
| 81 | optimization of multiple scroll actions on the next update. |
| 82 | .PP |
| 83 | Neither the SVr4 nor the XSI documentation specify whether the current |
| 84 | attribute or |
| 85 | current color-pair of blanks generated by the scroll function is zeroed. |
| 86 | Under this implementation it is. |
| 87 | .SH PORTABILITY |
| 88 | The XSI Curses standard, Issue 4 describes these functions. |
| 89 | .SH SEE ALSO |
| 90 | \fBcurses\fR(3X), \fBcurs_outopts\fR(3X) |
| 91 | .\"# |
| 92 | .\"# The following sets edit modes for GNU EMACS |
| 93 | .\"# Local Variables: |
| 94 | .\"# mode:nroff |
| 95 | .\"# fill-column:79 |
| 96 | .\"# End: |