diff --git a/applications/services/desktop/animations/animation_manager.c b/applications/services/desktop/animations/animation_manager.c index 0d079e213..88ec09fce 100644 --- a/applications/services/desktop/animations/animation_manager.c +++ b/applications/services/desktop/animations/animation_manager.c @@ -55,6 +55,7 @@ struct AnimationManager { FuriString* freezed_animation_name; int32_t freezed_animation_time_left; ViewStack* view_stack; + bool _dummy_mode; // Unused, kept for compatibility }; static StorageAnimation* diff --git a/applications/services/desktop/desktop_i.h b/applications/services/desktop/desktop_i.h index 753c0b7b4..b1cc2ef42 100644 --- a/applications/services/desktop/desktop_i.h +++ b/applications/services/desktop/desktop_i.h @@ -55,10 +55,10 @@ struct Desktop { ViewStack* locked_view_stack; DesktopSettings settings; - Keybind keybinds[KeybindTypeCount][KeybindKeyCount]; DesktopViewPinInput* pin_input_view; ViewPort* lock_icon_viewport; + ViewPort* _dummy_mode_icon_viewport; // Unused, kept for compatibility ViewPort* clock_viewport; ViewPort* stealth_mode_icon_viewport; @@ -80,6 +80,8 @@ struct Desktop { bool time_format_12 : 1; // 1 - 12 hour, 0 - 24H bool in_transition : 1; + + Keybind keybinds[KeybindTypeCount][KeybindKeyCount]; }; Desktop* desktop_alloc(); diff --git a/applications/services/desktop/views/desktop_events.h b/applications/services/desktop/views/desktop_events.h index 4848e041a..c22d8c115 100644 --- a/applications/services/desktop/views/desktop_events.h +++ b/applications/services/desktop/views/desktop_events.h @@ -1,15 +1,22 @@ #pragma once typedef enum { + // Events with _ are unused, kept for compatibility + DesktopMainEventLockWithPin, DesktopMainEventOpenLockMenu, DesktopMainEventOpenArchive, + _DesktopMainEventOpenFavoriteLeftShort, + _DesktopMainEventOpenFavoriteLeftLong, + _DesktopMainEventOpenFavoriteRightShort, + _DesktopMainEventOpenFavoriteRightLong, DesktopMainEventOpenMenu, DesktopMainEventOpenDebug, DesktopMainEventOpenPowerOff, - DesktopMainEventLockKeypad, - DesktopMainEventLockWithPin, - DesktopLockedEventOpenPowerOff, + _DesktopDummyEventOpenLeft, + _DesktopDummyEventOpenDown, + _DesktopDummyEventOpenOk, + DesktopLockedEventUnlocked, DesktopLockedEventUpdate, DesktopLockedEventShowPinInput, @@ -27,11 +34,9 @@ typedef enum { DesktopDebugEventSaveState, DesktopDebugEventExit, - DesktopLockMenuEventSettings, - DesktopLockMenuEventLock, DesktopLockMenuEventLockPin, - DesktopLockMenuEventLockPinOff, - DesktopLockMenuEventXtreme, + _DesktopLockMenuEventDummyModeOn, + _DesktopLockMenuEventDummyModeOff, DesktopLockMenuEventStealthModeOn, DesktopLockMenuEventStealthModeOff, @@ -46,4 +51,11 @@ typedef enum { DesktopGlobalBeforeAppStarted, DesktopGlobalAfterAppFinished, DesktopGlobalAutoLock, + + DesktopMainEventLockKeypad, + DesktopLockedEventOpenPowerOff, + DesktopLockMenuEventSettings, + DesktopLockMenuEventLock, + DesktopLockMenuEventLockPinOff, + DesktopLockMenuEventXtreme, } DesktopEvent; diff --git a/applications/services/desktop/views/desktop_view_lock_menu.h b/applications/services/desktop/views/desktop_view_lock_menu.h index 67d0f6f67..78b981c50 100644 --- a/applications/services/desktop/views/desktop_view_lock_menu.h +++ b/applications/services/desktop/views/desktop_view_lock_menu.h @@ -14,21 +14,24 @@ typedef void (*DesktopLockMenuViewCallback)(DesktopEvent event, void* context); struct DesktopLockMenuView { View* view; DesktopLockMenuViewCallback callback; + void* context; + NotificationApp* notification; Bt* bt; bool save_notification; bool save_xtreme; bool save_bt; - void* context; }; typedef struct { uint8_t idx; + bool _dummy_mode; // Unused, kept for compatibility + bool stealth_mode; + bool pin_is_set; int pin_lock; bool show_lock_menu; DesktopLockMenuView* lock_menu; - bool stealth_mode; } DesktopLockMenuViewModel; void desktop_lock_menu_set_callback( diff --git a/applications/services/desktop/views/desktop_view_main.c b/applications/services/desktop/views/desktop_view_main.c index 2cf1f6881..1b8518aa1 100644 --- a/applications/services/desktop/views/desktop_view_main.c +++ b/applications/services/desktop/views/desktop_view_main.c @@ -13,6 +13,8 @@ struct DesktopMainView { View* view; DesktopMainViewCallback callback; void* context; + TimerHandle_t _poweroff_timer; // Unused, kept for compatibility + bool _dummy_mode; // Unused, kept for compatibility }; void desktop_main_set_callback( diff --git a/applications/services/gui/gui_i.h b/applications/services/gui/gui_i.h index 563696996..c7aa5ddda 100644 --- a/applications/services/gui/gui_i.h +++ b/applications/services/gui/gui_i.h @@ -62,7 +62,6 @@ struct Gui { FuriMutex* mutex; // Layers and Canvas - uint16_t hide_statusbar_count; bool lockdown; bool direct_draw; ViewPortArray_t layers[GuiLayerMAX]; @@ -74,6 +73,8 @@ struct Gui { FuriPubSub* input_events; uint8_t ongoing_input; ViewPort* ongoing_input_view_port; + + uint16_t hide_statusbar_count; }; /** Find enabled ViewPort in ViewPortArray diff --git a/applications/services/gui/icon_i.h b/applications/services/gui/icon_i.h index 1fa6d523f..f48d30696 100644 --- a/applications/services/gui/icon_i.h +++ b/applications/services/gui/icon_i.h @@ -12,5 +12,6 @@ struct Icon { const uint8_t frame_count; const uint8_t frame_rate; const uint8_t* const* frames; + Icon* original; }; diff --git a/applications/services/gui/modules/menu.c b/applications/services/gui/modules/menu.c index b21427d43..7fbc69d9b 100644 --- a/applications/services/gui/modules/menu.c +++ b/applications/services/gui/modules/menu.c @@ -14,6 +14,7 @@ struct Menu { View* view; + FuriTimer* scroll_timer; }; @@ -32,6 +33,7 @@ ARRAY_DEF(MenuItemArray, MenuItem, M_POD_OPLIST); typedef struct { MenuItemArray_t items; size_t position; + size_t scroll_counter; size_t vertical_offset; } MenuModel; diff --git a/applications/services/gui/modules/text_input.c b/applications/services/gui/modules/text_input.c index 26b88670e..2df6e5a05 100644 --- a/applications/services/gui/modules/text_input.c +++ b/applications/services/gui/modules/text_input.c @@ -24,24 +24,24 @@ typedef struct { const char* header; char* text_buffer; size_t text_buffer_size; - size_t minimum_length; - char extra_symbols[9]; bool clear_default_text; - bool cursor_select; - size_t cursor_pos; - TextInputCallback callback; void* callback_context; uint8_t selected_row; uint8_t selected_column; - uint8_t selected_keyboard; TextInputValidatorCallback validator_callback; void* validator_callback_context; FuriString* validator_text; bool validator_message_visible; + + size_t minimum_length; + char extra_symbols[9]; + bool cursor_select; + size_t cursor_pos; + uint8_t selected_keyboard; } TextInputModel; static const uint8_t keyboard_origin_x = 1; diff --git a/applications/services/gui/modules/variable_item_list.c b/applications/services/gui/modules/variable_item_list.c index df27668f0..d58441bd7 100644 --- a/applications/services/gui/modules/variable_item_list.c +++ b/applications/services/gui/modules/variable_item_list.c @@ -12,9 +12,10 @@ struct VariableItem { FuriString* current_value_text; uint8_t values_count; VariableItemChangeCallback change_callback; + void* context; + bool locked; FuriString* locked_message; - void* context; }; ARRAY_DEF(VariableItemArray, VariableItem, M_POD_OPLIST); @@ -23,15 +24,17 @@ struct VariableItemList { View* view; VariableItemListEnterCallback callback; void* context; + FuriTimer* scroll_timer; FuriTimer* locked_timer; }; typedef struct { VariableItemArray_t items; - FuriString* header; uint8_t position; uint8_t window_position; + + FuriString* header; size_t scroll_counter; bool locked_message_visible; } VariableItemListModel; diff --git a/applications/services/loader/loader_i.h b/applications/services/loader/loader_i.h index c33e6d101..d8b4d235c 100644 --- a/applications/services/loader/loader_i.h +++ b/applications/services/loader/loader_i.h @@ -20,20 +20,22 @@ struct Loader { LoaderMenu* loader_menu; LoaderApplications* loader_applications; LoaderAppData app; + MenuAppList_t menu_apps; }; typedef enum { LoaderMessageTypeStartByName, - LoaderMessageTypeStartByNameDetachedWithGuiError, LoaderMessageTypeAppClosed, LoaderMessageTypeShowMenu, - LoaderMessageTypeShowSettings, LoaderMessageTypeMenuClosed, LoaderMessageTypeApplicationsClosed, LoaderMessageTypeLock, LoaderMessageTypeUnlock, LoaderMessageTypeIsLocked, + + LoaderMessageTypeStartByNameDetachedWithGuiError, + LoaderMessageTypeShowSettings, } LoaderMessageType; typedef struct { diff --git a/applications/services/power/power_service/power.h b/applications/services/power/power_service/power.h index 9cefd8d4c..ecb0566a4 100644 --- a/applications/services/power/power_service/power.h +++ b/applications/services/power/power_service/power.h @@ -38,7 +38,6 @@ typedef struct { bool gauge_is_ok; bool is_charging; bool is_shutdown_requested; - bool is_charge_capped; float current_charger; float current_gauge; @@ -56,6 +55,8 @@ typedef struct { uint8_t charge; uint8_t health; + + bool is_charge_capped; } PowerInfo; /** Power off device diff --git a/applications/services/power/power_service/power_i.h b/applications/services/power/power_service/power_i.h index 7cb756175..3492885a7 100644 --- a/applications/services/power/power_service/power_i.h +++ b/applications/services/power/power_service/power_i.h @@ -32,11 +32,6 @@ struct Power { Gui* gui; NotificationApp* notification; FuriPubSub* event_pubsub; - FuriPubSub* settings_events; - FuriPubSub* input_events_pubsub; - FuriPubSubSubscription* input_events_subscription; - FuriPubSubSubscription* app_start_stop_subscription; - FuriPubSubSubscription* settings_events_subscription; PowerEvent event; PowerState state; @@ -47,10 +42,16 @@ struct Power { uint8_t battery_level; uint8_t power_off_timeout; + FuriMutex* api_mtx; + + FuriPubSub* settings_events; + FuriPubSub* input_events_pubsub; + FuriPubSubSubscription* input_events_subscription; + FuriPubSubSubscription* app_start_stop_subscription; + FuriPubSubSubscription* settings_events_subscription; uint32_t shutdown_idle_delay_ms; FuriTimer* auto_shutdown_timer; Loader* loader; - FuriMutex* api_mtx; }; typedef enum { diff --git a/applications/services/storage/filesystem_api_internal.h b/applications/services/storage/filesystem_api_internal.h index 47214f21a..6aa296662 100644 --- a/applications/services/storage/filesystem_api_internal.h +++ b/applications/services/storage/filesystem_api_internal.h @@ -169,13 +169,14 @@ typedef struct { typedef struct { FS_Error (*const stat)(void* context, const char* path, FileInfo* fileinfo); FS_Error (*const remove)(void* context, const char* path); - FS_Error (*const rename)(void* context, const char* old, const char* new); FS_Error (*const mkdir)(void* context, const char* path); FS_Error (*const fs_info)( void* context, const char* fs_path, uint64_t* total_space, uint64_t* free_space); + + FS_Error (*const rename)(void* context, const char* old, const char* new); } FS_Common_Api; /** Full filesystem api structure */ diff --git a/applications/services/storage/storage_message.h b/applications/services/storage/storage_message.h index e77bad6ee..9511fcdd9 100644 --- a/applications/services/storage/storage_message.h +++ b/applications/services/storage/storage_message.h @@ -141,7 +141,6 @@ typedef enum { StorageCommandCommonTimestamp, StorageCommandCommonStat, StorageCommandCommonRemove, - StorageCommandCommonRename, StorageCommandCommonMkDir, StorageCommandCommonFSInfo, StorageCommandSDFormat, @@ -149,6 +148,8 @@ typedef enum { StorageCommandSDInfo, StorageCommandSDStatus, StorageCommandCommonResolvePath, + + StorageCommandCommonRename, } StorageCommand; typedef struct {