wlmaker
Loading...
Searching...
No Matches
include
toolkit
menu_item.h
Go to the documentation of this file.
1
/* ========================================================================= */
20
#ifndef __WLMTK_MENU_ITEM_H__
21
#define __WLMTK_MENU_ITEM_H__
22
23
#include <libbase/libbase.h>
24
#include <stdbool.h>
25
#include <wayland-server-core.h>
26
27
#include "
element.h
"
28
#include "
style.h
"
29
31
typedef
struct
_wlmtk_menu_item_t
wlmtk_menu_item_t
;
32
33
#include "
menu.h
"
// IWYU pragma: keep
34
36
typedef
struct
_wlmtk_menu_item_vmt_t
wlmtk_menu_item_vmt_t
;
37
39
typedef
enum
{
40
WLMTK_MENU_ITEM_ENABLED,
41
WLMTK_MENU_ITEM_HIGHLIGHTED,
42
WLMTK_MENU_ITEM_DISABLED
43
}
wlmtk_menu_item_state_t
;
44
46
typedef
struct
{
48
struct
wl_signal triggered;
50
struct
wl_signal destroy;
51
}
wlmtk_menu_item_events_t
;
52
53
#ifdef __cplusplus
54
extern
"C"
{
55
#endif
// __cplusplus
56
66
wlmtk_menu_item_t
*
wlmtk_menu_item_create
(
67
const
wlmtk_menu_item_style_t
*style_ptr);
68
74
void
wlmtk_menu_item_destroy
(
wlmtk_menu_item_t
*menu_item_ptr);
75
77
wlmtk_menu_item_events_t
*
wlmtk_menu_item_events
(
78
wlmtk_menu_item_t
*menu_item_ptr);
79
88
void
wlmtk_menu_item_set_parent_menu
(
89
wlmtk_menu_item_t
*menu_item_ptr,
90
wlmtk_menu_t
*menu_ptr);
91
102
void
wlmtk_menu_item_set_submenu
(
103
wlmtk_menu_item_t
*menu_item_ptr,
104
wlmtk_menu_t
*submenu_ptr);
105
113
wlmtk_menu_t
*
wlmtk_menu_item_get_submenu
(
114
wlmtk_menu_item_t
*menu_item_ptr);
115
122
void
wlmtk_menu_item_set_mode
(
123
wlmtk_menu_item_t
*menu_item_ptr,
124
enum
wlmtk_menu_mode
mode);
125
127
enum
wlmtk_menu_mode
wlmtk_menu_item_get_mode
(
128
wlmtk_menu_item_t
*menu_item_ptr);
129
131
wlmtk_menu_item_state_t
wlmtk_menu_item_get_state
(
132
wlmtk_menu_item_t
*menu_item_ptr);
133
140
bool
wlmtk_menu_item_set_text
(
141
wlmtk_menu_item_t
*menu_item_ptr,
142
const
char
*text_ptr);
143
150
void
wlmtk_menu_item_set_enabled
(
151
wlmtk_menu_item_t
*menu_item_ptr,
152
bool
enabled);
153
162
bool
wlmtk_menu_item_set_highlighted
(
163
wlmtk_menu_item_t
*menu_item_ptr,
164
bool
highlighted);
165
171
void
wlmtk_menu_item_trigger
(
wlmtk_menu_item_t
*menu_item_ptr);
172
174
bs_dllist_node_t *
wlmtk_dlnode_from_menu_item
(
175
wlmtk_menu_item_t
*menu_item_ptr);
176
178
wlmtk_menu_item_t
*
wlmtk_menu_item_from_dlnode
(bs_dllist_node_t *dlnode_ptr);
179
181
wlmtk_element_t
*
wlmtk_menu_item_element
(
wlmtk_menu_item_t
*menu_item_ptr);
182
184
extern
const
bs_test_case_t
wlmtk_menu_item_test_cases
[];
185
186
#ifdef __cplusplus
187
}
// extern "C"
188
#endif
// __cplusplus
189
190
#endif
/* __WLMTK_MENU_ITEM_H__ */
191
/* == End of menu_item.h =================================================== */
element.h
menu.h
wlmtk_menu_mode
wlmtk_menu_mode
Definition
menu.h:54
wlmtk_menu_item_vmt_t
struct _wlmtk_menu_item_vmt_t wlmtk_menu_item_vmt_t
Definition
menu_item.h:36
wlmtk_menu_item_create
wlmtk_menu_item_t * wlmtk_menu_item_create(const wlmtk_menu_item_style_t *style_ptr)
Definition
menu_item.c:155
wlmtk_menu_item_set_submenu
void wlmtk_menu_item_set_submenu(wlmtk_menu_item_t *menu_item_ptr, wlmtk_menu_t *submenu_ptr)
Definition
menu_item.c:263
wlmtk_menu_item_get_state
wlmtk_menu_item_state_t wlmtk_menu_item_get_state(wlmtk_menu_item_t *menu_item_ptr)
Definition
menu_item.c:327
wlmtk_menu_item_state_t
wlmtk_menu_item_state_t
Definition
menu_item.h:39
wlmtk_menu_item_set_highlighted
bool wlmtk_menu_item_set_highlighted(wlmtk_menu_item_t *menu_item_ptr, bool highlighted)
Definition
menu_item.c:375
wlmtk_menu_item_events
wlmtk_menu_item_events_t * wlmtk_menu_item_events(wlmtk_menu_item_t *menu_item_ptr)
Definition
menu_item.c:233
wlmtk_menu_item_set_enabled
void wlmtk_menu_item_set_enabled(wlmtk_menu_item_t *menu_item_ptr, bool enabled)
Definition
menu_item.c:348
wlmtk_menu_item_from_dlnode
wlmtk_menu_item_t * wlmtk_menu_item_from_dlnode(bs_dllist_node_t *dlnode_ptr)
Definition
menu_item.c:418
wlmtk_dlnode_from_menu_item
bs_dllist_node_t * wlmtk_dlnode_from_menu_item(wlmtk_menu_item_t *menu_item_ptr)
Definition
menu_item.c:409
wlmtk_menu_item_destroy
void wlmtk_menu_item_destroy(wlmtk_menu_item_t *menu_item_ptr)
Definition
menu_item.c:198
wlmtk_menu_item_set_parent_menu
void wlmtk_menu_item_set_parent_menu(wlmtk_menu_item_t *menu_item_ptr, wlmtk_menu_t *menu_ptr)
Definition
menu_item.c:240
wlmtk_menu_item_element
wlmtk_element_t * wlmtk_menu_item_element(wlmtk_menu_item_t *menu_item_ptr)
Definition
menu_item.c:426
wlmtk_menu_item_set_mode
void wlmtk_menu_item_set_mode(wlmtk_menu_item_t *menu_item_ptr, enum wlmtk_menu_mode mode)
Definition
menu_item.c:309
wlmtk_menu_item_trigger
void wlmtk_menu_item_trigger(wlmtk_menu_item_t *menu_item_ptr)
Definition
menu_item.c:390
wlmtk_menu_item_set_text
bool wlmtk_menu_item_set_text(wlmtk_menu_item_t *menu_item_ptr, const char *text_ptr)
Definition
menu_item.c:334
wlmtk_menu_item_test_cases
const bs_test_case_t wlmtk_menu_item_test_cases[]
Definition
menu_item.c:752
wlmtk_menu_item_get_mode
enum wlmtk_menu_mode wlmtk_menu_item_get_mode(wlmtk_menu_item_t *menu_item_ptr)
Definition
menu_item.c:320
wlmtk_menu_item_get_submenu
wlmtk_menu_t * wlmtk_menu_item_get_submenu(wlmtk_menu_item_t *menu_item_ptr)
Definition
menu_item.c:302
_wlmtk_element_t
Definition
element.h:181
_wlmtk_menu_item_t
Definition
menu_item.c:39
_wlmtk_menu_t
Definition
menu.c:37
wlmtk_menu_item_events_t
Definition
menu_item.h:46
wlmtk_menu_item_style_t
Definition
style.h:126
style.h
Generated by
1.9.8