wlmaker
Loading...
Searching...
No Matches
window.h
Go to the documentation of this file.
1/* ========================================================================= */
20#ifndef __WLMTK_WINDOW2_H__
21#define __WLMTK_WINDOW2_H__
22
23#include <libbase/libbase.h>
24#include <stdbool.h>
25#include <stdint.h>
26#include <wayland-server-core.h>
27
28struct wlr_output;
29
32
33#include "element.h"
34#include "menu.h"
35#include "style.h"
36#include "util.h"
37#include "workspace.h" // IWYU pragma: keep
38
39#ifdef __cplusplus
40extern "C" {
41#endif // __cplusplus
42
44typedef struct {
58 struct wl_signal state_changed;
59
61 struct wl_signal set_activated;
62
68 struct wl_signal request_close;
69
75 struct wl_signal request_size;
76
82 struct wl_signal request_fullscreen;
83
89 struct wl_signal request_maximized;
91
108
119 wlmtk_element_t *content_element_ptr,
120 const wlmtk_window_style_t *style_ptr,
121 const wlmtk_menu_style_t *menu_style_ptr);
122
128void wlmtk_window_destroy(wlmtk_window_t *window_ptr);
129
138
147
156
164struct wlr_box wlmtk_window_get_bounding_box(wlmtk_window_t *window_ptr);
165
168
176 wlmtk_window_t *window_ptr,
177 uint32_t properties);
178
188 wlmtk_window_t *window_ptr,
189 const wlmtk_util_client_t *client_ptr);
190
199 wlmtk_window_t *window_ptr);
200
209 wlmtk_window_t *window_ptr,
210 struct wlr_output *wlr_output_ptr);
211
220struct wlr_output *wlmtk_window_get_wlr_output(
221 wlmtk_window_t *window_ptr);
222
234 wlmtk_window_t *window_ptr,
235 const char *title_ptr);
236
246const char *wlmtk_window_get_title(wlmtk_window_t *window_ptr);
247
258 wlmtk_window_t *window_ptr,
259 bool activated);
260
263
271 wlmtk_window_t *window_ptr,
272 const struct wlr_box *box_ptr);
273
283 wlmtk_window_t *window_ptr,
284 int width, int height);
285
294struct wlr_box wlmtk_window_get_size(wlmtk_window_t *window_ptr);
295
303 wlmtk_window_t *window_ptr,
304 uint32_t edges);
305
308
315
322
329void wlmtk_window_request_fullscreen(wlmtk_window_t *window_ptr, bool fullscreen);
330
333
342 wlmtk_window_t *window_ptr,
343 bool fullscreen);
344
356 wlmtk_window_t *window_ptr,
357 bool maximized);
358
361
372 wlmtk_window_t *window_ptr,
373 bool maximized);
374
381void wlmtk_window_request_shaded(wlmtk_window_t *window_ptr, bool shaded);
382
384bool wlmtk_window_is_shaded(wlmtk_window_t *window_ptr);
385
392void wlmtk_window_menu_set_enabled(wlmtk_window_t *window_ptr, bool enabled);
393
402
410 wlmtk_window_t *window_ptr,
411 bool decorated);
412
422 wlmtk_window_t *window_ptr,
423 wlmtk_workspace_t *workspace_ptr);
424
427
429bs_dllist_node_t *wlmtk_dlnode_from_window(wlmtk_window_t *window_ptr);
431wlmtk_window_t *wlmtk_window_from_dlnode(bs_dllist_node_t *dlnode_ptr);
432
434extern const bs_test_case_t wlmtk_window_test_cases[];
435
444
445#ifdef __cplusplus
446} // extern "C"
447#endif // __cplusplus
448
449#endif /* __WLMTK_WINDOW2_H__ */
450/* == End of window.h ===================================================== */
Definition element.h:181
Definition menu.c:37
Definition window.c:51
Definition workspace.c:48
Definition menu.h:44
Definition util.h:37
Definition window.h:44
Definition style.h:180
wlmtk_window_t * wlmtk_window_from_element(wlmtk_element_t *element_ptr)
Definition window.c:309
bool wlmtk_window_is_fullscreen(wlmtk_window_t *window_ptr)
Definition window.c:560
wlmtk_window_t * wlmtk_window_create(wlmtk_element_t *content_element_ptr, const wlmtk_window_style_t *style_ptr, const wlmtk_menu_style_t *menu_style_ptr)
Definition window.c:182
struct wlr_box wlmtk_window_get_size(wlmtk_window_t *window_ptr)
Definition window.c:494
uint32_t wlmtk_window_get_resize_edges(wlmtk_window_t *window_ptr)
Definition window.c:510
void wlmtk_window_commit_maximized(wlmtk_window_t *window_ptr, bool maximized)
Definition window.c:643
void wlmtk_window_destroy(wlmtk_window_t *window_ptr)
Definition window.c:258
void wlmtk_window_request_maximized(wlmtk_window_t *window_ptr, bool maximized)
Definition window.c:595
bool wlmtk_window_is_activated(wlmtk_window_t *window_ptr)
Definition window.c:457
void wlmtk_window_request_close(wlmtk_window_t *window_ptr)
Definition window.c:516
wlmtk_menu_t * wlmtk_window_menu(wlmtk_window_t *window_ptr)
Definition window.c:728
void wlmtk_window_set_properties(wlmtk_window_t *window_ptr, uint32_t properties)
Definition window.c:338
const bs_test_case_t wlmtk_window_test_cases[]
Definition window.c:1058
void wlmtk_window_set_activated(wlmtk_window_t *window_ptr, bool activated)
Definition window.c:433
void wlmtk_window_request_minimize(wlmtk_window_t *window_ptr)
Definition window.c:523
void wlmtk_window_position_changed(wlmtk_window_t *window_ptr)
Definition window.c:328
const char * wlmtk_window_get_title(wlmtk_window_t *window_ptr)
Definition window.c:426
void wlmtk_window_request_size(wlmtk_window_t *window_ptr, const struct wlr_box *box_ptr)
Definition window.c:463
wlmtk_workspace_t * wlmtk_window_get_workspace(wlmtk_window_t *window_ptr)
Definition window.c:756
bool wlmtk_window_is_maximized(wlmtk_window_t *window_ptr)
Definition window.c:637
wlmtk_window_property_t
Definition window.h:93
@ WLMTK_WINDOW_PROPERTY_RIGHTCLICK
Definition window.h:106
@ WLMTK_WINDOW_PROPERTY_ICONIFIABLE
Definition window.h:97
@ WLMTK_WINDOW_PROPERTY_CLOSABLE
Definition window.h:99
@ WLMTK_WINDOW_PROPERTY_RESIZABLE
Definition window.h:95
void wlmtk_window_set_client(wlmtk_window_t *window_ptr, const wlmtk_util_client_t *client_ptr)
Definition window.c:349
void wlmtk_window_menu_set_enabled(wlmtk_window_t *window_ptr, bool enabled)
Definition window.c:689
struct wlr_box wlmtk_window_get_bounding_box(wlmtk_window_t *window_ptr)
Definition window.c:316
void wlmtk_window_set_server_side_decorated(wlmtk_window_t *window_ptr, bool decorated)
Definition window.c:734
wlmtk_window_events_t * wlmtk_window_events(wlmtk_window_t *window_ptr)
Definition window.c:297
wlmtk_element_t * wlmtk_window_element(wlmtk_window_t *window_ptr)
Definition window.c:303
void wlmtk_window_set_wlr_output(wlmtk_window_t *window_ptr, struct wlr_output *wlr_output_ptr)
Definition window.c:364
bs_dllist_node_t * wlmtk_dlnode_from_window(wlmtk_window_t *window_ptr)
Definition window.c:762
void wlmtk_window_request_fullscreen(wlmtk_window_t *window_ptr, bool fullscreen)
Definition window.c:529
wlmtk_window_t * wlmtk_test_window_create(wlmtk_element_t *content_element_ptr)
Definition window.c:1090
void wlmtk_window_commit_fullscreen(wlmtk_window_t *window_ptr, bool fullscreen)
Definition window.c:566
void wlmtk_window_set_resize_edges(wlmtk_window_t *window_ptr, uint32_t edges)
Definition window.c:500
bool wlmtk_window_is_shaded(wlmtk_window_t *window_ptr)
Definition window.c:683
bool wlmtk_window_set_title(wlmtk_window_t *window_ptr, const char *title_ptr)
Definition window.c:395
const wlmtk_util_client_t * wlmtk_window_get_client_ptr(wlmtk_window_t *window_ptr)
Definition window.c:357
void wlmtk_window_set_workspace(wlmtk_window_t *window_ptr, wlmtk_workspace_t *workspace_ptr)
Definition window.c:745
void wlmtk_window_commit_size(wlmtk_window_t *window_ptr, int width, int height)
Definition window.c:477
void wlmtk_window_request_shaded(wlmtk_window_t *window_ptr, bool shaded)
Definition window.c:666
wlmtk_window_t * wlmtk_window_from_dlnode(bs_dllist_node_t *dlnode_ptr)
Definition window.c:768
struct wlr_output * wlmtk_window_get_wlr_output(wlmtk_window_t *window_ptr)
Definition window.c:372