mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-25 20:23:07 +00:00
79920a3522
* File browser module and test app * nfc: Add support for saved files in subdirectories * nfc: Use helper function to get shadow path when loading data * File browser dialog integration pt.1 * File browser dialog integration pt.2 * Gui,Dialogs: drop file select * Correct use of dynamic string_t(string_ptr) Co-authored-by: Yukai Li <yukaili.geek@gmail.com> Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
39 lines
808 B
C
39 lines
808 B
C
/**
|
|
* @file file_browser.h
|
|
* GUI: FileBrowser view module API
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "m-string.h"
|
|
#include <gui/view.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct FileBrowser FileBrowser;
|
|
typedef void (*FileBrowserCallback)(void* context);
|
|
|
|
FileBrowser* file_browser_alloc(string_ptr result_path);
|
|
|
|
void file_browser_free(FileBrowser* browser);
|
|
|
|
View* file_browser_get_view(FileBrowser* browser);
|
|
|
|
void file_browser_configure(
|
|
FileBrowser* browser,
|
|
const char* extension,
|
|
bool skip_assets,
|
|
const Icon* file_icon,
|
|
bool hide_ext);
|
|
|
|
void file_browser_start(FileBrowser* browser, string_t path);
|
|
|
|
void file_browser_stop(FileBrowser* browser);
|
|
|
|
void file_browser_set_callback(FileBrowser* browser, FileBrowserCallback callback, void* context);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|