2.3 Input/Output Functions
============================
2.3.1 character, string output
----------------------
/** @ Brief outputs the characters at the cursor position, but does not automatically refresh the characters to be output by @ param ch @ return OK @ return ERR failed @ note chtype is a signed long integer, its low position can contain the character information, which is similar to the char type. @ note curses defines some constants and queues. These constants start with ACS _: ACS_ULCORNER, ACS_LLCORNER, metrics, metrics, ACS_HLINE, ACS_VLINE, ACS_PLUS, ACS_S1, metrics, ACS_DIAMOND, ACS_CKBOARD, metrics, metrics, ACS_BULLET, ACS_LARROW, metrics, metrics, ACS_DAROW, ACS_BOARD, ACS_LANTERN, ACS_BLOCK @ see waddch (), mvaddch (), mvwaddch () */int addch (chtype ch);/** @ brief output characters, and automatically refresh the @ note and addch types, however, the window is automatically refreshed */int echochar (chtype ch);/** @ brief output string str @ note if the string length exceeds the screen size, the string will be truncated @ see waddstr (), mvwaddstr (), mvaddstr () */int addstr (char * str ); /** @ brief format and output one or more values on the screen */int printw (char * fmt, arg1, arg2 ...); /** @ brief insert a character at the current position @ note after the character is inserted, the cursor will automatically move to the right I a position, if the rightmost character exceeds the terminal screen range, it will be truncated @ see mvprintw (), mvwprintw (), wprintw () */int insch (chtype ch ); /** @ brief Delete the function */int delch () at the current cursor;/** @ brief insert a blank line on the screen */int insertln (); /** @ brief: Delete the current row, move all rows under the current row up a row, and use spaces in the last row instead of */int deleteln ();
2.3.2 character, string Input
----------------------
/** @ Brief reads a character from the terminal keyboard and returns the integer @ return of the character. If return succeeds, return the integer @ return. If return fails, returns ERR */int getch ();/** @ brief receives strings from the terminal keyboard, and stored in str @ param str points to the location of the stored string @ note when the string is stored, '\ n' is replaced by Spaces */int getstr (char * str ); /** @ brief format the input data and copy them to the specified position */int scanw (char * fmt, argptr1, argptr2 ...);
This article is from the "dark day" blog, please be sure to keep this source http://darksun.blog.51cto.com/3874064/1286554