mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-26 04:33:07 +00:00
23ff6723cf
* bt: update connection parameters * bt: set correct connection latency and timeout * gui popup: add clean method * furi_hal_bt: add connection parameters request, clear database * bt: add forget bonded devices API * bt_settings: add forget bonded devices GUI * bt: rework pin code show with view port to hide view * bt: support conn parameters for different profiles * furi_hal_bt: sync f6 target * target f6: fix build * bt: format sources * furi_hal_bt: update connection parameters * bt: update connection params, fix GUI * FuriHal: fix spelling * Refactoring: rename _clean to _reset Co-authored-by: あく <alleteam@gmail.com>
73 lines
1.3 KiB
C
Executable file
73 lines
1.3 KiB
C
Executable file
/**
|
|
* @file menu.h
|
|
* GUI: Menu view module API
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <gui/view.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/** Menu anonymous structure */
|
|
typedef struct Menu Menu;
|
|
|
|
/** Menu Item Callback */
|
|
typedef void (*MenuItemCallback)(void* context, uint32_t index);
|
|
|
|
/** Menu allocation and initialization
|
|
*
|
|
* @return Menu instance
|
|
*/
|
|
Menu* menu_alloc();
|
|
|
|
/** Free menu
|
|
*
|
|
* @param menu Menu instance
|
|
*/
|
|
void menu_free(Menu* menu);
|
|
|
|
/** Get Menu view
|
|
*
|
|
* @param menu Menu instance
|
|
*
|
|
* @return View instance
|
|
*/
|
|
View* menu_get_view(Menu* menu);
|
|
|
|
/** Add item to menu
|
|
*
|
|
* @param menu Menu instance
|
|
* @param label menu item string label
|
|
* @param icon IconAnimation instance
|
|
* @param index menu item index
|
|
* @param callback MenuItemCallback instance
|
|
* @param context pointer to context
|
|
*/
|
|
void menu_add_item(
|
|
Menu* menu,
|
|
const char* label,
|
|
const Icon* icon,
|
|
uint32_t index,
|
|
MenuItemCallback callback,
|
|
void* context);
|
|
|
|
/** Clean menu
|
|
* @note this function does not free menu instance
|
|
*
|
|
* @param menu Menu instance
|
|
*/
|
|
void menu_reset(Menu* menu);
|
|
|
|
/** Set current menu item
|
|
*
|
|
* @param menu Menu instance
|
|
* @param index The index
|
|
*/
|
|
void menu_set_selected_item(Menu* menu, uint32_t index);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|