Flipper Developer Docs
Loading...
Searching...
No Matches
menu.h
Go to the documentation of this file.
1
6
#pragma once
7
8
#include <
gui/view.h
>
9
10
#ifdef __cplusplus
11
extern
"C"
{
12
#endif
13
15
typedef
struct
Menu
Menu
;
16
18
typedef
void (*
MenuItemCallback
)(
void
* context, uint32_t index);
19
24
Menu
*
menu_alloc
(
void
);
25
30
void
menu_free
(
Menu
* menu);
31
38
View
*
menu_get_view
(
Menu
* menu);
39
49
void
menu_add_item
(
50
Menu
* menu,
51
const
char
* label,
52
const
Icon
* icon,
53
uint32_t index,
54
MenuItemCallback
callback,
55
void
* context);
56
62
void
menu_reset
(
Menu
* menu);
63
69
void
menu_set_selected_item
(
Menu
* menu, uint32_t index);
70
71
#ifdef __cplusplus
72
}
73
#endif
MenuItemCallback
void(* MenuItemCallback)(void *context, uint32_t index)
Menu Item Callback.
Definition
menu.h:18
menu_reset
void menu_reset(Menu *menu)
Clean menu.
Definition
menu.c:189
menu_alloc
Menu * menu_alloc(void)
Menu allocation and initialization.
Definition
menu.c:126
menu_free
void menu_free(Menu *menu)
Free menu.
Definition
menu.c:148
menu_get_view
View * menu_get_view(Menu *menu)
Get Menu view.
Definition
menu.c:158
menu_add_item
void menu_add_item(Menu *menu, const char *label, const Icon *icon, uint32_t index, MenuItemCallback callback, void *context)
Add item to menu.
Definition
menu.c:163
menu_set_selected_item
void menu_set_selected_item(Menu *menu, uint32_t index)
Set current menu item.
Definition
menu.c:207
Icon
Definition
icon_i.h:9
Menu
Definition
menu.c:8
View
Definition
view_i.h:16
view.h
GUI: View API.
applications
services
gui
modules
menu.h
Generated by
1.12.0