wlmaker
Loading...
Searching...
No Matches
menu.h
Go to the documentation of this file.
1/* ========================================================================= */
20#ifndef __WLMTK_MENU_H__
21#define __WLMTK_MENU_H__
22
25
26enum wlmtk_menu_mode; // IWYU pragma: keep
27
28#include <libbase/libbase.h>
29#include <stdbool.h>
30#include <stddef.h>
31#include <wayland-server-core.h>
32
33#include "base.h"
34#include "box.h" // IWYU pragma: keep
35#include "element.h"
36#include "menu_item.h" // IWYU pragma: keep
37#include "style.h"
38
39#ifdef __cplusplus
40extern "C" {
41#endif // __cplusplus
42
52
63
65typedef struct {
70 struct wl_signal open_changed;
72 struct wl_signal request_close;
74 struct wl_signal destroy;
76
85 const wlmtk_menu_style_t *style_ptr);
86
92void wlmtk_menu_destroy(wlmtk_menu_t *menu_ptr);
93
96
99
102
110void wlmtk_menu_set_open(wlmtk_menu_t *menu_ptr, bool opened);
111
113bool wlmtk_menu_is_open(wlmtk_menu_t *menu_ptr);
114
121void wlmtk_menu_set_mode(wlmtk_menu_t *menu_ptr,
122 enum wlmtk_menu_mode mode);
123
126
133void wlmtk_menu_add_item(wlmtk_menu_t *menu_ptr,
134 wlmtk_menu_item_t *menu_item_ptr);
135
143 wlmtk_menu_item_t *menu_item_ptr);
144
154 wlmtk_menu_item_t *menu_item_ptr);
155
158
166 wlmtk_menu_t *menu_ptr,
167 wlmtk_menu_item_t *menu_item_ptr);
168
174size_t wlmtk_menu_items_size(wlmtk_menu_t *menu_ptr);
175
184
186extern const bs_test_case_t wlmtk_menu_test_cases[];
187
188#ifdef __cplusplus
189} // extern "C"
190#endif // __cplusplus
191
192#endif /* __WLMTK_MENU_H__ */
193/* == End of menu.h ======================================================== */
size_t wlmtk_menu_items_size(wlmtk_menu_t *menu_ptr)
Definition menu.c:270
enum wlmtk_menu_mode wlmtk_menu_get_mode(wlmtk_menu_t *menu_ptr)
Definition menu.c:202
void wlmtk_menu_add_item(wlmtk_menu_t *menu_ptr, wlmtk_menu_item_t *menu_item_ptr)
Definition menu.c:208
void wlmtk_menu_set_parent_item(wlmtk_menu_t *menu_ptr, wlmtk_menu_item_t *menu_item_ptr)
Definition menu.c:238
wlmtk_menu_mode
Definition menu.h:54
@ WLMTK_MENU_MODE_RIGHTCLICK
Definition menu.h:61
@ WLMTK_MENU_MODE_NORMAL
Definition menu.h:56
void wlmtk_menu_destroy(wlmtk_menu_t *menu_ptr)
Definition menu.c:135
wlmtk_menu_events_t * wlmtk_menu_events(wlmtk_menu_t *menu_ptr)
Definition menu.c:162
wlmtk_menu_t * wlmtk_menu_create(const wlmtk_menu_style_t *style_ptr)
Definition menu.c:100
void wlmtk_menu_request_item_highlight(wlmtk_menu_t *menu_ptr, wlmtk_menu_item_t *menu_item_ptr)
Definition menu.c:251
wlmtk_menu_item_t * wlmtk_menu_item_at(wlmtk_menu_t *menu_ptr, size_t i)
Definition menu.c:276
void wlmtk_menu_remove_item(wlmtk_menu_t *menu_ptr, wlmtk_menu_item_t *menu_item_ptr)
Definition menu.c:222
void wlmtk_menu_set_mode(wlmtk_menu_t *menu_ptr, enum wlmtk_menu_mode mode)
Definition menu.c:190
const bs_test_case_t wlmtk_menu_test_cases[]
Definition menu.c:502
wlmtk_menu_item_t * wlmtk_menu_get_parent_item(wlmtk_menu_t *menu_ptr)
Definition menu.c:245
wlmtk_element_t * wlmtk_menu_element(wlmtk_menu_t *menu_ptr)
Definition menu.c:150
void wlmtk_menu_set_open(wlmtk_menu_t *menu_ptr, bool opened)
Definition menu.c:168
bool wlmtk_menu_is_open(wlmtk_menu_t *menu_ptr)
Definition menu.c:184
wlmtk_base_t * wlmtk_menu_base(wlmtk_menu_t *menu_ptr)
Definition menu.c:156
Definition base.h:37
Definition element.h:181
Definition menu_item.c:39
Definition menu.c:37
Definition style.h:112
Definition menu.h:65
Definition style.h:126
Definition menu.h:44
wlmtk_margin_style_t border
Definition menu.h:48
wlmtk_margin_style_t margin
Definition menu.h:46
wlmtk_menu_item_style_t item
Definition menu.h:50