Results 1 to 1 of 1
Would any curses programmers like to share any tips/suggestions for the proper strategy for redrawing the screen in a curses app? I'm creating a curses app in C, and it ...
- 01-21-2009 #1Just Joined!
- Join Date
- Jan 2009
- Posts
- 10
Strategy for redrawing screen in curses app
Would any curses programmers like to share any tips/suggestions for the proper strategy for redrawing the screen in a curses app? I'm creating a curses app in C, and it needs to adjust properly if the screen size is changed. Here's what I'm doing now:
There is one input loop -- the terminal is set to raw mode, timeout(100)
After 100 ms input wait, then I run refresh()
Then I check to see if LINES or COLS have changed from what they were
If they have changed, I run clear(), and then redraw everything.
Input loop starts over again
This seems to work, but I was wondering if maybe the timeout should be higher/lower, or if there were any related functions or insider tips I should know about.


Reply With Quote