mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-24 13:33:06 +00: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>
39 lines
999 B
C
39 lines
999 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 {
|
|
DesktopLockMenuEventLock,
|
|
DesktopLockMenuEventUnlock,
|
|
DesktopLockMenuEventExit,
|
|
} DesktopLockMenuEvent;
|
|
|
|
typedef struct DesktopLockMenuView DesktopLockMenuView;
|
|
|
|
typedef void (*DesktopLockMenuViewCallback)(DesktopLockMenuEvent event, void* context);
|
|
|
|
struct DesktopLockMenuView {
|
|
View* view;
|
|
DesktopLockMenuViewCallback callback;
|
|
void* context;
|
|
};
|
|
|
|
typedef struct {
|
|
uint8_t idx;
|
|
uint8_t hint_timeout;
|
|
bool locked;
|
|
} DesktopLockMenuViewModel;
|
|
|
|
void desktop_lock_menu_set_callback(
|
|
DesktopLockMenuView* lock_menu,
|
|
DesktopLockMenuViewCallback callback,
|
|
void* context);
|
|
|
|
View* desktop_lock_menu_get_view(DesktopLockMenuView* lock_menu);
|
|
void desktop_lock_menu_reset_idx(DesktopLockMenuView* lock_menu);
|
|
DesktopLockMenuView* desktop_lock_menu_alloc();
|
|
void desktop_lock_menu_free(DesktopLockMenuView* lock_menu);
|