2021-09-28 09:40:39 +00:00
|
|
|
#pragma once
|
|
|
|
|
2022-01-02 21:39:56 +00:00
|
|
|
#include "gui/view_composed.h"
|
2021-09-28 09:40:39 +00:00
|
|
|
#include <gui/gui_i.h>
|
|
|
|
#include <gui/view.h>
|
|
|
|
#include <gui/canvas.h>
|
|
|
|
#include <gui/elements.h>
|
|
|
|
#include <furi.h>
|
2022-01-02 21:39:56 +00:00
|
|
|
#include "desktop_events.h"
|
2021-09-28 09:40:39 +00:00
|
|
|
|
|
|
|
typedef struct DesktopMainView DesktopMainView;
|
|
|
|
|
2022-01-02 21:39:56 +00:00
|
|
|
typedef void (*DesktopMainViewCallback)(DesktopEvent event, void* context);
|
2021-09-28 09:40:39 +00:00
|
|
|
|
|
|
|
struct DesktopMainView {
|
|
|
|
View* view;
|
|
|
|
DesktopMainViewCallback callback;
|
|
|
|
void* context;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
IconAnimation* animation;
|
2021-11-24 16:21:12 +00:00
|
|
|
const Icon* icon;
|
2021-09-28 09:40:39 +00:00
|
|
|
uint8_t scene_num;
|
2021-11-26 12:19:30 +00:00
|
|
|
bool status_bar_background_black;
|
2021-10-02 17:00:56 +00:00
|
|
|
uint32_t hint_expire_at;
|
2021-09-28 09:40:39 +00:00
|
|
|
} 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);
|
2021-11-26 12:19:30 +00:00
|
|
|
void desktop_main_switch_dolphin_animation(
|
|
|
|
DesktopMainView* main_view,
|
|
|
|
const Icon* icon,
|
|
|
|
bool status_bar_background_black);
|
2021-10-26 18:34:31 +00:00
|
|
|
void desktop_main_unlocked(DesktopMainView* main_view);
|
|
|
|
void desktop_main_reset_hint(DesktopMainView* main_view);
|
2021-11-24 16:21:12 +00:00
|
|
|
void desktop_main_switch_dolphin_icon(DesktopMainView* main_view, const Icon* icon);
|