home · contact · privacy
Modularized windows.c subsystem by moving anything not supposed to be public into...
[plomrogue] / windows.h
1 struct WinMeta {
2   WINDOW * screen;
3   WINDOW * pad;
4   uint16_t  pad_offset;
5   struct Win * chain_start;
6   struct Win * chain_end;
7   struct Win * active;
8   uint16_t width;
9   uint16_t height; };
10
11 struct Win {
12   struct Win * prev;
13   struct Win * next;
14   uint16_t width;
15   uint16_t height;
16   WINDOW * curses;
17   char * title;
18   void (* draw) (struct Win *);
19   void * data; };
20
21 extern struct  WinMeta init_win_meta (WINDOW *);
22 extern struct Win init_window (struct WinMeta *, char *, void *, void *);
23 extern void append_window (struct WinMeta *, struct Win *);
24 extern void suspend_window (struct WinMeta *, struct Win *);
25 extern void draw_all_windows (struct WinMeta *);
26 extern void resize_active_window (struct WinMeta *, uint16_t, uint16_t);
27 extern void cycle_active_window (struct WinMeta *, char);
28 extern void shift_active_window (struct WinMeta *, char);
29 extern void reset_pad_offset (struct WinMeta *, uint16_t);