home · contact · privacy
f7893beff0dc658539c488200b16c8ea408bd2a7
[plomrogue] / src / client / wincontrol.h
1 /* src/client/wincontrol.h
2  *
3  * Window manipulation functions directly called by user actions.
4  */
5
6 #ifndef WINCONTROL_H
7 #define WINCONTROL_H
8
9
10
11 /* Toggle display of a window of "id". */
12 extern void toggle_window(char id);
13
14 /* Toggle "window configuration" view for active window. Sets sensible .center
15  * values for each configuration view (for winconf_geometry: y=0, x=0; for
16  * winconf_keys: x=0 (y is set by draw_winconf_keybindings()); stores default
17  * view's .center in .target_center to return to it when toggling back.
18  */
19 extern void toggle_winconfig();
20
21 /* Toggle active window's .target_(height/width)_type ("axis" = "y": height;
22  * else: width). Don't toggle to .target_width_type of 1 (saving the width as a
23  * diff to the .t_screen's width) if window's width is larger than .t_screen's
24  * width, for such width is better saved directly with .target_width_type of 0.
25  */
26 extern void toggle_win_size_type(char axis);
27
28 /* Toggle window's line break type. (0: line breaks only at newlines; 1:
29  * linebreaks at newlines and when the text hits the right window border; 2:
30  * linebreaks only when the text hits the right window border, newlines are
31  * replaced by another string).
32  */
33 extern void toggle_linebreak_type();
34
35 /* Grow or shrink active window horizontally ("change" = "*"/"_") or vertically
36  * ("change" = "+"/"-") if the new size was at least 1x1, the height at least
37  * one cell smaller than .v_screen's vertical hight (to provide space for the
38  * title bar) and the width max. (2^16) - 1 cells. If a new window width would
39  * surpass that of .t_screen, set active window's .target_width_type to 0.
40  */
41 extern void resize_active_win(char c);
42
43 /* Move active window forwards ("dir" == "f") or backwards (any other "dir") in
44  * window chain. Wrap around in the window chain if start / end of it is met.
45  */
46 extern void shift_active_win(char dir);
47
48 /* Sroll .v_screen one cell to the left if "dir" is "-" and .v_screen_offset is
49  * more than 1, or to the right if "dir" is "+" and .v_screen's right edge would
50  * not move (further, if suspension of windows has moved it to the left already)
51  * leftwards to .t_screen's right edge.
52  */
53 extern void scroll_v_screen(char dir);
54
55 /* Cycle active window selection forwards ("dir" == "f") or backwards (any
56  * other "dir"). Wrap around in the windows chain if start / end of it is met.
57  */
58 extern void cycle_active_win(char dir);
59
60
61
62 #endif