Loading...
Searching...
No Matches
file_browser_worker.h
1#pragma once
2
3#include <gui/view.h>
4#include <stdint.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10typedef struct BrowserWorker BrowserWorker;
11typedef void (*BrowserWorkerFolderOpenCallback)(
12 void* context,
13 uint32_t item_cnt,
14 int32_t file_idx,
15 bool is_root);
16typedef void (*BrowserWorkerListLoadCallback)(void* context, uint32_t list_load_offset);
17typedef void (*BrowserWorkerListItemCallback)(
18 void* context,
19 FuriString* item_path,
20 bool is_folder,
21 bool is_last);
22typedef void (*BrowserWorkerLongLoadCallback)(void* context);
23
24BrowserWorker* file_browser_worker_alloc(
25 FuriString* path,
26 const char* base_path,
27 const char* ext_filter,
28 bool skip_assets,
29 bool hide_dot_files);
30
31void file_browser_worker_free(BrowserWorker* browser);
32
33void file_browser_worker_set_callback_context(BrowserWorker* browser, void* context);
34
35void file_browser_worker_set_folder_callback(
36 BrowserWorker* browser,
37 BrowserWorkerFolderOpenCallback cb);
38
39void file_browser_worker_set_list_callback(
40 BrowserWorker* browser,
41 BrowserWorkerListLoadCallback cb);
42
43void file_browser_worker_set_item_callback(
44 BrowserWorker* browser,
45 BrowserWorkerListItemCallback cb);
46
47void file_browser_worker_set_long_load_callback(
48 BrowserWorker* browser,
49 BrowserWorkerLongLoadCallback cb);
50
51void file_browser_worker_set_config(
52 BrowserWorker* browser,
53 FuriString* path,
54 const char* ext_filter,
55 bool skip_assets,
56 bool hide_dot_files);
57
58void file_browser_worker_folder_enter(BrowserWorker* browser, FuriString* path, int32_t item_idx);
59
60bool file_browser_worker_is_in_start_folder(BrowserWorker* browser);
61
62void file_browser_worker_folder_exit(BrowserWorker* browser);
63
64void file_browser_worker_folder_refresh(BrowserWorker* browser, int32_t item_idx);
65
66void file_browser_worker_load(BrowserWorker* browser, uint32_t offset, uint32_t count);
67
68#ifdef __cplusplus
69}
70#endif
Definition file_browser_worker.c:38
Definition string.c:4
GUI: View API.