¸®´ª½º ÇÁ·Î±×·¡¸Ó¸¦ À§ÇÑ °¡À̵å
8.7 ÀÔ·Â (Input)
- int getch()
int wgetch(win)
int mvgetch(y, x)
int mvwgetch(win, y, x)
getch()´Â Áö¿¬ ¸ðµå(delay mode)°¡ ÁöÁ¤µÇ¾ú´ÂÁö ¾Æ´ÑÁö¿¡ µû¸¥ ¹æ½ÄÀ¸·Î ´Ü¸»±â·Î ºÎÅÍ
ÀÔ·ÂÀ» Àд´Ù. Áö¿¬(delay)ÀÌ onÀÎ °æ¿ì, getch()´Â Å°°¡ ´·ÁÁú ¶§±îÁö ±â´Ù¸®°í
±×·¸Áö ¾ÊÀ¸¸é ÀÔ·Â ¹öÆÛ¾ÈÀÇ Å°¸¦ ¹ÝȯÇÏ°í ¹öÆÛ°¡ ºñ¾îÀÖÀ¸¸é ERRÀ» ¹ÝȯÇÑ´Ù.
mvgetch(...)¿Í mvwgetch(...)´Â ¸ÕÀú y,x À§Ä¡·Î Ä¿¼¸¦ À̵¿½ÃŲ´Ù. w ÇÔ¼öµéÀº
À©µµ¿ì win°ú ¿¬°üµÈ ´Ü¸»±â·Î ºÎÅÍ ÀÔ·ÂÀ» Àд´Ù.
keypad(...)°¡ enableµÇ¾î ÀÖÀ¸¸é, getch()´Â ±â´ÉÅ°(function key)°¡ ´·ÁÁú ¶§ .h¿¡
KEY_* ¸ÅÅ©·Î ó·³ Á¤ÀÇµÈ Äڵ带 ¹ÝȯÇÑ´Ù. ESCAPE°¡ ´·ÁÁú ¶§(ÀÌ°ÍÀÌ ±â´ÉÅ°ÀÇ ½ÃÀÛÀÏ ¼ö ÀÖÀ½)
ncurses´Â one second timer¸¦ ½ÃÀÛ½ÃŲ´Ù. ÀÌ ½Ã°£ ¾È¿¡ keystrokeÀÇ ³ª¸ÓÁö°¡ ³¡³ªÁö ¾Ê´Â´Ù¸é,
Å°´Â ¹ÝȯµÈ´Ù. ±×·¸Áö ¾ÊÀ¸¸é, ±â´ÉÅ°°ªÀÌ ¹ÝȯµÈ´Ù. (ÇÊ¿äÇÏ´Ù¸é, second timer¸¦ »ç¿ëÇÏÁö
¾Ê±âÀ§ÇØ notimeout()À» »ç¿ëÇ϶ó)
- int ungetch(ch)
ÀÔ·Â ¹öÆÛÀÇ µÚ¿¡ ch ¹®ÀÚ¸¦ ³Ö´Â´Ù.
- int getstr(str)
int wgetstr(win, str)
int mvgetstr(y, x, str)
int mvwgetstr(win, y, x, str)
int wgwrnstr(win, str, n)
ÀÌ·¯ÇÑ ÇÔ¼öµéÀº newlineÀ» ¹ÞÀ» ¶§±îÁö getch()ÀÇ È£ÃâÀ» ¿¬¼ÓÀûÀ¸·Î ¼öÇàÇÑ´Ù.
¹®ÀÚµéÀº str¾È¿¡ ³õ¿©ÀÖ´Ù.(getstr(...)¸¦ È£ÃâÇϱâ Àü¿¡ ¹®ÀÚ Æ÷ÀÎÅÍ(character pointer)¸¦
À§ÇØ ¸Þ¸ð¸®¸¦ ÇÒ´çÇÏ´Â °ÍÀ» ÀØÁö ¸»¾Æ¶ó) echo°¡ enableµÇ¾î ÀÖÀ¸¸é ¹®ÀÚ¿Àº echoµÇ¾îÁö°í
(echo¸¦ »ç¿ëÇÏÁö ¾Ê±âÀ§ÇØ noecho()¸¦ »ç¿ëÇ϶ó) »ç¿ëÀÚÀÇ kill°ú ¹®ÀÚµéÀÇ »èÁ¦´Â
Çؼ®µÇ¾îÁø´Ù.
- chtype inch()
chtype winch(win)
chtype mvinch(y, x)
chtype mvwinch(win, y, x)
ÀÌ·¯ÇÑ ÇÔ¼öµéÀº ȸéÀ̳ª À©µµ¿ì·Î ºÎÅÍ ¹®ÀÚ¸¦ ¹ÝȯÇÑ´Ù. ¹Ýȯ°ªÀÇ Å¸ÀÔÀº ¼Ó¼º Á¤º¸¸¦
Æ÷ÇÔÇÏ´Â chtypeÀ̱⠶§¹®ÀÌ´Ù. ÀÌ Á¤º¸´Â A_* »ó¼ö¸¦ »ç¿ëÇÏ´Â ¹®ÀÚ·Î ºÎÅÍ ÃßÃâµÇ¾îÁú ¼ö ÀÖ´Ù.
(Ç¥ 8.4¸¦ ÂüÁ¶Ç϶ó)
- int instr(str)
int innstr(str, n)
int winstr(win, str)
int winnstr(win, str, n)
int mvinstr(y, x, str)
int mvinnstr(y, x, str, n)
int mvwinstr(win, y, x, str)
int mvwinnstr(win, y, x, str, n)
È¸é ¶Ç´Â À©µµ¿ì·Î ºÎÅÍ character stringÀ» ¹ÝȯÇÑ´Ù.(Note:¾ÆÁ÷ ±¸ÇöµÇÁö ¾ÊÀ½)
- int inchstr(chstr)
int inchnstr(chstr, n)
int winchstr(win, chstr)
int winchnstr(win, chstr, n)
int mvinchstr(y, x, chstr)
int mvinchnstr(y, x, chstr, n)
int mvwinchstr(win, y, x, chstr)
int mvwinchnstr(win, y, x, chstr, n)
È¸é ¶Ç´Â À©µµ¿ì·Î ºÎÅÍ chtype stringÀ» ¹ÝȯÇÑ´Ù. ¹®ÀÚ¿¾È¿¡ ¸ðµç ¹®ÀÚ¿¡ ´ëÇÑ ¼Ó¼º Á¤º¸°¡
Æ÷ÇԵǾîÀÖ´Ù. (Note:¾Æºò ±¸ÇöµÇÁö ¾ÊÀ½. lib_inchstrÀº ncurses lib¿¡ Æ÷ÇÔµÇÁö ¾ÊÀ½)
ÀÌÀü:8.6.5 ¹é±×¶ó¿îµå ¹®ÀÚ (Background Character)
´ÙÀ½:8.7.1 Çü½ÄÈµÈ ÀÔ·Â (Formatted Input)
Copyright (c) 1996,1997 by Euibeom.Hwang & SangEun.Oh All Rights Reserved
Email To:Webmaster ,
Another address
LAST UPDATE Dec 11,1997
Created Dec 11,1997