xref: /minix3/lib/libcurses/curses_echochar.3 (revision 51ffecc181005cb45a40108612ee28d1daaeeb86)
1.\"	$NetBSD: curses_echochar.3,v 1.3 2008/04/30 13:10:51 martin Exp $
2.\" Copyright (c) 2004 The NetBSD Foundation, Inc.
3.\" All rights reserved.
4.\"
5.\" This code is derived from software contributed to The NetBSD Foundation
6.\" by Julian Coleman.
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\"    notice, this list of conditions and the following disclaimer in the
15.\"    documentation and/or other materials provided with the distribution.
16.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
17.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26.\" POSSIBILITY OF SUCH DAMAGE.
27.\"
28.Dd March 27, 2004
29.Dt CURSES_ECHOCHAR 3
30.Os
31.Sh NAME
32.Nm curses_echochar ,
33.Nm echochar ,
34.Nm wechochar ,
35.Nm pechochar
36.Nd curses add characters and then refresh routines
37.Sh LIBRARY
38.Lb libcurses
39.Sh SYNOPSIS
40.In curses.h
41.Ft int
42.Fn echochar "const chtype ch"
43.Ft int
44.Fn wechochar "WINDOW *win" "const chtype ch"
45.Ft int
46.Fn pechochar "WINDOW *pad" "const chtype ch"
47.Sh DESCRIPTION
48These functions add characters to
49.Dv stdscr
50or to the specified window or pad and then cause an immediate
51.Fn refresh
52of that window or pad.
53.Pp
54The
55.Fn echochar
56function adds the character given in
57.Fa ch
58to
59.Dv stdscr
60at the current cursor position and advances the current cursor position by one.
61Any character attributes set in
62.Fa ch
63will be merged with the background attributes currently set on
64.Dv stdscr .
65.Dv stdscr
66is then refreshed.
67Calling
68.Fn echochar
69is equivalent to calling
70.Fn addch
71followed by
72.Fn refresh .
73.Pp
74The
75.Fn wechochar
76function is the same as the
77.Fn echochar
78function, excepting that the character is added to the window specified by
79.Fa win
80and
81.Fa win
82is refreshed.
83.Pp
84The
85.Fn pechochar
86function is the similar to the
87.Fn echochar
88function, excepting that the character is added to the pad specified by
89.Fa pad
90and
91.Fa pad
92is refreshed at its previous location on the screen.
93Calling
94.Fn pechochar
95is equivalent to calling
96.Fn addch
97followed by
98.Fn prefresh .
99.Sh RETURN VALUES
100These functions will return one of the following values:
101.Pp
102.Bl -tag -width ERR -compact
103.It Er OK
104The function completed successfully.
105.It Er ERR
106An error occurred in the function.
107.El
108.Sh SEE ALSO
109.Xr curses_addch 3 ,
110.Xr curses_attributes 3 ,
111.Xr curses_pad 3 ,
112.Xr curses_refresh 3
113.Sh STANDARDS
114The
115.Fn echochar ,
116.Fn wechochar ,
117and
118.Fn pechochar
119functions comply with the X/Open Curses specification, part of the
120Single Unix Specification.
121.Sh HISTORY
122The Curses package appeared in
123.Bx 4.0 .
124