unleashed-firmware/applications/services/gui/modules/file_browser_worker.h
SG b9a766d909 [FL-2627] Flipper applications: SDK, build and debug system (#1387)
* Added support for running applications from SD card (FAPs - Flipper Application Packages)
* Added plugin_dist target for fbt to build FAPs
* All apps of type FlipperAppType.EXTERNAL and FlipperAppType.PLUGIN are built as FAPs by default
* Updated VSCode configuration for new fbt features - re-deploy stock configuration to use them
* Added debugging support for FAPs with fbt debug & VSCode
* Added public firmware API with automated versioning

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2022-09-15 02:21:03 +09:00

64 lines
1.7 KiB
C

#pragma once
#include "m-string.h"
#include <gui/view.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct BrowserWorker BrowserWorker;
typedef void (*BrowserWorkerFolderOpenCallback)(
void* context,
uint32_t item_cnt,
int32_t file_idx,
bool is_root);
typedef void (*BrowserWorkerListLoadCallback)(void* context, uint32_t list_load_offset);
typedef void (*BrowserWorkerListItemCallback)(
void* context,
string_t item_path,
bool is_folder,
bool is_last);
typedef void (*BrowserWorkerLongLoadCallback)(void* context);
BrowserWorker* file_browser_worker_alloc(string_t path, const char* filter_ext, bool skip_assets);
void file_browser_worker_free(BrowserWorker* browser);
void file_browser_worker_set_callback_context(BrowserWorker* browser, void* context);
void file_browser_worker_set_folder_callback(
BrowserWorker* browser,
BrowserWorkerFolderOpenCallback cb);
void file_browser_worker_set_list_callback(
BrowserWorker* browser,
BrowserWorkerListLoadCallback cb);
void file_browser_worker_set_item_callback(
BrowserWorker* browser,
BrowserWorkerListItemCallback cb);
void file_browser_worker_set_long_load_callback(
BrowserWorker* browser,
BrowserWorkerLongLoadCallback cb);
void file_browser_worker_set_config(
BrowserWorker* browser,
string_t path,
const char* filter_ext,
bool skip_assets);
void file_browser_worker_folder_enter(BrowserWorker* browser, string_t path, int32_t item_idx);
void file_browser_worker_folder_exit(BrowserWorker* browser);
void file_browser_worker_folder_refresh(BrowserWorker* browser, int32_t item_idx);
void file_browser_worker_load(BrowserWorker* browser, uint32_t offset, uint32_t count);
#ifdef __cplusplus
}
#endif