xref: /minix3/lib/libcurses/curses_addch.3 (revision 51ffecc181005cb45a40108612ee28d1daaeeb86)
1*51ffecc1SBen Gras.\"	$NetBSD: curses_addch.3,v 1.8 2007/07/15 21:37:55 wiz Exp $
2*51ffecc1SBen Gras.\"
3*51ffecc1SBen Gras.\" Copyright (c) 2002
4*51ffecc1SBen Gras.\"	Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au)
5*51ffecc1SBen Gras.\"
6*51ffecc1SBen Gras.\" This code is donated to the NetBSD Foundation by the Author.
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.\" 3. The name of the Author may not be used to endorse or promote
17*51ffecc1SBen Gras.\"    products derived from this software without specific prior written
18*51ffecc1SBen Gras.\"    permission.
19*51ffecc1SBen Gras.\"
20*51ffecc1SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
21*51ffecc1SBen Gras.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22*51ffecc1SBen Gras.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23*51ffecc1SBen Gras.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
24*51ffecc1SBen Gras.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25*51ffecc1SBen Gras.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26*51ffecc1SBen Gras.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27*51ffecc1SBen Gras.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28*51ffecc1SBen Gras.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29*51ffecc1SBen Gras.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30*51ffecc1SBen Gras.\" SUCH DAMAGE.
31*51ffecc1SBen Gras.\"
32*51ffecc1SBen Gras.\"
33*51ffecc1SBen Gras.Dd July 11, 2007
34*51ffecc1SBen Gras.Dt CURSES_ADDCH 3
35*51ffecc1SBen Gras.Os
36*51ffecc1SBen Gras.Sh NAME
37*51ffecc1SBen Gras.Nm curses_addch ,
38*51ffecc1SBen Gras.Nm addch ,
39*51ffecc1SBen Gras.Nm waddch ,
40*51ffecc1SBen Gras.Nm mvaddch ,
41*51ffecc1SBen Gras.Nm mvwaddch
42*51ffecc1SBen Gras.Nd curses add characters to windows routines
43*51ffecc1SBen Gras.Sh LIBRARY
44*51ffecc1SBen Gras.Lb libcurses
45*51ffecc1SBen Gras.Sh SYNOPSIS
46*51ffecc1SBen Gras.In curses.h
47*51ffecc1SBen Gras.Ft int
48*51ffecc1SBen Gras.Fn addch "chtype ch"
49*51ffecc1SBen Gras.Ft int
50*51ffecc1SBen Gras.Fn waddch "WINDOW *win" "chtype ch"
51*51ffecc1SBen Gras.Ft int
52*51ffecc1SBen Gras.Fn mvaddch "int y" "int x" "chtype ch"
53*51ffecc1SBen Gras.Ft int
54*51ffecc1SBen Gras.Fn mvwaddch "WINDOW *win" "int y" "int x" "chtype ch"
55*51ffecc1SBen Gras.Sh DESCRIPTION
56*51ffecc1SBen GrasThese functions add characters to
57*51ffecc1SBen Gras.Dv stdscr
58*51ffecc1SBen Grasor to the specified window.
59*51ffecc1SBen Gras.Pp
60*51ffecc1SBen GrasThe
61*51ffecc1SBen Gras.Fn addch
62*51ffecc1SBen Grasfunction adds the character given in
63*51ffecc1SBen Gras.Fa ch
64*51ffecc1SBen Grasto
65*51ffecc1SBen Gras.Dv stdscr
66*51ffecc1SBen Grasat the current cursor position and advances the current cursor position by one.
67*51ffecc1SBen GrasAny character attributes set in
68*51ffecc1SBen Gras.Fa ch
69*51ffecc1SBen Graswill be merged with the background attributes currently set on
70*51ffecc1SBen Gras.Dv stdscr .
71*51ffecc1SBen Gras.Pp
72*51ffecc1SBen GrasThe
73*51ffecc1SBen Gras.Fn waddch
74*51ffecc1SBen Grasfunction is the same as the
75*51ffecc1SBen Gras.Fn addch
76*51ffecc1SBen Grasfunction, excepting that the character is added to the window specified by
77*51ffecc1SBen Gras.Fa win .
78*51ffecc1SBen Gras.Pp
79*51ffecc1SBen GrasThe
80*51ffecc1SBen Gras.Fn mvaddch
81*51ffecc1SBen Grasand
82*51ffecc1SBen Gras.Fn mvwaddch
83*51ffecc1SBen Grasfunctions are the same as the
84*51ffecc1SBen Gras.Fn addch
85*51ffecc1SBen Grasand
86*51ffecc1SBen Gras.Fn waddch
87*51ffecc1SBen Grasfunctions, respectively, excepting that
88*51ffecc1SBen Gras.Fn wmove
89*51ffecc1SBen Grasis called to move the cursor to the position specified by
90*51ffecc1SBen Gras.Fa y ,
91*51ffecc1SBen Gras.Fa x
92*51ffecc1SBen Grasbefore the character is added to the window.
93*51ffecc1SBen Gras.Ss LINE DRAWING CHARACTERS
94*51ffecc1SBen GrasSome terminals support the display of line drawing and graphics characters.
95*51ffecc1SBen GrasThese characters can be added using their defined names, as shown in the
96*51ffecc1SBen Grastable below.
97*51ffecc1SBen GrasWhere the terminal does not support a specific character, the default
98*51ffecc1SBen Gras(non-graphics) character is displayed instead.
99*51ffecc1SBen Gras.Bl -column -offset indent ".Sy System V Name" ".Sy Default"
100*51ffecc1SBen Gras.It Sy "Name" Ta Sy "Default" Ta Sy "Description"
101*51ffecc1SBen Gras.It ACS_RARROW Ta \*[Gt] Ta "Arrow pointing right"
102*51ffecc1SBen Gras.It ACS_LARROW Ta \*[Lt] Ta "Arrow pointing left"
103*51ffecc1SBen Gras.It ACS_UARROW Ta ^ Ta "Arrow pointing up"
104*51ffecc1SBen Gras.It ACS_DARROW Ta v Ta "Arrow pointing down"
105*51ffecc1SBen Gras.It ACS_BLOCK Ta # Ta "Solid square block"
106*51ffecc1SBen Gras.It ACS_DIAMOND Ta + Ta "Diamond"
107*51ffecc1SBen Gras.It ACS_CKBOARD Ta : Ta "Checker board (stipple)"
108*51ffecc1SBen Gras.It ACS_DEGREE Ta ' Ta "Degree symbol"
109*51ffecc1SBen Gras.It ACS_PLMINUS Ta # Ta "Plus/minus"
110*51ffecc1SBen Gras.It ACS_BOARD Ta # Ta "Board of squares"
111*51ffecc1SBen Gras.It ACS_LANTERN Ta # Ta "Lantern symbol"
112*51ffecc1SBen Gras.It ACS_LRCORNER Ta + Ta "Lower right-hand corner"
113*51ffecc1SBen Gras.It ACS_URCORNER Ta + Ta "Upper right-hand corner"
114*51ffecc1SBen Gras.It ACS_ULCORNER Ta + Ta "Upper left-hand corner"
115*51ffecc1SBen Gras.It ACS_LLCORNER Ta + Ta "Lower left-hand corner"
116*51ffecc1SBen Gras.It ACS_PLUS Ta + Ta "Plus"
117*51ffecc1SBen Gras.It ACS_HLINE Ta - Ta "Horizontal line"
118*51ffecc1SBen Gras.It ACS_S1 Ta - Ta "Scan line 1"
119*51ffecc1SBen Gras.It ACS_S9 Ta - Ta "Scan line 9"
120*51ffecc1SBen Gras.It ACS_LTEE Ta + Ta "Left tee"
121*51ffecc1SBen Gras.It ACS_RTEE Ta + Ta "Right tee"
122*51ffecc1SBen Gras.It ACS_BTEE Ta + Ta "Bottom tee"
123*51ffecc1SBen Gras.It ACS_TTEE Ta + Ta "Top tee"
124*51ffecc1SBen Gras.It ACS_VLINE Ta | Ta "Vertical line"
125*51ffecc1SBen Gras.It ACS_BULLET Ta o Ta "Bullet"
126*51ffecc1SBen Gras.El
127*51ffecc1SBen Gras.Pp
128*51ffecc1SBen GrasThe following additional,
129*51ffecc1SBen Gras.Em ncurses
130*51ffecc1SBen Grascompatible, characters are also supported.
131*51ffecc1SBen Gras.Bl -column -offset indent ".Sy System V Name" ".Sy Default"
132*51ffecc1SBen Gras.It Sy "Name" Ta Sy "Default" Ta Sy "Description"
133*51ffecc1SBen Gras.It ACS_S3 Ta - Ta "Scan line 3"
134*51ffecc1SBen Gras.It ACS_S7 Ta - Ta "Scan line 7"
135*51ffecc1SBen Gras.It ACS_LEQUAL Ta \*[Lt] Ta "Less than or equal to"
136*51ffecc1SBen Gras.It ACS_GEQUAL Ta \*[Gt] Ta "Greater than or equal to"
137*51ffecc1SBen Gras.It ACS_PI Ta * Ta "Pi symbol"
138*51ffecc1SBen Gras.It ACS_NEQUAL Ta ! Ta "Not equal to"
139*51ffecc1SBen Gras.It ACS_STERLING Ta f Ta "Sterling symbol"
140*51ffecc1SBen Gras.El
141*51ffecc1SBen Gras.Pp
142*51ffecc1SBen GrasFor compatibility with some
143*51ffecc1SBen Gras.Em System V
144*51ffecc1SBen Grasimplementations, the following definitions are also supported.
145*51ffecc1SBen Gras.Bl -column -offset indent ".Sy System V Name" ".Sy Default"
146*51ffecc1SBen Gras.It Sy "System V Name" Ta Sy "NetBSD Curses Name"
147*51ffecc1SBen Gras.It ACS_SBBS Ta ACS_LRCORNER
148*51ffecc1SBen Gras.It ACS_BBSS Ta ACS_URCORNER
149*51ffecc1SBen Gras.It ACS_BSSB Ta ACS_ULCORNER
150*51ffecc1SBen Gras.It ACS_SSBB Ta ACS_LLCORNER
151*51ffecc1SBen Gras.It ACS_SSSS Ta ACS_PLUS
152*51ffecc1SBen Gras.It ACS_BSBS Ta ACS_HLINE
153*51ffecc1SBen Gras.It ACS_SSSB Ta ACS_LTEE
154*51ffecc1SBen Gras.It ACS_SBSS Ta ACS_RTEE
155*51ffecc1SBen Gras.It ACS_SSBS Ta ACS_BTEE
156*51ffecc1SBen Gras.It ACS_BSSS Ta ACS_TTEE
157*51ffecc1SBen Gras.It ACS_SBSB Ta ACS_VLINE
158*51ffecc1SBen Gras.El
159*51ffecc1SBen Gras.Sh RETURN VALUES
160*51ffecc1SBen GrasFunctions returning pointers will return
161*51ffecc1SBen Gras.Dv NULL
162*51ffecc1SBen Grasif an error is detected.
163*51ffecc1SBen GrasThe functions that return an int will return one of the following
164*51ffecc1SBen Grasvalues:
165*51ffecc1SBen Gras.Pp
166*51ffecc1SBen Gras.Bl -tag -width ERR -compact
167*51ffecc1SBen Gras.It Er OK
168*51ffecc1SBen GrasThe function completed successfully.
169*51ffecc1SBen Gras.It Er ERR
170*51ffecc1SBen GrasAn error occurred in the function.
171*51ffecc1SBen Gras.El
172*51ffecc1SBen Gras.Sh SEE ALSO
173*51ffecc1SBen Gras.Xr curses_addchstr 3 ,
174*51ffecc1SBen Gras.Xr curses_addstr 3 ,
175*51ffecc1SBen Gras.Xr curses_attributes 3 ,
176*51ffecc1SBen Gras.Xr curses_cursor 3 ,
177*51ffecc1SBen Gras.Xr curses_delch 3 ,
178*51ffecc1SBen Gras.Xr curses_inch 3 ,
179*51ffecc1SBen Gras.Xr curses_insertch 3
180*51ffecc1SBen Gras.Sh STANDARDS
181*51ffecc1SBen GrasThe
182*51ffecc1SBen Gras.Nx
183*51ffecc1SBen GrasCurses library complies with the X/Open Curses specification, part of the
184*51ffecc1SBen GrasSingle Unix Specification.
185*51ffecc1SBen Gras.Sh HISTORY
186*51ffecc1SBen GrasThe Curses package appeared in
187*51ffecc1SBen Gras.Bx 4.0 .
188