acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
aaa_oswindow.h
1#pragma once
2
3
4// define portable types for 32-bit / 64-bit OS
5//typedef ::i32 i32_bool;
6typedef ::u8 uch;
7//typedef ::u16 ush;
8typedef ::u32 ::u32;
9//typedef ::i32 ::i32;
10
11
12
13
14struct htask;
15
16namespace ca2
17{
18
19
20 class thread_base;
21
22
23} // namespace ca2
24
25
26//class oswindow_data;
27
28
29//typedef oswindow_data * oswindow;
30
31
32
33namespace user
34{
35
36
37 class interaction;
38 class interaction;
39
40
41} // namespace user
42
43
45
46
47class happening;
48
49
50class ::pointer < ::mutex >;
51
52
53class oswindow_data;
54
55
56CLASS_DECL_AURA ::i32 oswindow_find_message_only_window(::windowing::window * puibaseMessageWindow);
57CLASS_DECL_AURA ::i32 oswindow_find(Display * pdisplay, Window window);
58CLASS_DECL_AURA ::i32 oswindow_find(Window window);
59CLASS_DECL_AURA oswindow_data * oswindow_get_message_only_window(::windowing::window * puibaseMessageWindow);
60CLASS_DECL_AURA oswindow_data * oswindow_get(Display * pdisplay, Window window, Visual * pvisual = nullptr, ::i32 iDepth = -1, ::i32 iScreen = -1, Colormap colormap = None);
61CLASS_DECL_AURA oswindow_data * oswindow_get(Window window);
62CLASS_DECL_AURA oswindow_data * oswindow_defer_get(Display * pdisplay, Window window);
63CLASS_DECL_AURA oswindow oswindow_defer_get(Window w);
64CLASS_DECL_AURA bool oswindow_erase(Display * pdisplay, Window window);
65CLASS_DECL_AURA bool oswindow_erase_message_only_window(::windowing::window * puibaseMessageOnlyWindow);
66
67
68struct htask;
69
70namespace ca2
71{
72
73
74 class thread_base;
75
76
77} // namespace ca2
78
79
80//class oswindow_data;
81
82
83//typedef oswindow_data * oswindow;
84
85
86
87namespace user
88{
89
90
91 class interaction;
92 class interaction;
93
94
95} // namespace user
96
97
99
100
101class simple_event;
102
103
104class ::pointer < ::mutex >;
105
106
107class CLASS_DECL_AURA oswindow_data
108{
109public:
110
111
112 HCURSOR m_hcursorLast;
113
114 //iptr_to_iptr * m_plongmap;
115 ::i32 m_iXic;
116 XIC m_xic;
117 osdisplay m_osdisplay;
118 Window m_window;
119 Visual m_visual;
120 ::i32 m_iDepth;
121 ::i32 m_iScreen;
122 bool m_bMessageOnlyWindow;
123 ::pointer<::windowing::window> m_pimpl;
124 ::pointer<message_queue> m_pmq;
125 htask m_htask;
126 Colormap m_colormap;
127 class ::time m_timeLastMouseMove;
128 Window m_parent;
129 ::i32_rectangle m_rectangle;
130 string m_strWMClass;
131 ::i32 m_iaNetWmState[net_wm_state_count];
132
133
134 static oswindow_dataptra * s_pdataptra;
135 static ::pointer< ::mutex > s_pmutex;
136
137 static Atom s_atomLongType;
138 static Atom s_atomLongStyle;
139 static Atom s_atomLongStyleEx;
140
141 static Atom get_window_long_atom(::i32 nIndex);
142
143
144
145
146 oswindow_data();
147 //oswindow_data(::user::interaction * puibaseMessageOnlyWindow);
148 //oswindow_data(const void * p);
149 //oswindow_data(const LPARAM & lparam);
150
151 //oswindow_data(const WPARAM & wparam);
152
153
154 ~oswindow_data();
155
156
157
158 operator void * ()
159 {
160 return this;
161 }
162
163 operator void * () const
164 {
165 return (void *) this;
166 }
167
168 oswindow_data & operator = (const oswindow_data & window);
169
170 bool operator == (const void * p) const
171 {
172 return this == p;
173 }
174
175 bool operator != (const void * p) const
176 {
177 return this != p;
178 }
179
180 Display * display()
181 {
182 return ::is_null(this) ? nullptr : m_osdisplay->display();
183 }
184
185 Display * display() const
186 {
187 return ::is_null(this) ? nullptr : m_osdisplay->display();
188 }
189
190 Window window()
191 {
192 return ::is_null(this) ? None : m_window;
193 }
194
195 Window window() const
196 {
197 return ::is_null(this) ? None : m_window;
198 }
199
200 Visual * visual()
201 {
202 return ::is_null(this) ? nullptr : &m_visual;
203 }
204
205 Visual * visual() const
206 {
207 return ::is_null(this) ? nullptr : (Visual *) &m_visual;
208 }
209
210 Window root_window_raw() const
211 {
212 return ::is_null(this) || ::is_null(m_osdisplay) ? None : RootWindow(display(), m_iScreen);
213 }
214
215 void send_client_event(Atom atom, ::u32 numArgs, ...);
216 ::i32 store_name(const ::scoped_string & scopedstr);
217 ::i32 select_input(::i32 iInput);
218 ::i32 select_all_input();
219 ::i32 map_window();
220 ::i32 unmap_window(bool bWithdraw);
221 void set_wm_class(const ::scoped_string & scopedstr);
222
223 void exit_iconify();
224
225 void full_screen(const ::i32_rectangle & rectangle = nullptr);
226
227 void exit_full_screen();
228
229 void exit_zoomed();
230
231 void set_user_interaction(::windowing::window * pinteraction);
232
233
234 void post_nc_destroy();
235
236
237 bool is_child(oswindow oswindowcandidateChildOrDescendant); // or descendant
238 oswindow get_parent();
239 Window get_parent_handle();
240
241 oswindow set_parent(oswindow oswindowNewParent);
242 long get_state();
243 bool is_iconic();
244 bool is_window_visible();
245 bool show_window(const ::e_display & edisplay, const ::user::e_activation & useractivation);
246 iptr get_window_long_ptr(::i32 nIndex);
247 iptr set_window_long_ptr(::i32 nIndex, iptr l);
248 bool client_to_screen(::i32_point * ppoint);
249
250 bool screen_to_client(::i32_point * ppoint);
251
252
253 Atom intern_atom(const ::scoped_string & scopedstrAtomName, bool bCreate);
254 Atom intern_atom(e_net_wm_state state, bool bCreate);
255
256 bool is_null() const
257 {
258 return ::is_null(this);
259 }
260
261 bool set_window_position(class ::zorder zorder, ::i32 x, ::i32 y, ::i32 cx, ::i32 cy, ::u32 nFlags);
262 bool _set_window_pos(class ::zorder zorder, ::i32 x, ::i32 y, ::i32 cx, ::i32 cy, ::u32 nFlags);
263
264 bool is_destroying();
265
266 bool bamf_set_icon();
267
268 bool set_icon(::image::image *pimage);
269
270 ::i32 x_change_property(Atom property, Atom type, ::i32 format, ::i32 mode, const ::u8 * data, ::i32 nelements);
271
272};
273
274class oswindow_dataptra :
275 public address_array < oswindow_data * >
276{
277public:
278
279 virtual ~oswindow_dataptra()
280 {
281
282 erase_all();
283
284 }
285
286 void erase_all()
287 {
288
289 for(auto point : *this)
290 {
291
292 delete i32_point;
293
294 }
295
296 address_array < oswindow_data * >::erase_all();
297 }
298
299};
300
301extern oswindow g_oswindowDesktop;
302
303
304
305
Definition happening.h:37
Definition types.h:47
Definition aaa_oswindow.h:108
Definition aaa_oswindow.h:276
Definition ___serialization_draft.h:150
Created by camilo on 2026-05-28 12:34 <3ThomasBorregaardSørensen!! Mummi!! Bilbo!!
Definition _.h:67