mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-18 19:01:47 +03:00
1c4e6ec74d
* refactoring p1 * refactoring p2 * cleanups * locked screen refresh rate fix * better locked view logic * seperate dolphin service and desktop app * Desktop: Favorite app acess (Left key), Settings app * Desktop settings version, submenu header * remove unused icon anomation + naming fix Co-authored-by: あく <alleteam@gmail.com>
44 lines
1000 B
C
44 lines
1000 B
C
#pragma once
|
|
|
|
#include <gui/gui_i.h>
|
|
#include <gui/view.h>
|
|
#include <gui/canvas.h>
|
|
#include <gui/elements.h>
|
|
#include <furi.h>
|
|
|
|
typedef enum {
|
|
DesktopMainEventOpenMenu,
|
|
DesktopMainEventOpenLockMenu,
|
|
DesktopMainEventOpenDebug,
|
|
DesktopMainEventUnlocked,
|
|
DesktopMainEventOpenArchive,
|
|
DesktopMainEventOpenFavorite,
|
|
} DesktopMainEvent;
|
|
|
|
typedef struct DesktopMainView DesktopMainView;
|
|
|
|
typedef void (*DesktopMainViewCallback)(DesktopMainEvent event, void* context);
|
|
|
|
struct DesktopMainView {
|
|
View* view;
|
|
DesktopMainViewCallback callback;
|
|
void* context;
|
|
};
|
|
|
|
typedef struct {
|
|
IconAnimation* animation;
|
|
uint8_t scene_num;
|
|
uint8_t hint_timeout;
|
|
bool unlocked;
|
|
} DesktopMainViewModel;
|
|
|
|
void desktop_main_set_callback(
|
|
DesktopMainView* main_view,
|
|
DesktopMainViewCallback callback,
|
|
void* context);
|
|
|
|
View* desktop_main_get_view(DesktopMainView* main_view);
|
|
|
|
DesktopMainView* desktop_main_alloc();
|
|
void desktop_main_free(DesktopMainView* main_view);
|