2 .\" Copyright 1989 AT&T
3 .\" Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH CURS_PAD 3CURSES "Dec 31, 1996"
9 curs_pad, newpad, subpad, prefresh, pnoutrefresh, pechochar, pechowchar \-
10 create and display curses pads
14 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lcurses\fR [ \fIlibrary\fR .. ]
17 \fBWINDOW *\fR\fBnewpad\fR(\fBint\fR \fInlines\fR, \fBint\fR \fIncols\fR);
22 \fBWINDOW *\fR\fBsubpad\fR(\fBWINDOW *\fR\fIorig\fR, \fBint\fR \fInlines\fR, \fBint\fR \fIncols\fR, \fBint\fR \fIbegin_y\fR,
23 \fBint\fR \fIbegin_x\fR);
28 \fBint\fR \fBprefresh\fR(\fBWINDOW *\fR\fIpad\fR, \fBint\fR \fIpminrow\fR, \fBint\fR \fIpmincol\fR, \fBint\fR \fIsminrow\fR,
29 \fBint\fR \fIsmincol\fR, \fBint\fR \fIsmaxrow\fR, \fBint\fR \fIsmaxcol\fR);
34 \fBint\fR \fBpnoutrefresh\fR(\fBWINDOW *\fR\fIpad\fR, \fBint\fR \fIpminrow\fR, \fBint\fR \fIpmincol\fR, \fBint\fR \fIsminrow\fR,
35 \fBint\fR \fIsmincol\fR, \fBint\fR \fIsmaxrow\fR, \fBint\fR \fIsmaxcol\fR);
40 \fBint\fR \fBpechochar\fR(\fBWINDOW *\fR\fIpad\fR, \fBchtype\fR \fIch\fR);
45 \fBint\fR \fBpechowchar\fR(\fBWINDOW *\fR\fIpad\fR, \fBchtype\fR \fIwch\fR);
51 The \fBnewpad()\fR routine creates and returns a pointer to a new pad data
52 structure with the given number of lines, \fInlines\fR, and columns,
53 \fIncols\fR. A pad is like a window, except that it is not restricted by the
54 screen size, and is not necessarily associated with a particular part of the
55 screen. Pads can be used when a large window is needed, and only a part of the
56 window will be on the screen at one time. Automatic refreshes of pads (for
57 example, from scrolling or echoing of input) do not occur. It is not legal to
58 call \fBwrefresh\fR(3CURSES) with a \fIpad\fR as an argument; the routines \fB
59 prefresh()\fR or \fBpnoutrefresh()\fR should be called instead. Note that these
60 routines require additional parameters to specify the part of the pad to be
61 displayed and the location on the screen to be used for the display.
64 The \fBsubpad()\fR routine creates and returns a pointer to a subwindow within
65 a pad with the given number of lines, \fInlines\fR, and columns, \fIncols\fR.
66 Unlike \fBsubwin\fR(3CURSES), which uses screen coordinates, the window is at
67 position (\fIbegin_x\fR\fB, \fR\fIbegin_y\fR) on the pad. The window is made in
68 the middle of the window \fIorig\fR, so that changes made to one window affect
69 both windows. During the use of this routine, it will often be necessary to
70 call \fBtouchwin\fR(3CURSES) or \fBtouchline\fR(3CURSES) on \fIorig\fR before
71 calling \fBprefresh()\fR.
74 The \fBprefresh()\fR and \fBpnoutrefresh()\fR routines are analogous to
75 \fBwrefresh\fR(3CURSES) and \fBwnoutrefresh\fR(3CURSES) except that they relate
76 to pads instead of windows. The additional parameters are needed to indicate
77 what part of the pad and screen are involved. \fIpminrow\fR and \fIpmincol\fR
78 specify the upper left-hand corner of the rectangle to be displayed in the pad.
79 \fIsminrow\fR, \fIsmincol\fR, \fIsmaxrow\fR, and \fIsmaxcol \fR specify the
80 edges of the rectangle to be displayed on the screen. The lower right-hand
81 corner of the rectangle to be displayed in the pad is calculated from the
82 screen coordinates, since the rectangles must be the same size. Both rectangles
83 must be entirely contained within their respective structures. Negative values
84 of \fIpminrow\fR, \fIpmincol\fR, \fIsminrow\fR, or \fIsmincol\fR are treated as
88 The \fBpechochar()\fR routine is functionally equivalent to a call to
89 \fBaddch\fR(3CURSES) followed by a call to \fBrefresh\fR(3CURSES), a call to
90 \fBwaddch\fR(3CURSES) followed by a call to \fBwrefresh\fR(3CURSES), or a call
91 to \fBwaddch\fR(3CURSES) followed by a call to \fBprefresh()\fR. The knowledge
92 that only a single character is being output is taken into consideration and,
93 for non-control characters, a considerable performance gain might be seen by
94 using these routines instead of their equivalents. In the case of
95 \fBpechochar()\fR, the last location of the pad on the screen is reused for the
96 arguments to \fBprefresh()\fR.
100 Routines that return an integer return \fBERR\fR upon failure and an integer
101 value other than \fBERR\fR upon successful completion.
104 Routines that return pointers return \fINULL\fR on error.
108 See \fBattributes\fR(5) for descriptions of the following attributes:
116 ATTRIBUTE TYPE ATTRIBUTE VALUE
124 \fBaddch\fR(3CURSES), \fBcurses\fR(3CURSES), \fBrefresh\fR(3CURSES),
125 \fBsubwin\fR(3CURSES), \fBtouchline\fR(3CURSES), \fBtouchwin\fR(3CURSES),
126 \fBwaddch\fR(3CURSES), \fBwnoutrefresh\fR(3CURSES), \fBwrefresh\fR(3CURSES),
131 The header file <\fBcurses.h\fR> automatically includes the header files
132 <\fBstdio.h\fR>, <\fBunctrl.h\fR> and <\fBwidec.h\fR>.
135 Note that \fBpechochar()\fR may be a macro.