2022-05-19 23:19:04 +03:00
|
|
|
/**
|
|
|
|
* @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;
|
2022-05-27 16:30:54 +03:00
|
|
|
typedef void (*FileBrowserCallback)(void* context);
|
2022-05-19 23:19:04 +03:00
|
|
|
|
2022-05-27 16:30:54 +03:00
|
|
|
FileBrowser* file_browser_alloc(string_ptr result_path);
|
2022-05-19 23:19:04 +03:00
|
|
|
|
|
|
|
void file_browser_free(FileBrowser* browser);
|
|
|
|
|
|
|
|
View* file_browser_get_view(FileBrowser* browser);
|
|
|
|
|
|
|
|
void file_browser_configure(
|
|
|
|
FileBrowser* browser,
|
2022-05-27 16:30:54 +03:00
|
|
|
const char* extension,
|
2022-05-19 23:19:04 +03:00
|
|
|
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
|