changes in display method -> ncurses (strange *printf probs :/)
[my-code/ivac.git] / src / display.h
1 /* display.h -- display headers */
2
3 /* includes */
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <string.h>
7 #include <sys/ioctl.h>
8 #include <ncurses.h>
9
10 /* defines */
11 #define D_SUCCESS 1
12 #define D_ERROR -1
13 #define D_INV_STRING_LEN -2
14
15 #define MAX_TERM_STRING 64
16
17 #define CENTERED (1<<0)
18 #define LEFT (1<<1)
19 #define RIGHT (1<<2)
20
21 /* display specific variables */
22 typedef struct s_display {
23   int max_x;
24   int max_y;
25   unsigned char *screen;
26 } t_display;
27
28 /* function prototypes */
29 int display_init(t_display *display);
30 int display_draw(t_display *display);
31 int display_draw_until_line(t_display *display,int line);
32 int display_set_cursor(t_display *display,int x,int y);
33 int display_clear_screen(t_display *display);
34 int display_shutdown(t_display *display);
35 int display_line(t_display *display,int X,int Y,int X_,int Y_,char sym);
36 int display_string(t_display *display,int x,int y,char *string,int len);
37 int display_string_vert(t_display *display,int x,int y,char *string,int len);