home · contact · privacy
Rely on ncurses windows' _begyx properties instead of duplicating them in Win structs.
[plomrogue] / windows.h
1 struct WinMeta {
2   struct Win * chain_start;
3   struct Win * chain_end;
4   struct Win * active;
5   int height;
6   int width; };
7
8 struct Win {
9   struct Win * prev;
10   struct Win * next;
11   int width;
12   int height;
13   WINDOW * curses_win;
14   char border_left;
15   char border_down;
16   char * title;
17   void (* draw) (struct Win *);
18   void * data; };
19
20 struct yx {
21   int y;
22   int x; };
23
24 struct Corners {
25   struct yx tl;
26   struct yx tr;
27   struct yx bl;
28   struct yx br; };
29
30 struct  WinMeta init_win_meta (WINDOW *);
31 struct Win init_window (struct WinMeta *, char *);
32 void append_window (struct WinMeta *, struct Win *);
33 void suspend_window (struct WinMeta *, struct Win *);
34 struct yx place_window (struct WinMeta *, struct Win *);
35 void update_windows (struct WinMeta *, struct Win *);
36 void destroy_window (struct Win *);
37 void draw_window(struct Win *);
38 void draw_windows (struct Win *);
39 void draw_windows_borders (struct Win *, struct Win *, struct Corners *, int);
40 void draw_window_borders (struct Win *, char);
41 void draw_all_windows (struct WinMeta *);
42 void resize_window (struct WinMeta *, char);
43 void cycle_active_window (struct WinMeta *, char);
44 void shift_window (struct WinMeta *, char);