X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=man%2Fcurs_get_wch.3x;h=115f068d9b3339f963ad0d1c9abb06bc024f6653;hb=9b51794524995304d8788e42aacb36feede9364f;hp=dd2b4c32e82c5fa19b1a3d52be97ac6fb2a9fcf4;hpb=17c5992a16be94247b83f2bbb9accdd9b7e7bb72;p=ncurses.git diff --git a/man/curs_get_wch.3x b/man/curs_get_wch.3x index dd2b4c32..115f068d 100644 --- a/man/curs_get_wch.3x +++ b/man/curs_get_wch.3x @@ -1,5 +1,6 @@ .\"*************************************************************************** -.\" Copyright (c) 2002-2017,2018 Free Software Foundation, Inc. * +.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2002-2016,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,10 +27,14 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_get_wch.3x,v 1.11 2018/07/28 22:20:54 tom Exp $ +.\" $Id: curs_get_wch.3x,v 1.15 2021/05/22 22:33:19 tom Exp $ .TH curs_get_wch 3X "" .na .hy 0 +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 @@ -52,9 +57,10 @@ \fBint mvget_wch(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwch\fR\fB);\fR .br \fBint mvwget_wch(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwch\fR\fB);\fR -.br +.sp \fBint unget_wch(const wchar_t \fR\fIwch\fR\fB);\fR .SH DESCRIPTION +.SS wget_wch The \fBget_wch\fR, \fBwget_wch\fR, @@ -106,7 +112,7 @@ Their names begin with \fBKEY_\fR. Other (user-defined) function keys which may be defined using \fBdefine_key\fP(3X) have no names, but also are expected to have values outside the range of 8-bit characters. -.PP +.SS unget_wch The \fBunget_wch\fR function pushes the wide character @@ -121,6 +127,14 @@ If the program calls too many times without an intervening call to \fBget_wch\fR, the operation may fail. +.PP +Unlike \fBungetch\fP and \fBwgetch\fP, +\fBunget_wch\fP cannot distinguish special characters +returned by \fBwget_wch\fP from ordinary characters. +An application can push special keys +which it may read via \fBwget_wch\fP +by checking for the \fBKEY_CODE_YES\fR result, +and using \fBungetch\fP for those special keys. .SH NOTES The header file \fB\fR @@ -168,7 +182,7 @@ returns Otherwise, the function returns \fBERR\fR. .PP -Functions with a "mv" prefix first perform a cursor movement using +Functions with a \*(``mv\*('' prefix first perform a cursor movement using \fBwmove\fP, and return an error if the position is outside the window, or if the window pointer is null. .SH SEE ALSO