mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-26 23:05:05 +03:00
fc5c48edef
* GUI module submenu: fix documentation * GUI module submenu: add submenu_set_selected_item fn * App iButton: use submenu_set_selected_item to store and set selected item in submenu * App iButton: swap write and emulate in "saved key menu" scene * App iButton: file select can now switch to the previous selected file * App iButton: swap write and emulate indexes in "saved key menu" scene Co-authored-by: あく <alleteam@gmail.com>
27 lines
861 B
C
27 lines
861 B
C
#pragma once
|
|
#include <gui/view.h>
|
|
#include <filesystem-api.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct FileSelect FileSelect;
|
|
|
|
typedef void (*FileSelectCallback)(bool result, void* context);
|
|
|
|
FileSelect* file_select_alloc();
|
|
|
|
void file_select_free(FileSelect* file_select);
|
|
View* file_select_get_view(FileSelect* file_select);
|
|
|
|
void file_select_set_api(FileSelect* file_select, FS_Api* fs_api);
|
|
void file_select_set_callback(FileSelect* file_select, FileSelectCallback callback, void* context);
|
|
void file_select_set_filter(FileSelect* file_select, const char* path, const char* extension);
|
|
void file_select_set_result_buffer(FileSelect* file_select, char* buffer, uint8_t buffer_size);
|
|
bool file_select_init(FileSelect* file_select);
|
|
void file_select_set_selected_file(FileSelect* file_select, const char* filename);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif |