4bf29827f8
* Quicksave 1 * Header stage complete * Source stage complete * Lint & merge fixes * Includes * Documentation step 1 * FBT: output free size considering BT STACK * Documentation step 2 * py lint * Fix music player plugin * unit test stage 1: string allocator, mem, getters, setters, appends, compare, search. * unit test: string equality * unit test: string replace * unit test: string start_with, end_with * unit test: string trim * unit test: utf-8 * Rename * Revert fw_size changes * Simplify CLI backspace handling * Simplify CLI character insert * Merge fixes * Furi: correct filenaming and spelling * Bt: remove furi string include Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
64 lines
1.7 KiB
C
64 lines
1.7 KiB
C
#pragma once
|
|
|
|
#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,
|
|
FuriString* item_path,
|
|
bool is_folder,
|
|
bool is_last);
|
|
typedef void (*BrowserWorkerLongLoadCallback)(void* context);
|
|
|
|
BrowserWorker*
|
|
file_browser_worker_alloc(FuriString* 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,
|
|
FuriString* path,
|
|
const char* filter_ext,
|
|
bool skip_assets);
|
|
|
|
void file_browser_worker_folder_enter(BrowserWorker* browser, FuriString* 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
|