2022-05-27 11:19:21 +00:00
|
|
|
#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,
|
2022-10-05 15:15:23 +00:00
|
|
|
FuriString* item_path,
|
2022-05-27 11:19:21 +00:00
|
|
|
bool is_folder,
|
|
|
|
bool is_last);
|
|
|
|
typedef void (*BrowserWorkerLongLoadCallback)(void* context);
|
|
|
|
|
2022-12-07 10:52:44 +00:00
|
|
|
BrowserWorker* file_browser_worker_alloc(
|
|
|
|
FuriString* path,
|
2022-12-07 14:17:41 +00:00
|
|
|
const char* base_path,
|
[FL-3579, FL-3601, FL-3714] JavaScript runner (#3286)
* FBT: cdefines to env, libs order
* API: strtod, modf, itoa, calloc
* Apps: elk js
* Apps: mjs
* JS: scripts as assets
* mjs: composite resolver
* mjs: stack trace
* ELK JS example removed
* MJS thread, MJS lib modified to support script interruption
* JS console UI
* Module system, BadUSB bindings rework
* JS notifications, simple dialog, BadUSB demo
* Custom dialogs, dialog demo
* MJS as system library, some dirty hacks to make it compile
* Plugin-based js modules
* js_uart(BadUART) module
* js_uart: support for byte array arguments
* Script icon and various fixes
* File browser: multiple extensions filter, running js scripts from app loader
* Running js scripts from archive browser
* JS Runner as system app
* Example scripts moved to /ext/apps/Scripts
* JS bytecode listing generation
* MJS builtin printf cleanup
* JS examples cleanup
* mbedtls version fix
* Unused lib cleanup
* Making PVS happy & TODOs cleanup
* TODOs cleanup #2
* MJS: initial typed arrays support
* JS: fix mem leak in uart destructor
Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-02-12 08:54:32 +00:00
|
|
|
const char* ext_filter,
|
2022-12-07 10:52:44 +00:00
|
|
|
bool skip_assets,
|
|
|
|
bool hide_dot_files);
|
2022-05-27 11:19:21 +00:00
|
|
|
|
|
|
|
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);
|
|
|
|
|
2022-06-09 07:09:52 +00:00
|
|
|
void file_browser_worker_set_config(
|
|
|
|
BrowserWorker* browser,
|
2022-10-05 15:15:23 +00:00
|
|
|
FuriString* path,
|
[FL-3579, FL-3601, FL-3714] JavaScript runner (#3286)
* FBT: cdefines to env, libs order
* API: strtod, modf, itoa, calloc
* Apps: elk js
* Apps: mjs
* JS: scripts as assets
* mjs: composite resolver
* mjs: stack trace
* ELK JS example removed
* MJS thread, MJS lib modified to support script interruption
* JS console UI
* Module system, BadUSB bindings rework
* JS notifications, simple dialog, BadUSB demo
* Custom dialogs, dialog demo
* MJS as system library, some dirty hacks to make it compile
* Plugin-based js modules
* js_uart(BadUART) module
* js_uart: support for byte array arguments
* Script icon and various fixes
* File browser: multiple extensions filter, running js scripts from app loader
* Running js scripts from archive browser
* JS Runner as system app
* Example scripts moved to /ext/apps/Scripts
* JS bytecode listing generation
* MJS builtin printf cleanup
* JS examples cleanup
* mbedtls version fix
* Unused lib cleanup
* Making PVS happy & TODOs cleanup
* TODOs cleanup #2
* MJS: initial typed arrays support
* JS: fix mem leak in uart destructor
Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-02-12 08:54:32 +00:00
|
|
|
const char* ext_filter,
|
2022-12-07 10:52:44 +00:00
|
|
|
bool skip_assets,
|
|
|
|
bool hide_dot_files);
|
2022-06-09 07:09:52 +00:00
|
|
|
|
2022-10-05 15:15:23 +00:00
|
|
|
void file_browser_worker_folder_enter(BrowserWorker* browser, FuriString* path, int32_t item_idx);
|
2022-05-27 11:19:21 +00:00
|
|
|
|
2022-11-28 18:59:24 +00:00
|
|
|
bool file_browser_worker_is_in_start_folder(BrowserWorker* browser);
|
|
|
|
|
2022-05-27 11:19:21 +00:00
|
|
|
void file_browser_worker_folder_exit(BrowserWorker* browser);
|
|
|
|
|
2022-06-09 07:09:52 +00:00
|
|
|
void file_browser_worker_folder_refresh(BrowserWorker* browser, int32_t item_idx);
|
|
|
|
|
2022-05-27 11:19:21 +00:00
|
|
|
void file_browser_worker_load(BrowserWorker* browser, uint32_t offset, uint32_t count);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|