1*51ffecc1SBen Gras.\" $NetBSD: curses_pad.3,v 1.4 2008/04/30 13:10:51 martin Exp $ 2*51ffecc1SBen Gras.\" Copyright (c) 2002 The NetBSD Foundation, Inc. 3*51ffecc1SBen Gras.\" All rights reserved. 4*51ffecc1SBen Gras.\" 5*51ffecc1SBen Gras.\" This code is derived from software contributed to The NetBSD Foundation 6*51ffecc1SBen Gras.\" by Julian Coleman. 7*51ffecc1SBen Gras.\" 8*51ffecc1SBen Gras.\" Redistribution and use in source and binary forms, with or without 9*51ffecc1SBen Gras.\" modification, are permitted provided that the following conditions 10*51ffecc1SBen Gras.\" are met: 11*51ffecc1SBen Gras.\" 1. Redistributions of source code must retain the above copyright 12*51ffecc1SBen Gras.\" notice, this list of conditions and the following disclaimer. 13*51ffecc1SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright 14*51ffecc1SBen Gras.\" notice, this list of conditions and the following disclaimer in the 15*51ffecc1SBen Gras.\" documentation and/or other materials provided with the distribution. 16*51ffecc1SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 17*51ffecc1SBen Gras.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 18*51ffecc1SBen Gras.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19*51ffecc1SBen Gras.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 20*51ffecc1SBen Gras.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21*51ffecc1SBen Gras.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22*51ffecc1SBen Gras.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23*51ffecc1SBen Gras.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24*51ffecc1SBen Gras.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25*51ffecc1SBen Gras.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26*51ffecc1SBen Gras.\" POSSIBILITY OF SUCH DAMAGE. 27*51ffecc1SBen Gras.\" 28*51ffecc1SBen Gras.Dd December 4, 2002 29*51ffecc1SBen Gras.Dt CURSES_PAD 3 30*51ffecc1SBen Gras.Os 31*51ffecc1SBen Gras.Sh NAME 32*51ffecc1SBen Gras.Nm curses_pad , 33*51ffecc1SBen Gras.Nm newpad , 34*51ffecc1SBen Gras.Nm subpad , 35*51ffecc1SBen Gras.Nm prefresh , 36*51ffecc1SBen Gras.Nm pnoutrefresh 37*51ffecc1SBen Gras.Nd curses pad routines 38*51ffecc1SBen Gras.Sh LIBRARY 39*51ffecc1SBen Gras.Lb libcurses 40*51ffecc1SBen Gras.Sh SYNOPSIS 41*51ffecc1SBen Gras.In curses.h 42*51ffecc1SBen Gras.Ft WINDOW * 43*51ffecc1SBen Gras.Fn newpad "int lines" "int cols" 44*51ffecc1SBen Gras.Ft WINDOW * 45*51ffecc1SBen Gras.Fn subpad "WINDOW *pad" "int lines" "int cols" "int begin_y" "int begin_x" 46*51ffecc1SBen Gras.Ft int 47*51ffecc1SBen Gras.Fn prefresh "WINDOW *pad" "int pbeg_y" "int pbeg_x" "int sbeg_y" "int sbeg_x" "int smax_y" "int smax_x" 48*51ffecc1SBen Gras.Ft int 49*51ffecc1SBen Gras.Fn pnoutrefresh "WINDOW *pad" "int pbeg_y" "int pbeg_x" "int sbeg_y" "int sbeg_x" "int smax_y" "int smax_x" 50*51ffecc1SBen Gras.Sh DESCRIPTION 51*51ffecc1SBen GrasThese functions create and display pads on the current screen. 52*51ffecc1SBen Gras.Pp 53*51ffecc1SBen GrasThe 54*51ffecc1SBen Gras.Fn newpad 55*51ffecc1SBen Grasfunction creates a new pad of size 56*51ffecc1SBen Gras.Fa lines , 57*51ffecc1SBen Gras.Fa cols . 58*51ffecc1SBen Gras.Pp 59*51ffecc1SBen Gras.Fn subpad 60*51ffecc1SBen Grasis similar to 61*51ffecc1SBen Gras.Fn newpad 62*51ffecc1SBen Grasexcepting that the size of the subpad is bounded by the parent 63*51ffecc1SBen Graspad 64*51ffecc1SBen Gras.Fa pad . 65*51ffecc1SBen GrasThe subpad shares internal data structures with the parent pad 66*51ffecc1SBen Grasand will be refreshed when the parent pad is refreshed. 67*51ffecc1SBen GrasThe starting column and row 68*51ffecc1SBen Gras.Fa begin_y , 69*51ffecc1SBen Gras.Fa begin_x 70*51ffecc1SBen Grasare relative to the parent pad origin. 71*51ffecc1SBen Gras.Pp 72*51ffecc1SBen GrasThe 73*51ffecc1SBen Gras.Fn pnoutrefresh 74*51ffecc1SBen Grasfunction performs the internal processing required by curses to determine 75*51ffecc1SBen Graswhat changes need to be made to synchronise the internal screen buffer 76*51ffecc1SBen Grasand the terminal but does not modify the terminal display. 77*51ffecc1SBen GrasA rectangular area of the pad starting at column and row 78*51ffecc1SBen Gras.Fa pbeg_y , 79*51ffecc1SBen Gras.Fa pbeg_x 80*51ffecc1SBen Grasis copied to the corresponding rectangular area of the screen buffer starting 81*51ffecc1SBen Grasat column and row 82*51ffecc1SBen Gras.Fa sbeg_y , 83*51ffecc1SBen Gras.Fa sbeg_x 84*51ffecc1SBen Grasand extending to 85*51ffecc1SBen Gras.Fa smax_y , 86*51ffecc1SBen Gras.Fa smax_x . 87*51ffecc1SBen Gras.Pp 88*51ffecc1SBen GrasThe 89*51ffecc1SBen Gras.Fn prefresh 90*51ffecc1SBen Grasfunction causes curses to propagate changes made to the pad specified by 91*51ffecc1SBen Gras.Fa pad 92*51ffecc1SBen Grasto the terminal display. 93*51ffecc1SBen GrasA rectangular area of the pad starting at column and row 94*51ffecc1SBen Gras.Fa pbeg_y , 95*51ffecc1SBen Gras.Fa pbeg_x 96*51ffecc1SBen Grasis copied to the corresponding rectangular area of the terminal starting 97*51ffecc1SBen Grasat column and row 98*51ffecc1SBen Gras.Fa sbeg_y , 99*51ffecc1SBen Gras.Fa sbeg_x 100*51ffecc1SBen Grasand extending to 101*51ffecc1SBen Gras.Fa smax_y , 102*51ffecc1SBen Gras.Fa smax_x . 103*51ffecc1SBen Gras.Pp 104*51ffecc1SBen GrasThe 105*51ffecc1SBen Gras.Fn pnoutrefresh 106*51ffecc1SBen Grasand 107*51ffecc1SBen Gras.Fn doupdate 108*51ffecc1SBen Grasfunctions can be used together to speed up terminal redraws by 109*51ffecc1SBen Grasdeferring the actual terminal updates until after a batch of updates 110*51ffecc1SBen Grasto multiple pads has been done. 111*51ffecc1SBen Gras.Sh RETURN VALUES 112*51ffecc1SBen GrasFunctions returning pointers will return 113*51ffecc1SBen Gras.Dv NULL 114*51ffecc1SBen Grasif an error is detected. 115*51ffecc1SBen GrasThe functions that return an int will return one of the following 116*51ffecc1SBen Grasvalues: 117*51ffecc1SBen Gras.Pp 118*51ffecc1SBen Gras.Bl -tag -width ERR -compact 119*51ffecc1SBen Gras.It Er OK 120*51ffecc1SBen GrasThe function completed successfully. 121*51ffecc1SBen Gras.It Er ERR 122*51ffecc1SBen GrasAn error occurred in the function. 123*51ffecc1SBen Gras.El 124*51ffecc1SBen Gras.Sh SEE ALSO 125*51ffecc1SBen Gras.Xr curses_refresh 3 , 126*51ffecc1SBen Gras.Xr curses_window 3 127*51ffecc1SBen Gras.Sh NOTES 128*51ffecc1SBen GrasThe 129*51ffecc1SBen Gras.Fn subpad 130*51ffecc1SBen Grasfunction is similar to the 131*51ffecc1SBen Gras.Xr derwin 3 132*51ffecc1SBen Grasfunction, and not the 133*51ffecc1SBen Gras.Xr subwin 3 134*51ffecc1SBen Grasfunction. 135*51ffecc1SBen Gras.Sh STANDARDS 136*51ffecc1SBen GrasThe 137*51ffecc1SBen Gras.Nx 138*51ffecc1SBen GrasCurses library complies with the X/Open Curses specification, part of the 139*51ffecc1SBen GrasSingle Unix Specification. 140*51ffecc1SBen Gras.Sh HISTORY 141*51ffecc1SBen GrasThe Curses package appeared in 142*51ffecc1SBen Gras.Bx 4.0 . 143