Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | .\"*************************************************************************** |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 2 | .\" Copyright 2018-2023,2024 Thomas E. Dickey * |
| 3 | .\" Copyright 2002-2010,2017 Free Software Foundation, Inc. * |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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 | .\" |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 30 | .\" $Id: curs_in_wch.3x,v 1.31 2024/04/20 21:20:07 tom Exp $ |
| 31 | .TH curs_in_wch 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" |
| 32 | .ie \n(.g \{\ |
| 33 | .ds `` \(lq |
| 34 | .ds '' \(rq |
| 35 | .\} |
| 36 | .el \{\ |
| 37 | .ie t .ds `` `` |
| 38 | .el .ds `` "" |
| 39 | .ie t .ds '' '' |
| 40 | .el .ds '' "" |
| 41 | .\} |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 42 | .SH NAME |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 43 | \fB\%in_wch\fP, |
| 44 | \fB\%mvin_wch\fP, |
| 45 | \fB\%mvwin_wch\fP, |
| 46 | \fB\%win_wch\fP \- |
| 47 | get a \fIcurses\fR complex character from a window |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 48 | .SH SYNOPSIS |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 49 | .nf |
| 50 | \fB#include <curses.h> |
| 51 | .PP |
| 52 | \fBint in_wch(cchar_t *\fIwch\fP); |
| 53 | \fBint win_wch(WINDOW *\fIwin\fP, cchar_t *\fIwch\fP); |
| 54 | .PP |
| 55 | \fBint mvin_wch(int \fIy\fP, int \fIx\fP, cchar_t *\fIwch\fP); |
| 56 | \fBint mvwin_wch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, cchar_t *\fIwch\fP); |
| 57 | .fi |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 58 | .SH DESCRIPTION |
| 59 | These functions extract the complex character and rendition from |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 60 | the current position in the named window into the \fBcchar_t\fP object |
| 61 | referenced by wch. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 62 | .SH RETURN VALUE |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 63 | No errors are defined in X/Open Curses. |
| 64 | This implementation checks for null pointers, returns \fBERR\fP in that case. |
| 65 | Also, the \fImv\fP routines check for error moving the cursor, |
| 66 | returning \fBERR\fP in that case. |
| 67 | Otherwise they return \fBOK\fP. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 68 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 69 | Functions prefixed with \*(``mv\*('' first perform cursor movement and |
| 70 | fail if the position |
| 71 | .RI ( y , |
| 72 | .IR x ) |
| 73 | is outside the window boundaries. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 74 | .SH NOTES |
| 75 | Note that all of these routines may be macros. |
| 76 | .SH PORTABILITY |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 77 | These functions are described in X/Open Curses, Issue 4. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 78 | .SH SEE ALSO |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 79 | \fB\%curs_inch\fP(3X) describes comparable functions of the |
| 80 | .I \%ncurses |
| 81 | library in its non-wide-character configuration. |
| 82 | .PP |
| 83 | \fB\%curses\fP(3X), |
| 84 | \fB\%curs_inwstr\fP(3X) |