home · contact · privacy
Minor code restyling. Important: Renamed win->curses_win to win->curses.
[plomrogue] / windows.h
1 struct WinMeta {
2   WINDOW * screen;
3   WINDOW * pad;
4   int pad_offset;
5   struct Win * chain_start;
6   struct Win * chain_end;
7   struct Win * active;
8   int width;
9   int height; };
10
11 struct Win {
12   struct Win * prev;
13   struct Win * next;
14   int width;
15   int height;
16   WINDOW * curses;
17   char * title;
18   void (* draw) (struct Win *);
19   void * data; };
20
21 struct yx {
22   int y;
23   int x; };
24
25 struct Corners {
26   struct yx tl;
27   struct yx tr;
28   struct yx bl;
29   struct yx br; };
30
31 struct  WinMeta init_win_meta (WINDOW *);
32 struct Win init_window (struct WinMeta *, char *);
33 void append_window (struct WinMeta *, struct Win *);
34 void suspend_window (struct WinMeta *, struct Win *);
35 struct yx place_window (struct WinMeta *, struct Win *);
36 void update_windows (struct WinMeta *, struct Win *);
37 void destroy_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);