home · contact · privacy
Reorganized Win and WinMeta structs to use a common struct to organize curses window...
[plomrogue] / windows.h
1 struct yx_uint16 {
2   uint16_t y;
3   uint16_t x; };
4
5 struct Frame {
6   WINDOW * curses_win;
7   struct yx_uint16 size; };
8
9 struct WinMeta {
10   WINDOW * screen;
11   uint16_t pad_offset;
12   struct Frame pad;
13   struct Win * chain_start;
14   struct Win * chain_end;
15   struct Win * active; };
16
17 struct Win {
18   struct Win * prev;
19   struct Win * next;
20   struct yx_uint16 start;
21   struct Frame frame;
22   char * title;
23   void (* draw) (struct Win *);
24   void * data; };
25
26 extern struct WinMeta init_win_meta (WINDOW *);
27 extern struct Win init_window (struct WinMeta *, char *, void *, void *);
28 extern void append_window (struct WinMeta *, struct Win *);
29 extern void suspend_window (struct WinMeta *, struct Win *);
30 extern void draw_all_windows (struct WinMeta *);
31 extern void resize_active_window (struct WinMeta *, uint16_t, uint16_t);
32 extern void cycle_active_window (struct WinMeta *, char);
33 extern void shift_active_window (struct WinMeta *, char);
34 extern void reset_pad_offset (struct WinMeta *, uint16_t);