💾 Archived View for gemini.rmf-dev.com › repo › Vaati › Menkar › files › 026546e4ca42e66ad5e511e1257… captured on 2023-01-29 at 03:30:45. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-07-16)
-=-=-=-=-=-=-
0 #if !defined(WINDOW_H)
1 #define WINDOW_H
2
3 /*
4 * Copyright 2006-2007 Johan Veenhuizen
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25 #include <X11/Xlib.h>
26
27 #include "list.h"
28 #include "widget.h"
29
30 struct button;
31 struct menuitem;
32 struct resizer;
33 struct title;
34
35 struct window { struct widget widget;
36 char name[1024];
37 char *iconname;
38
39 struct title *title;
40 int decoration;
41 int resizable;
42 int fullscreen;
43
44 struct button *deletebtn;
45 struct button *unmapbtn;
46 struct button *expandbtn;
47
48 struct resizer *rsz_northwest, *rsz_north, *rsz_northeast,
49 *rsz_west, *rsz_east, *rsz_southwest, *rsz_south, *rsz_southeast;
50
51 struct menuitem *menuitem;
52
53 struct color *color;
54
55 Window client;
56
57 Colormap colormap;
58
59 /* ICCCM hints */
60 XSizeHints *wmnormalhints;
61 XWMHints *wmhints;
62 Window wmtransientfor;
63
64 int cborder; /* client's initial border width */
65
66 /* Meta-Button1 moving of window */
67 struct {
68 int moving;
69 int xoff;
70 int yoff;
71 } altmove;
72
73 int ignoreunmap;
74 int maximized;
75
76 struct dim odim; /* remembered dim while maximized */
77
78 LIST *layer;
79 LIST layerlink;
80 };
81
82 void window_init(void);
83 void window_fini(void);
84 struct window *manage_window(Window, int);
85 int window_is_active(struct window *);
86 int window_is_transient_active(struct window *);
87 int window_group_is_active(struct window *);
88 int window_family_is_active(struct window *);
89 int windows_are_related(struct window *, struct window *);
90 int windows_are_transient_related(struct window *, struct window *);
91 int windows_are_group_related(struct window *, struct window *);
92 void window_calcsize(struct window *, int, int, int *, int *, int *, int *);
93 void delete_window(struct window *);
94 void fetch_icon_name(struct window *);
95 void fetch_window_name(struct window *);
96 void fetch_wm_hints(struct window *);
97 void fetch_wm_normal_hints(struct window *);
98 void fetch_wm_transient_for_hint(struct window *);
99 void fetch_wm_motif(struct window*);
100 void raise_window(struct window *);
101 void lower_window(struct window *);
102 void toggle_window_ontop(struct window *);
103 int window_is_ontop(struct window *);
104 void map_window(struct window *);
105 int maximize_window(struct window *, int, int);
106 void update_window_type(struct window *);
107 void move_window(struct window *, int, int);
108 void move_window_family(struct window *, int, int);
109 void moveresize_window(struct window *, int, int, int, int);
110 void repaint_window(struct window *);
111 void resize_window(struct window *, int, int);
112 void set_active_window(struct window *);
113 void set_active_window_(struct window *, int);
114 void unmanage_window(struct window *, int);
115 void unmap_window(struct window *);
116 void user_unmap_window(struct window *);
117 void restack_all_windows(void);
118 void get_client_stack(Window **, int *);
119 int window_is_resizable(struct window*);
120 void window_set_fullscreen(struct window*, int);
121
122 #endif /* !defined(WINDOW_H) */
123