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