blob: 7e1e3b439177b5694afa9930506c02441138bcbc [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301'\" t
2.\"***************************************************************************
Steve Kondikae271bc2015-11-15 02:50:53 +01003.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05304.\" *
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.\"
Steve Kondikae271bc2015-11-15 02:50:53 +010030.\" $Id: curs_inch.3x,v 1.17 2010/12/04 18:36:44 tom Exp $
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031.TH curs_inch 3X ""
32.SH NAME
Steve Kondikae271bc2015-11-15 02:50:53 +010033\fBinch\fR,
34\fBwinch\fR,
35\fBmvinch\fR,
36\fBmvwinch\fR \- get a character and attributes from a \fBcurses\fR window
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053037.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
49These routines return the character, of type \fBchtype\fR, at the current
50position in the named window. If any attributes are set for that position,
51their 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
53extract the character or attributes alone.
54.
55.SS Attributes
56The following bit-masks may be AND-ed with characters returned by \fBwinch\fR.
57.
58.TS
59l 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
Steve Kondikae271bc2015-11-15 02:50:53 +010064.SH RETURN VALUE
65Functions with a "mv" prefix first perform a cursor movement using
66\fBwmove\fP, and return an error if the position is outside the window,
67or if the window pointer is null.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053068.SH NOTES
69Note that all of these routines may be macros.
70.SH PORTABILITY
71These functions are described in the XSI Curses standard, Issue 4.
72.SH SEE ALSO
73\fBcurses\fR(3X).
74.PP
75Comparable functions in the wide-character (ncursesw) library are
76described in
77\fBcurs_in_wch\fR(3X).