00001 #include <stddef.h> 00002 #include <curses.h> 00003 00004 /** @file 00005 * 00006 * MuCurses initialisation functions 00007 * 00008 */ 00009 00010 FILE_LICENCE ( GPL2_OR_LATER ); 00011 00012 /** 00013 * Initialise console environment 00014 * 00015 * @ret *win return pointer to stdscr 00016 */ 00017 WINDOW *initscr ( void ) { 00018 /* determine console size */ 00019 /* initialise screen */ 00020 stdscr->scr->init( stdscr->scr ); 00021 stdscr->height = LINES; 00022 stdscr->width = COLS; 00023 move ( 0, 0 ); 00024 return stdscr; 00025 } 00026 00027 /** 00028 * Finalise console environment 00029 * 00030 */ 00031 int endwin ( void ) { 00032 attrset ( 0 ); 00033 color_set ( 0, NULL ); 00034 mvprintw ( ( LINES - 1 ), 0, "\n" ); 00035 stdscr->scr->exit( stdscr->scr ); 00036 return OK; 00037 }
1.5.7.1