¸®´ª½º ÇÁ·Î±×·¡¸Ó¸¦ À§ÇÑ °¡À̵å
8.10 ´Ü¸»±â ¾÷µ¥ÀÌÆ® (Updating the Trminal)
°³¿ä¿¡ ¾²¿´´ø °Íó·³, ncurses À©µµ¿ìµéÀº ¸Þ¸ð¸® ¾È¿¡ ÀÖ´Â À̹ÌÁöµéÀÌ´Ù. ÀÌ°ÍÀº À©µµ¿ì¿¡¼ÀÇ
¾î¶² º¯È°¡ refresh°¡ ¼öÇàµÉ ¶§±îÁö ¹°¸®ÀûÀΠȸ鿡 ÀμâµÇÁö ¾Ê´Â´Ù´Â °ÍÀ» ÀǹÌÇÑ´Ù. ÀÌ°ÍÀº
¸¹Àº Á¶Á¾ÀÌ ÀÖÀ» ¼ö Àֱ⠶§¹®¿¡ ȸ鿡 ´ëÇÑ Ãâ·ÂÀ» ÃÖÀûÈÇÏ°í ȸ鿡 ±×°ÍÀ» ÀμâÇϱâ À§ÇØ
refresh¸¦ Çѹø È£ÃâÇÑ´Ù. ±×·¸Áö ¾ÊÀ¸¸é, ¸ðµç º¯È°¡ ȸ鿡 ÀμâµÇ¾î Áö°í ÇÁ·Î±×·¥ÀÇ ¼º´É
(performance)¸¦ °¨¼Ò½ÃŲ´Ù.
- int refresh()
int wrefresh(win)
refresh()´Â ´Ü¸»±â·Î º¹»ç¸¦ ÇÏ°í wrefresh(win)´Â À©µµ¿ì À̹ÌÁö·Î º¹»çÇÑ´Ù.
- int wnoutrefresh(win)
int doupdate()
wnoutrefresh(win)´Â ¿ÀÁ÷ À©µµ¿ì winÀ¸·Î º¹»çÇÑ´Ù. ÀÌ°ÍÀº ´Ü¸»±â¿¡ ´ëÇÑ Ãâ·ÂÀÌ
¼öÇàµÇÁö´Â ¾ÊÁö¸¸ °¡»óÀÇ È¸é¿¡ ½ÇÁ¦ÀûÀ¸·Î ÇÁ·Î±×·¡¸Ó°¡ ¿øÇÏ´Â ´ë·Î º¸¿©ÁüÀ» ÀǹÌÇÑ´Ù.
doupdate()´Â ´Ü¸»±â¿¡ Ãâ·ÂÀ» ¼öÇàÇÒ °ÍÀÌ´Ù. ÇÁ·Î±×·¥Àº ¿©·¯°¡Áö À©µµ¿ìµéÀ» ¹Ù²Ü ¼ö
ÀÖ°í ¸ðµç À©µµ¿ì¿¡ ´ëÇØ wnoutrefresh(win)¸¦ È£ÃâÇÒ ¼ö ÀÖ°í ¿ÀÁ÷ Çѹø ¹°¸®ÀûÀΠȸéÀ»
¾÷µ¥ÀÌÆ®Çϱâ À§ÇØ doupdate()¸¦ È£ÃâÇÒ ¼ö ÀÖ´Ù.
¿¹¸¦ µé¾î, µÎ°³ÀÇ À©µµ¿ì¸¦ °¡Áö´Â ´ÙÀ½ÀÇ ÇÁ·Î±×·¥ÀÌ ÀÖ´Ù. ÅؽºÆ®ÀÇ ¸î¸î ÁÙÀ» º¯°æÇÏ¿© ¾çÂÊ
À©µµ¿ìµéÀ» ¹Ù²Û´Ù. wrefresh(win)À» °¡Áö°í changewin(win)¸¦ writeÇÒ ¼ö ÀÖ´Ù.
ÀÌ°ÍÀº ncurses°¡ ´Ü¸»±â¸¦ µÎ¹ø ¾÷µ¥ÀÌÆ®ÇÏ°Ô ÇÏ¿© ½ÇÇàÀ» ´À¸®°Ô ÇÑ´Ù. doupdate()¸¦
°¡Áö°í changewin(win)¿Í main ÇÔ¼ö¸¦ º¯°æ½ÃÅ°°í ¼º´É(performance)À» Çâ»ó½ÃŲ´Ù.
- int redrawwin(win)
int wredrawln(win, bline, nlines)
¸î¸î ÁÙÀ̳ª Àüü ȸéÀÌ »õ·Î¿î °ÍÀ» ¾²±â Àü¿¡ ¾ø¾îÁ®¾ß ÇÒ ¶§, ÀÌ·¯ÇÑ ÇÔ¼öµéÀ» »ç¿ëÇÑ´Ù.
(¾Æ¸¶µµ ¸î¸î ÁÙÀÌ ¾µ¸ð¾ø¾î Á³À» ¶§)
- int touchwin(win)
int touchline(win, start, count)
int wtouchln(win, y, n, changed)
int untouchwin(win)
ncurses¿¡ Àüü À©µµ¿ì win ¶Ç´Â start upÀ¸·Î ºÎÅÍ start+count±îÁö ÁÙµéÀÌ Á¶Á¾µÇ¾úÀ½À» ¾Ë¸°´Ù.
¿¹¸¦ µé¾î, ¸î¸î À©µµ¿ì°¡ ÁßøµÇ¾úÀ» ¶§, ÇÑ À©µµ¿ì¿¡ ´ëÇÑ º¯È´Â ´Ù¸¥ °Íµé·Î ºÎÅÍ À̹ÌÁö¿¡
¿µÇâÀ» ¹ÞÁö ¾ÊÀ» °ÍÀÌ´Ù.
wtouchln(...)Àº y·Î ºÎÅÍ ½ÃÀÛÇÏ¿© n°³ÀÇ ÁÙÀ» °Çµå¸± °ÍÀÌ´Ù. change°¡ TRUEÀ̸é
±× ÁÙµéÀº º¯°æµÇ°í(touched,changed) ±×·¸Áö ¾ÊÀ¸¸é º¯°æµÇÁö ¾Ê´Â´Ù(untouched,unchanged).
untouchwin(win)´Â refreshÀÇ ¸¶Áö¸· È£Ãâ ÀÌÈÄ À©µµ¿ì win¿¡ unchanged
Ç¥½Ã¸¦ ÇÒ °ÍÀÌ´Ù.
- int is_linetouched(win, line)
int is_wintouched(win)
ÀÌ·¯ÇÑ ÇÔ¼öµéÀ» °¡Áö°í ÁÙ line ¶Ç´Â À©µµ¿ì winÀÌ refresh()ÀÇ ¸¶Áö¸· È£Ãâ ÀÌÈÄ¿¡
º¯°æÀÌ ÀÖ¾ú´ÂÁö¸¦ üũÇÒ ¼ö ÀÖ´Ù.
ÀÌÀü:8.9 À©µµ¿ì¿Í ÁÙ Áö¿ì±â (Clear Window and Lines)
´ÙÀ½:8.11 ºñµð¿À ¼Ó¼º°ú »ö»ó (Video Attributes and Color)
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