]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_inch.3x
ncurses 5.9 - patch 20150516
[ncurses.git] / man / curs_inch.3x
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc.              *
4 .\"                                                                          *
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:                 *
12 .\"                                                                          *
13 .\" The above copyright notice and this permission notice shall be included  *
14 .\" in all copies or substantial portions of the Software.                   *
15 .\"                                                                          *
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.                               *
23 .\"                                                                          *
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       *
27 .\" authorization.                                                           *
28 .\"***************************************************************************
29 .\"
30 .\" $Id: curs_inch.3x,v 1.17 2010/12/04 18:36:44 tom Exp $
31 .TH curs_inch 3X ""
32 .SH NAME
33 \fBinch\fR,
34 \fBwinch\fR,
35 \fBmvinch\fR,
36 \fBmvwinch\fR \- get a character and attributes from a \fBcurses\fR window
37 .SH SYNOPSIS
38 \fB#include <curses.h>\fR
39 .sp
40 \fBchtype inch(void);\fR
41 .br
42 \fBchtype winch(WINDOW *win);\fR
43 .br
44 \fBchtype mvinch(int y, int x);\fR
45 .br
46 \fBchtype mvwinch(WINDOW *win, int y, int x);\fR
47 .br
48 .SH DESCRIPTION
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.
54 .
55 .SS Attributes
56 The following bit-masks may be AND-ed with characters returned by \fBwinch\fR.
57 .
58 .TS
59 l l .
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
63 .TE
64 .SH RETURN VALUE
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.
68 .SH NOTES
69 Note that all of these routines may be macros.
70 .SH PORTABILITY
71 These functions are described in the XSI Curses standard, Issue 4.
72 .SH SEE ALSO
73 \fBcurses\fR(3X).
74 .PP
75 Comparable functions in the wide-character (ncursesw) library are
76 described in
77 \fBcurs_in_wch\fR(3X).