| 40 |
WINDOW *window; |
WINDOW *window; |
| 41 |
|
|
| 42 |
/* new window with color*/ |
/* new window with color*/ |
| 43 |
//start_color (); |
start_color (); |
| 44 |
//init_pair(1, COLOR_BLUE, COLOR_BLACK); |
init_pair(1, COLOR_BLACK, COLOR_BLUE); |
| 45 |
|
|
| 46 |
window = newwin (wheight, wwidth, starty, startx); |
window = newwin (wheight, wwidth, starty, startx); |
| 47 |
//wattron (window, COLOR_PAIR(1)); |
wattron (window, COLOR_PAIR(1)); |
| 48 |
|
|
| 49 |
/* create a border and refresh */ |
/* create a border and refresh */ |
| 50 |
wrefresh (window); |
wrefresh (window); |
| 51 |
|
|
| 52 |
return window; |
return window; |
| 53 |
} |
} |
| 54 |
|
|
| 55 |
WINDOW* |
WINDOW* |
| 56 |
create_new_win_with_box (int wheight, int wwidth, int starty, int startx) |
create_new_win_with_box (int wheight, int wwidth, int starty, int startx) |
| 57 |
{ |
{ |
| 58 |
WINDOW* window = create_new_win (wheight, wwidth, starty, startx); |
WINDOW* window = create_new_win (wheight, wwidth, starty, startx); |
| 59 |
|
/* draw a box around the new window */ |
| 60 |
box (window, 0, 0); |
box (window, 0, 0); |
| 61 |
wrefresh (window); |
wrefresh (window); |
| 62 |
return (window); |
return (window); |
| 63 |
} |
} |
| 64 |
|
|
| 65 |
void |
void |
| 66 |
destroy_win (WINDOW* window) |
destroy_win (WINDOW* window) |
| 67 |
{ |
{ |
| 68 |
|
/* destroy the window */ |
| 69 |
delwin (window); |
delwin (window); |
| 70 |
return; |
return; |
| 71 |
} |
} |