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