¸®´ª½º ÇÁ·Î±×·¡¸Ó¸¦ À§ÇÑ °¡À̵å
8.8.2 ÀÔ·Â ¼±ÅûçÇ× (Input Options)
- int keypad(win, bf)
TRUEÀ̸é, ÀÔ·ÂÀ» À§ÇØ ±â´Ù¸®°í ÀÖÀ» ¶§ »ç¿ëÀÚ ´Ü¸»±âÀÇ Å°º¸µå »ó¿¡¼ Å°ÆеåÀÇ »ç¿ëÀÌ
°¡´ÉÇÏ´Ù. Ncurses´Â Å°ÆеåÀÇ ±â´É(function)°ú È»ìÇ¥(arrow) Å°µéÀ» À§ÇØ KEY_* ó·³ .h¿¡
Á¤ÀÇµÈ Å° Äڵ带 ¹ÝȯÇÒ °ÍÀÌ´Ù. ÀÌ°ÍÀº ¼ýÀÚ ºí·Ï(numerical block)°ú Ä¿¼ Å°µéÀ» »ç¿ëÇÒ ¼ö
ÀÖÀ¸¹Ç·Î PC Å°º¸µå¿¡¼ ¸Å¿ì À¯¿ëÇÏ´Ù.
- int meta(win, bf)
TRUEÀ̸é, getch()·Î ºÎÅÍ ¹ÝȯµÇ´Â Å° ÄÚµåµéÀº 8-bit-cleanÀÌ´Ù.
(ÃÖ»óÀ§ ºñÆ®´Â ¶¼¾î³¾ ¼ö ¾ø´Ù.)
- int cbreak()
int nocbreak()
int crmode()
int nocrmode()
cbreak()°ú nocbreak()Àº ´Ü¸»±âÀÇ CBREAK ¸ðµå¸¦ on ¶Ç´Â off·Î Àüȯ½Ãų °ÍÀÌ´Ù.
CBREAK°¡ onÀÏ ¶§, Àбâ·Î ºÎÅÍÀÇ ÀÔ·ÂÀº Áï½Ã ÇÁ·Î±×·¥¿¡¼ »ç¿ë°¡´ÉÇÏ°í offÀÏ ¶§, ÀÔ·ÂÀº
newlineÀÌ ¹ß»ýÇÒ ¶§±îÁö ¹öÆÛ¿¡ ÀúÀåµÉ °ÍÀÌ´Ù. (Note:crmode()¿Í
nocrmode()Àº Çâ»óµÈ ȣȯ¼ºÀÌ ÀÖÁö¸¸, ±×µéÀ» »ç¿ëÇÏÁö ¸»¾Æ¶ó)
- int raw()
int noraw()
RAW ¸ðµå¸¦ on ¶Ç´Â off·Î ¸¸µç´Ù. RAW´Â RAW ¸ðµå¿¡¼´Â Ư¼ö ¹®ÀÚ Ã³¸®°¡ ÀÌ·ç¾îÁöÁö ¾Ê´Â´Ù´Â
°ÍÀ» Á¦¿ÜÇÏ°í´Â CBREAK¿Í °°´Ù.
- int echo()
int noecho()
»ç¿ëÀÚ¿¡ ÀÇÇØ Å¸ÀÌÇÎµÈ ÀÔ·ÂÀ» echoÇϱâÀ§ÇØ echo()¸¦ ÁöÁ¤ÇÏ°í ħ¹¬Çϱâ À§Çؼ´Â
noecho()¸¦ ÁöÁ¤ÇÑ´Ù.
- int halfdelay(t)
cbreak()ó·³ t ÃÊ°£ Áö¿¬(delay)ÇÑ´Ù.
- int nodelay(win, bf)
´Ü¸»±â´Â Â÷´Ü(blocking) ¸ðµå·Î ÁöÁ¤µÇÁö ¾Ê´Â´Ù. cetch()´Â ÀÔ·ÂÀÌ ÁغñµÇ¾îÀÖÁö ¾ÊÀ¸¸é
ERRÀ» ¹ÝȯÇÒ °ÍÀÌ´Ù. FALSE°¡ ÁöÁ¤µÇ¾î ÀÖÀ¸¸é, getch()´Â Å°°¡ ´·ÁÁú ¶§±îÁö ±â´Ù¸±
°ÍÀÌ´Ù.
- int timeout(t)
int wtimeout(win, t)
halfdelay(t)¿Í nodelay(win,bf) ´ë½Å ÀÌ·¯ÇÑ ÇÔ¼öµéÀÇ »ç¿ëÀÌ ÃßõµÈ´Ù.
getch()ÀÇ °á°ú´Â tÀÇ °ª¿¡ µû¶ó °áÁ¤µÈ´Ù. t°¡ ¾ç¼öÀ̸é, Àбâ´Â t milliseconds °£
Â÷´ÜµÇ¾îÁø´Ù(blocked). t°¡ Á¦·ÎÀ̸é, Â÷´Ü(blocking)Àº ¼öÇàµÇÁö ¾Ê´Â´Ù. t°¡ À½¼öÀÏ ¶§
ÇÁ·Î±×·¥Àº ÀÔ·ÂÀÌ °¡´ÉÇÒ ¶§±îÁö Â÷´ÜÇÑ´Ù.
- int notimeout(fd)
bf°¡ TRUEÀ̸é, getch()´Â ESCAPE°ú °°Àº Å°·Î ½ÃÀÛÇÏ´Â ½ÃÄö½º(sequence)¸¦ ÀԷ¹ްí
¹ø¿ªÇϱâ À§ÇØ Æ¯º°ÇÑ (1ÃÊ ±æÀÌÀÇ)ŸÀ̸Ӹ¦ »ç¿ëÇÒ °ÍÀÌ´Ù.
- int typeahead(fd)
fd°¡ -1À̸é typeahead üũ´Â ¼öÇàµÇ¾îÁöÁö ¾ÊÀ» °ÍÀÌ°í, ±×·¸Áö ¾ÊÀ¸¸é ncurses´Â ÀÌ·¯ÇÑ Ã¼Å©¸¦
À§ÇØ ÆÄÀÏ ½Äº°ÀÚ(file descriptor) fd¸¦ »ç¿ëÇÒ °ÍÀÌ´Ù.
- int intrflush(win, bf)
bf°¡ TRUE·Î »ç¿ë°¡´ÉÇÒ ¶§ ´Ü¸»±â »ó¿¡¼ ´·ÁÁø ÀÎÅÍ·´Æ®(interrupt) Å°(quit, break, ...)´Â
tty µå¶óÀ̹ö(driver) Å¥(queue) ¾ÈÀÇ ¸ðµç Ãâ·ÂÀ» ¸ô¾Æ³¾ °ÍÀÌ´Ù.
- void noqiflush()
void qiflush()
(Note:¾ÆÁ÷ ±¸ÇöµÇÁö ¾ÊÀ½)
ÀÌÀü:8.8.1 Ãâ·Â ¼±ÅûçÇ× (Output Options)
´ÙÀ½:8.8.3 ´Ü¸»±â ¼Ó¼º (Terminal Attributes)
Copyright (c) 1996,1997 by Euibeom.Hwang & SangEun.Oh All Rights Reserved
Email To:Webmaster ,
Another address
LAST UPDATE Dec 15,1997
Created Dec 15,1997