2 .\"***************************************************************************
3 .\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
5 .\" Permission is hereby granted, free of charge, to any person obtaining a *
6 .\" copy of this software and associated documentation files (the *
7 .\" "Software"), to deal in the Software without restriction, including *
8 .\" without limitation the rights to use, copy, modify, merge, publish, *
9 .\" distribute, distribute with modifications, sublicense, and/or sell *
10 .\" copies of the Software, and to permit persons to whom the Software is *
11 .\" furnished to do so, subject to the following conditions: *
13 .\" The above copyright notice and this permission notice shall be included *
14 .\" in all copies or substantial portions of the Software. *
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
20 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
22 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
24 .\" Except as contained in this notice, the name(s) of the above copyright *
25 .\" holders shall not be used in advertising or otherwise to promote the *
26 .\" sale, use or other dealings in this Software without prior written *
28 .\"***************************************************************************
30 .\" $Id: curs_inch.3x,v 1.17 2010/12/04 18:36:44 tom Exp $
36 \fBmvwinch\fR \- get a character and attributes from a \fBcurses\fR window
38 \fB#include <curses.h>\fR
40 \fBchtype inch(void);\fR
42 \fBchtype winch(WINDOW *win);\fR
44 \fBchtype mvinch(int y, int x);\fR
46 \fBchtype mvwinch(WINDOW *win, int y, int x);\fR
49 These routines return the character, of type \fBchtype\fR, at the current
50 position in the named window. If any attributes are set for that position,
51 their values are OR'ed into the value returned. Constants defined in
52 \fB<curses.h>\fR can be used with the \fB&\fR (logical AND) operator to
53 extract the character or attributes alone.
56 The following bit-masks may be AND-ed with characters returned by \fBwinch\fR.
60 \fBA_CHARTEXT\fR Bit-mask to extract character
61 \fBA_ATTRIBUTES\fR Bit-mask to extract attributes
62 \fBA_COLOR\fR Bit-mask to extract color-pair field information
65 Functions with a "mv" prefix first perform a cursor movement using
66 \fBwmove\fP, and return an error if the position is outside the window,
67 or if the window pointer is null.
69 Note that all of these routines may be macros.
71 These functions are described in the XSI Curses standard, Issue 4.
75 Comparable functions in the wide-character (ncursesw) library are
77 \fBcurs_in_wch\fR(3X).