| 34 |
#include "ui.h" |
#include "ui.h" |
| 35 |
|
|
| 36 |
WINDOW* |
WINDOW* |
| 37 |
createNewWin (int wheight, int wwidth, int starty, int startx) |
create_new_win (int wheight, int wwidth, int starty, int startx) |
| 38 |
{ |
{ |
| 39 |
/* variables */ |
/* variables */ |
| 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_BLUE, COLOR_BLACK); |
| 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 */ |
|
box (window, 0, 0); |
|
| 50 |
wrefresh (window); |
wrefresh (window); |
| 51 |
|
|
| 52 |
return window; |
return window; |
| 53 |
} |
} |
| 54 |
|
WINDOW* |
| 55 |
|
create_new_win_with_box (int wheight, int wwidth, int starty, int startx) |
| 56 |
|
{ |
| 57 |
|
WINDOW* window = create_new_win (wheight, wwidth, starty, startx); |
| 58 |
|
box (window, 0, 0); |
| 59 |
|
wrefresh (window); |
| 60 |
|
return (window); |
| 61 |
|
} |
| 62 |
void |
void |
| 63 |
destroyWin (WINDOW* window) |
destroy_win (WINDOW* window) |
| 64 |
{ |
{ |
| 65 |
delwin (window); |
delwin (window); |
| 66 |
return; |
return; |
| 67 |
} |
} |
| 68 |
|
|