home · contact · privacy
Moved several windows control functions from misc library into new wincontrol library.
[plomrogue] / src / wincontrol.h
1 /* wincontrol.h
2  *
3  * Routines that build on top of the windows library to provide a simple window
4  * management API to the game.
5  */
6
7 #ifndef WINCONTROL_H
8 #define WINCONTROL_H
9
10
11
12 #include <stdint.h> /* for uint8_t */
13 struct Win;
14 struct WinMeta;
15
16
17
18 /* Toggle display of a window "win".
19  *
20  * Return 0 on success, 1 on (ncurses pad/window memory allocation) error.
21  */
22 extern uint8_t toggle_window(struct WinMeta * win_meta, struct Win * win);
23
24
25
26 /* Try to scroll virtual screen left ("dir" = "-") or right ("dir" = "+"),
27  * subject to the limitations provided by the window manager via
28  * reset_pad_offset().
29  */
30 extern void scroll_pad(struct WinMeta * win_meta, char dir);
31
32
33
34 /* Try to grow or shrink the active window horizontally ("change" = "*"/"_") or
35  * vertically ("change = "+"/"-") by one cell size, subject to the limitations
36  * provided by the window manager via resize_active_win().
37  *
38  * Return 0 on success, 1 on (ncurses pad/window memory allocation) error.
39  */
40 extern uint8_t growshrink_active_window(struct WinMeta * win_meta, char change);
41
42
43
44 #endif