mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-09 05:49:09 -07:00
Merge branch 'ofw_dev' into dev p1
This commit is contained in:
@@ -248,7 +248,6 @@ void canvas_draw_bitmap(
|
||||
* @param x x coordinate
|
||||
* @param y y coordinate
|
||||
* @param icon Icon instance
|
||||
* @param flip IconFlip
|
||||
* @param rotation IconRotation
|
||||
*/
|
||||
void canvas_draw_icon_ex(
|
||||
|
||||
@@ -107,7 +107,7 @@ CanvasOrientation canvas_get_orientation(const Canvas* canvas);
|
||||
|
||||
/** Draw a u8g2 bitmap
|
||||
*
|
||||
* @param canvas Canvas instance
|
||||
* @param u8g2 u8g2 instance
|
||||
* @param x x coordinate
|
||||
* @param y y coordinate
|
||||
* @param width width
|
||||
|
||||
@@ -188,8 +188,7 @@ void elements_bubble(Canvas* canvas, uint8_t x, uint8_t y, uint8_t width, uint8_
|
||||
* @param canvas Canvas instance
|
||||
* @param x left x coordinates
|
||||
* @param y top y coordinate
|
||||
* @param width bubble width
|
||||
* @param height bubble height
|
||||
* @param text text to display
|
||||
* @param horizontal horizontal aligning
|
||||
* @param vertical aligning
|
||||
*/
|
||||
|
||||
@@ -114,7 +114,6 @@ void dialog_ex_set_text(
|
||||
* @param x x position
|
||||
* @param y y position
|
||||
* @param icon The icon
|
||||
* @param name icon to be shown
|
||||
*/
|
||||
void dialog_ex_set_icon(DialogEx* dialog_ex, uint8_t x, uint8_t y, const Icon* icon);
|
||||
|
||||
|
||||
@@ -108,7 +108,6 @@ bool scene_manager_handle_back_event(SceneManager* scene_manager);
|
||||
* Calls Scene event handler with Tick event parameter
|
||||
*
|
||||
* @param scene_manager SceneManager instance
|
||||
* @return true if event was consumed, false otherwise
|
||||
*/
|
||||
void scene_manager_handle_tick_event(SceneManager* scene_manager);
|
||||
|
||||
|
||||
@@ -34,44 +34,44 @@ typedef enum {
|
||||
typedef struct View View;
|
||||
|
||||
/** View Draw callback
|
||||
* @param canvas, pointer to canvas
|
||||
* @param view_model, pointer to context
|
||||
* @param canvas pointer to canvas
|
||||
* @param model pointer to model
|
||||
* @warning called from GUI thread
|
||||
*/
|
||||
typedef void (*ViewDrawCallback)(Canvas* canvas, void* model);
|
||||
|
||||
/** View Input callback
|
||||
* @param event, pointer to input event data
|
||||
* @param context, pointer to context
|
||||
* @param event pointer to input event data
|
||||
* @param context pointer to context
|
||||
* @return true if event handled, false if event ignored
|
||||
* @warning called from GUI thread
|
||||
*/
|
||||
typedef bool (*ViewInputCallback)(InputEvent* event, void* context);
|
||||
|
||||
/** View Custom callback
|
||||
* @param event, number of custom event
|
||||
* @param context, pointer to context
|
||||
* @param event number of custom event
|
||||
* @param context pointer to context
|
||||
* @return true if event handled, false if event ignored
|
||||
*/
|
||||
typedef bool (*ViewCustomCallback)(uint32_t event, void* context);
|
||||
|
||||
/** View navigation callback
|
||||
* @param context, pointer to context
|
||||
* @param context pointer to context
|
||||
* @return next view id
|
||||
* @warning called from GUI thread
|
||||
*/
|
||||
typedef uint32_t (*ViewNavigationCallback)(void* context);
|
||||
|
||||
/** View callback
|
||||
* @param context, pointer to context
|
||||
* @param context pointer to context
|
||||
* @warning called from GUI thread
|
||||
*/
|
||||
typedef void (*ViewCallback)(void* context);
|
||||
|
||||
/** View Update Callback Called upon model change, need to be propagated to GUI
|
||||
* throw ViewPort update
|
||||
* @param view, pointer to view
|
||||
* @param context, pointer to context
|
||||
* @param view pointer to view
|
||||
* @param context pointer to context
|
||||
* @warning called from GUI thread
|
||||
*/
|
||||
typedef void (*ViewUpdateCallback)(View* view, void* context);
|
||||
|
||||
@@ -44,7 +44,7 @@ View* view_stack_get_view(ViewStack* view_stack);
|
||||
* Adds View on top of ViewStack.
|
||||
*
|
||||
* @param view_stack instance
|
||||
* @view view view to add
|
||||
* @param view view to add
|
||||
*/
|
||||
void view_stack_add_view(ViewStack* view_stack, View* view);
|
||||
|
||||
@@ -52,7 +52,7 @@ void view_stack_add_view(ViewStack* view_stack, View* view);
|
||||
* If no View to remove found - ignore.
|
||||
*
|
||||
* @param view_stack instance
|
||||
* @view view view to remove
|
||||
* @param view view to remove
|
||||
*/
|
||||
void view_stack_remove_view(ViewStack* view_stack, View* view);
|
||||
|
||||
|
||||
@@ -339,7 +339,7 @@ FS_Error storage_common_merge(Storage* storage, const char* old_path, const char
|
||||
* @brief Create a directory.
|
||||
*
|
||||
* @param storage pointer to a storage API instance.
|
||||
* @param fs_path pointer to a zero-terminated string containing the directory path.
|
||||
* @param path pointer to a zero-terminated string containing the directory path.
|
||||
* @return FSE_OK if the directory has been successfully created, any other error code on failure.
|
||||
*/
|
||||
FS_Error storage_common_mkdir(Storage* storage, const char* path);
|
||||
@@ -366,7 +366,6 @@ FS_Error storage_common_fs_info(
|
||||
*
|
||||
* @param storage pointer to a storage API instance.
|
||||
* @param path pointer to a zero-terminated string containing the path in question.
|
||||
* @return true if the path was successfully resolved, false otherwise.
|
||||
*/
|
||||
void storage_common_resolve_path_and_ensure_app_directory(Storage* storage, FuriString* path);
|
||||
|
||||
@@ -526,7 +525,8 @@ FS_Error storage_int_backup(Storage* storage, const char* dstname);
|
||||
* @param converter pointer to a filename conversion function (may be NULL).
|
||||
* @return FSE_OK if the storage was successfully restored, any other error code on failure.
|
||||
*/
|
||||
FS_Error storage_int_restore(Storage* api, const char* dstname, Storage_name_converter converter);
|
||||
FS_Error
|
||||
storage_int_restore(Storage* storage, const char* dstname, Storage_name_converter converter);
|
||||
|
||||
/***************** Simplified Functions ******************/
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#include "storage.h"
|
||||
#include <toolbox/tar/tar_archive.h>
|
||||
|
||||
FS_Error storage_int_backup(Storage* api, const char* dstname) {
|
||||
TarArchive* archive = tar_archive_alloc(api);
|
||||
FS_Error storage_int_backup(Storage* storage, const char* dstname) {
|
||||
TarArchive* archive = tar_archive_alloc(storage);
|
||||
bool success = tar_archive_open(archive, dstname, TAR_OPEN_MODE_WRITE) &&
|
||||
tar_archive_add_dir(archive, STORAGE_INT_PATH_PREFIX, "") &&
|
||||
tar_archive_finalize(archive);
|
||||
@@ -11,8 +11,9 @@ FS_Error storage_int_backup(Storage* api, const char* dstname) {
|
||||
return success ? FSE_OK : FSE_INTERNAL;
|
||||
}
|
||||
|
||||
FS_Error storage_int_restore(Storage* api, const char* srcname, Storage_name_converter converter) {
|
||||
TarArchive* archive = tar_archive_alloc(api);
|
||||
FS_Error
|
||||
storage_int_restore(Storage* storage, const char* srcname, Storage_name_converter converter) {
|
||||
TarArchive* archive = tar_archive_alloc(storage);
|
||||
bool success = tar_archive_open(archive, srcname, TAR_OPEN_MODE_READ) &&
|
||||
tar_archive_unpack_to(archive, STORAGE_INT_PATH_PREFIX, converter);
|
||||
tar_archive_free(archive);
|
||||
|
||||
Reference in New Issue
Block a user