Clearing screen
I don't know if this question is going to bore you down. Anyway, i am sure it is not going to give you any opportunity to learn. "crabboy" the moderator of this group has psoted a code segment to clear the screen. Here is a quick snapshot of it
#include
#include
main()
{
initscr();
clear();
refresh();
endwin();
}
This code uses the curses library. So far so good.
But this only works if i boot into the runlevel 3. The same code doesn't seem to budge in an xterm. My xterm looks pure and simple.
One more thing.
I am developing an application which will look like the pine email client (Only in the gui perspective). I could manage to display the key menus and main menu of my application at different locations in the xterm. but when i resize the xterm it will turn out into a mess. The only way i can get the resized event is through ioctl system calls. But i want to make my application posix compatible as much as possible. I am assuming curses.h will provide all the stuff i need. Is that true ?. If not, could anyone suggest a different method. Can you guys just point me to a reference library for the curses library. Or incase if you have a different method, just don't forget to give links to the resources that i must read.
I was a java programmer turned c programmer, still haven't broke the ice yet. so please be considerate.
|