wlmaker
Loading...
Searching...
No Matches
container.h
Go to the documentation of this file.
1/* ========================================================================= */
20#ifndef __WLMTK_CONTAINER_H__
21#define __WLMTK_CONTAINER_H__
22
23#include <stdbool.h>
24#include <wayland-server-core.h>
25
26#include "libbase/libbase.h"
27
28struct wlr_scene_tree;
33
34#include "element.h"
35#include "input.h"
36
37#ifdef __cplusplus
38extern "C" {
39#endif // __cplusplus
40
51 bool (*update_layout)(wlmtk_container_t *container_ptr);
52};
53
91
99bool wlmtk_container_init(wlmtk_container_t *container_ptr);
100
110 wlmtk_container_t *container_ptr,
111 const wlmtk_container_vmt_t *container_vmt_ptr);
112
122 wlmtk_container_t *container_ptr,
123 struct wlr_scene_tree *root_wlr_scene_tree_ptr);
124
133 wlmtk_container_t *container_ptr);
134
145 wlmtk_container_t *container_ptr,
146 wlmtk_element_t *element_ptr);
147
158 wlmtk_container_t *container_ptr,
159 wlmtk_element_t *reference_element_ptr,
160 wlmtk_element_t *element_ptr);
161
173 wlmtk_container_t *container_ptr,
174 wlmtk_element_t *element_ptr);
175
185 wlmtk_container_t *container_ptr,
186 wlmtk_element_t *element_ptr);
187
199// TODO(kaeser@gubbe.ch): Unify handling with pointer grab.
201 wlmtk_container_t *container_ptr,
202 wlmtk_element_t *element_ptr,
203 wlmtk_pointer_motion_event_t *motion_event_ptr);
204
217// TODO(kaeser@gubbe.ch): Merge with @ref wlmtk_container_request_pointer_focus.
219 wlmtk_container_t *container_ptr,
220 wlmtk_element_t *element_ptr);
221
233 wlmtk_container_t *container_ptr,
234 wlmtk_element_t *element_ptr);
235
236
252 wlmtk_container_t *container_ptr,
253 wlmtk_element_t *element_ptr,
254 bool enabled);
255
268 wlmtk_container_t *container_ptr);
269
279struct wlr_scene_tree *wlmtk_container_wlr_scene_tree(
280 wlmtk_container_t *container_ptr);
281
283extern const bs_test_case_t wlmtk_container_test_cases[];
284
289
290#ifdef __cplusplus
291} // extern "C"
292#endif // __cplusplus
293
294#endif /* __WLMTK_CONTAINER_H__ */
295/* == End of container.h =================================================== */
void wlmtk_container_set_keyboard_focus_element(wlmtk_container_t *container_ptr, wlmtk_element_t *element_ptr, bool enabled)
Definition container.c:380
void wlmtk_container_pointer_grab(wlmtk_container_t *container_ptr, wlmtk_element_t *element_ptr)
Definition container.c:329
void wlmtk_container_remove_element(wlmtk_container_t *container_ptr, wlmtk_element_t *element_ptr)
Definition container.c:233
bool wlmtk_container_request_pointer_focus(wlmtk_container_t *container_ptr, wlmtk_element_t *element_ptr, wlmtk_pointer_motion_event_t *motion_event_ptr)
Definition container.c:295
wlmtk_container_vmt_t wlmtk_container_extend(wlmtk_container_t *container_ptr, const wlmtk_container_vmt_t *container_vmt_ptr)
Definition container.c:138
void wlmtk_container_pointer_grab_release(wlmtk_container_t *container_ptr, wlmtk_element_t *element_ptr)
Definition container.c:359
void wlmtk_container_destroy_fake_parent(wlmtk_container_t *container_ptr)
Definition container.c:882
struct wlr_scene_tree * wlmtk_container_wlr_scene_tree(wlmtk_container_t *container_ptr)
Definition container.c:436
void wlmtk_container_add_element(wlmtk_container_t *container_ptr, wlmtk_element_t *element_ptr)
Definition container.c:176
void wlmtk_container_raise_element_to_top(wlmtk_container_t *container_ptr, wlmtk_element_t *element_ptr)
Definition container.c:270
void wlmtk_container_add_element_atop(wlmtk_container_t *container_ptr, wlmtk_element_t *reference_element_ptr, wlmtk_element_t *element_ptr)
Definition container.c:195
bool wlmtk_container_init(wlmtk_container_t *container_ptr)
Definition container.c:101
bool wlmtk_container_init_attached(wlmtk_container_t *container_ptr, struct wlr_scene_tree *root_wlr_scene_tree_ptr)
Definition container.c:119
void wlmtk_container_fini(wlmtk_container_t *container_ptr)
Definition container.c:152
const bs_test_case_t wlmtk_container_test_cases[]
Definition container.c:915
void wlmtk_container_update_layout_and_pointer_focus(wlmtk_container_t *container_ptr)
Definition container.c:412
wlmtk_container_t * wlmtk_container_create_fake_parent(void)
Definition container.c:857
Definition container.h:55
struct wl_listener element_pointer_leave_listener
Definition container.h:77
wlmtk_element_vmt_t orig_super_element_vmt
Definition container.h:59
wlmtk_element_t * keyboard_focus_element_ptr
Definition container.h:86
wlmtk_element_t * pointer_focus_element_ptr
Definition container.h:80
wlmtk_container_vmt_t vmt
Definition container.h:62
bs_dllist_t elements
Definition container.h:69
wlmtk_element_t super_element
Definition container.h:57
struct wlr_scene_tree * wlr_scene_tree_ptr
Definition container.h:72
wlmtk_element_t * pointer_grab_element_ptr
Definition container.h:82
struct wl_listener wlr_scene_tree_node_destroy_listener
Definition container.h:75
wlmtk_element_t * left_button_element_ptr
Definition container.h:84
Definition container.h:42
bool(* update_layout)(wlmtk_container_t *container_ptr)
Definition container.h:51
Definition element.h:181
Definition element.h:67
Definition input.h:74