flipperzero-firmware/applications/desktop/desktop_i.h
Albert Kharisov a39002ce22
[FL-2150] Dolphin animation refactoring (#938)
* Dolphin Animation Refactoring, part 1
* Remove animations from desktop
* Remove excess, first start
* Split animation_manager with callbacks
* allocate view inside animation_view
* Work on ViewComposed
* Draw white rectangles under bubble corners
* Fix bubbles sequence
* RPC: remove obsolete include "status.pb.h"
* Add animations manifest decoding
* Flipper file: add strict mode
* FFF: Animation structures parsing
* Assembling structure of animation
* Lot of view fixes:
  Add multi-line bubbles
  Add support for passive bubbles (frame_order values starts from passive now)
  Add hard-coded delay (active_shift) for active state enabling
  Fix active state handling
  Fix leaks
  Fix parsing uncorrect bubble_animation meta file
  Fix bubble rules of showing
* Animation load/unload & view freeze/unfreeze
* Blocking & system animations, fixes:
  View correct activation
  Refactoring + blocking animation
  Freeze first passive/active frames
  Many insert/eject SD tests fixes
  Add system animations
  Add Loader events app started/finished
  Add system no_sd animation
* Assets: dolphin packer. Scripts: minor refactoring.
* Desktop: update logging tags. Scripts: add metadata to dolphin bundling process, extra sorting for fs traversing. Make: phony assets rules.
* Github: rebuild assets on build
* Docker: add missing dependencies for assets compilation
* Docker: fix run command syntax
* ReadMe: update naming rules with link to source
* Assets: recompile icons
* Loader: add loader event
* Desktop, Gui, Furi Core: const shenanigans macros

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-01-03 00:39:56 +03:00

79 lines
1.8 KiB
C

#pragma once
#include "cmsis_os2.h"
#include "desktop.h"
#include "animations/animation_manager.h"
#include "gui/view_composed.h"
#include <furi.h>
#include <furi-hal.h>
#include <gui/gui.h>
#include <gui/view_dispatcher.h>
#include <gui/modules/popup.h>
#include <gui/modules/code_input.h>
#include <gui/scene_manager.h>
#include <assets_icons.h>
#include <storage/storage.h>
#include <power/power_service/power.h>
#include "views/desktop_main.h"
#include "views/desktop_first_start.h"
#include "views/desktop_lock_menu.h"
#include "views/desktop_locked.h"
#include "views/desktop_debug.h"
#include "scenes/desktop_scene.h"
#include "desktop/desktop_settings/desktop_settings.h"
#include <gui/icon.h>
#define STATUS_BAR_Y_SHIFT 13
typedef enum {
DesktopViewMain,
DesktopViewLockMenu,
DesktopViewLocked,
DesktopViewDebug,
DesktopViewFirstStart,
DesktopViewHwMismatch,
DesktopViewPinSetup,
DesktopViewTotal,
} DesktopViewEnum;
struct Desktop {
// Scene
FuriThread* scene_thread;
// GUI
Gui* gui;
ViewDispatcher* view_dispatcher;
SceneManager* scene_manager;
DesktopFirstStartView* first_start_view;
Popup* hw_mismatch_popup;
DesktopLockMenuView* lock_menu;
DesktopDebugView* debug_view;
CodeInput* code_input;
View* dolphin_view;
DesktopMainView* main_view;
DesktopLockedView* locked_view;
ViewComposed* main_view_composed;
ViewComposed* locked_view_composed;
DesktopSettings settings;
PinCode pincode_buffer;
ViewPort* lock_viewport;
AnimationManager* animation_manager;
osSemaphoreId_t unload_animation_semaphore;
FuriPubSubSubscription* app_start_stop_subscription;
char* text_buffer;
};
Desktop* desktop_alloc();
void desktop_free(Desktop* desktop);