Manual Pages for UNIX Darwin command on man mvwget_wch
MyWebUniversity

Manual Pages for UNIX Darwin command on man mvwget_wch

cursgetwch(3X) cursgetwch(3X)

NAME

ggeettwwcchh, wwggeettwwcchh, mmvvggeettwwcchh, mmvvwwggeettwwcchh, uunnggeettwwcchh - get (or push

back) a wide character from curses terminal keyboard

SYNOPSIS

##iinncclluuddee <>

iinntt ggeettwwcchh((wwiinntttt **wch));; iinntt wwggeettwwcchh((WWIINNDDOOWW **win,, wwiinntttt **wch));; iinntt mmvvggeettwwcchh((iinntt y,, iinntt x,, wwiinntttt **wch));; iinntt mmvvwwggeettwwcchh((WWIINNDDOOWW **win,, iinntt y,, iinntt x,, wwiinntttt **wch));; iinntt uunnggeettwwcchh((ccoonnsstt wwcchhaarrtt wch));;

DESCRIPTION

The ggeettwwcchh, wwggeettwwcchh, mmvvggeettwwcchh, and mmvvwwggeettwwcchh functions read a char-

acter from the terminal associated with the current or specified win-

dow. In no-delay mode, if no input is waiting, the value EERRRR is

returned. In delay mode, the program waits until the system passes text through to the program. Depending on the setting of ccbbrreeaakk, this is after one character (cbreak mode), or after the first newline

(nocbreak mode). In half-delay mode, the program waits until the user

types a character or the specified timeout interval has elapsed. Unless nnooeecchhoo has been set, these routines echo the character into the designated window. If the window is not a pad and has been moved or modified since the last call to wwrreeffrreesshh, wwrreeffrreesshh will be called before another character is read. If kkeeyyppaadd is enabled, these functions respond to the pressing of a

function key by setting the object pointed to by wch to the correspond-

ing KKEEYY value defined in <> and returning KKEEYYCCOODDEEYYEESS. If a character (such as escape) that could be the beginning of a function key is received, curses sets a timer. If the remainder of the sequence

does arrive within the designated time, curses passes through the char-

acter; otherwise, curses returns the function key value. For this rea-

son, many terminals experience a delay between the time a user presses the escape key and the time the escape is returned to the program. The uunnggeettwwcchh function pushes the wide character wch back onto the head of the input queue, so the wide character is returned by the next call

to ggeettwwcchh. The pushback of one character is guaranteed. If the pro-

gram calls uunnggeettwwcchh too many times without an intervening call to ggeettwwcchh, the operation may fail. NNOOTTEESS The header file <> automatically includes the header file <>.

Applications should not define the escape key by itself as a single-

character function. When using ggeettwwcchh, wwggeettwwcchh, mmvvggeettwwcchh, or mmvvwwggeettwwcchh, applications should not use nnooccbbrreeaakk mode and eecchhoo mode at the same time. Depending

on the state of the tty driver when each character is typed, the pro-

gram may produce undesirable results. All functions except wwggeettwwcchh and uunnggeettwwcchh may be macros.

RETURN VALUES

When ggeettwwcchh, wwggeettwwcchh, mmvvggeettwwcchh, and mmvvwwggeettwwcchh functions success-

fully report the pressing of a function key, they return KKEEYYCCOODDEEYYEESS.

When they successfully report a wide character, they return OOKK. Other-

wise, they return EERRRR.

Upon successful completion, uunnggeettwwcchh returns OOKK. Otherwise, the func-

tion returns EERRRR.

SEE ALSO

ccuurrsseess(3X), ccuurrssggeettcchh(3X), ccuurrssiinnsswwcchh(3X), ccuurrssiinnooppttss(3X), ccuurrssmmoovvee(3X), ccuurrssrreeffrreesshh(3X) cursgetwch(3X)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™