wlmaker
Loading...
Searching...
No Matches
panel.h
Go to the documentation of this file.
1/* ========================================================================= */
20#ifndef __WLMTK_PANEL_H__
21#define __WLMTK_PANEL_H__
22
23#include <libbase/libbase.h>
24#include <stdbool.h>
25#include <stdint.h>
26
27#include "container.h"
28#include "element.h"
29
36
37#include "layer.h" // IWYU pragma: keep
38
39#ifdef __cplusplus
40extern "C" {
41#endif // __cplusplus
42
58 uint32_t (*request_size)(
59 wlmtk_panel_t *panel_ptr,
60 int width,
61 int height);
62};
63
85
109
119 wlmtk_panel_t *panel_ptr,
120 const wlmtk_panel_positioning_t *positioning_ptr);
121
127void wlmtk_panel_fini(wlmtk_panel_t *panel_ptr);
128
138 wlmtk_panel_t *panel_ptr,
139 const wlmtk_panel_vmt_t *panel_vmt_ptr);
140
143
145bs_dllist_node_t *wlmtk_dlnode_from_panel(wlmtk_panel_t *panel_ptr);
147wlmtk_panel_t *wlmtk_panel_from_dlnode(bs_dllist_node_t *dlnode_ptr);
148
158 wlmtk_layer_t *layer_ptr);
159
162
172 wlmtk_panel_t *panel_ptr,
173 wlmtk_layer_output_t *layer_output_ptr);
174
177
179static inline uint32_t wlmtk_panel_request_size(
180 wlmtk_panel_t *panel_ptr,
181 int width,
182 int height) {
183 return panel_ptr->vmt.request_size(panel_ptr, width, height);
184}
185
194 wlmtk_panel_t *panel_ptr,
195 uint32_t serial,
196 const wlmtk_panel_positioning_t *positioning_ptr);
197
212struct wlr_box wlmtk_panel_compute_dimensions(
213 const wlmtk_panel_t *panel_ptr,
214 const struct wlr_box *full_area_ptr,
215 struct wlr_box *usable_area_ptr);
216
218extern const bs_test_case_t wlmtk_panel_test_cases[];
219
235 const wlmtk_panel_positioning_t *positioning_ptr);
237void wlmtk_fake_panel_destroy(wlmtk_fake_panel_t *fake_panel_ptr);
238
239#ifdef __cplusplus
240} // extern "C"
241#endif // __cplusplus
242
243#endif /* __WLMTK_PANEL_H__ */
244/* == End of panel.h ======================================================= */
void wlmtk_panel_commit(wlmtk_panel_t *panel_ptr, uint32_t serial, const wlmtk_panel_positioning_t *positioning_ptr)
Definition panel.c:135
struct wlr_box wlmtk_panel_compute_dimensions(const wlmtk_panel_t *panel_ptr, const struct wlr_box *full_area_ptr, struct wlr_box *usable_area_ptr)
Definition panel.c:158
wlmtk_element_t * wlmtk_panel_element(wlmtk_panel_t *panel_ptr)
Definition panel.c:85
void wlmtk_panel_set_layer_output(wlmtk_panel_t *panel_ptr, wlmtk_layer_output_t *layer_output_ptr)
Definition panel.c:121
const bs_test_case_t wlmtk_panel_test_cases[]
Definition panel.c:315
bs_dllist_node_t * wlmtk_dlnode_from_panel(wlmtk_panel_t *panel_ptr)
Definition panel.c:91
void wlmtk_fake_panel_destroy(wlmtk_fake_panel_t *fake_panel_ptr)
Definition panel.c:280
wlmtk_panel_t * wlmtk_panel_from_dlnode(bs_dllist_node_t *dlnode_ptr)
Definition panel.c:98
bool wlmtk_panel_init(wlmtk_panel_t *panel_ptr, const wlmtk_panel_positioning_t *positioning_ptr)
Definition panel.c:35
void wlmtk_panel_fini(wlmtk_panel_t *panel_ptr)
Definition panel.c:59
void wlmtk_panel_set_layer(wlmtk_panel_t *panel_ptr, wlmtk_layer_t *layer_ptr)
Definition panel.c:105
wlmtk_panel_vmt_t wlmtk_panel_extend(wlmtk_panel_t *panel_ptr, const wlmtk_panel_vmt_t *panel_vmt_ptr)
Definition panel.c:71
static uint32_t wlmtk_panel_request_size(wlmtk_panel_t *panel_ptr, int width, int height)
Definition panel.h:179
wlmtk_layer_output_t * wlmtk_panel_get_layer_output(wlmtk_panel_t *panel_ptr)
Definition panel.c:129
wlmtk_fake_panel_t * wlmtk_fake_panel_create(const wlmtk_panel_positioning_t *positioning_ptr)
Definition panel.c:260
wlmtk_layer_t * wlmtk_panel_get_layer(wlmtk_panel_t *panel_ptr)
Definition panel.c:115
Definition container.h:55
Definition container.h:42
Definition element.h:181
Definition panel.h:223
int requested_width
Definition panel.h:229
uint32_t serial
Definition panel.h:227
wlmtk_panel_t panel
Definition panel.h:225
int requested_height
Definition panel.h:231
Definition layer.c:62
Definition layer.c:43
Definition panel.h:65
int margin_top
Definition panel.h:78
int desired_width
Definition panel.h:67
uint32_t anchor
Definition panel.h:71
int desired_height
Definition panel.h:69
int margin_right
Definition panel.h:76
int margin_bottom
Definition panel.h:80
int exclusive_zone
Definition panel.h:83
int margin_left
Definition panel.h:74
Definition panel.h:87
wlmtk_layer_output_t * layer_output_ptr
Definition panel.h:102
wlmtk_panel_vmt_t vmt
Definition panel.h:91
bs_dllist_node_t dlnode
Definition panel.h:104
wlmtk_container_t popup_container
Definition panel.h:97
wlmtk_container_t super_container
Definition panel.h:89
wlmtk_layer_t * layer_ptr
Definition panel.h:100
wlmtk_container_vmt_t orig_super_container_vmt
Definition panel.h:94
wlmtk_panel_positioning_t positioning
Definition panel.h:107
Definition panel.h:44
uint32_t(* request_size)(wlmtk_panel_t *panel_ptr, int width, int height)
Definition panel.h:58