2021-09-28 12:40:39 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <gui/view.h>
|
2022-01-03 00:39:56 +03:00
|
|
|
#include "desktop_events.h"
|
2021-09-28 12:40:39 +03:00
|
|
|
|
2021-10-04 12:33:31 +03:00
|
|
|
#define HINT_TIMEOUT 2
|
|
|
|
|
2021-09-28 12:40:39 +03:00
|
|
|
typedef struct DesktopLockMenuView DesktopLockMenuView;
|
|
|
|
|
2022-01-03 00:39:56 +03:00
|
|
|
typedef void (*DesktopLockMenuViewCallback)(DesktopEvent event, void* context);
|
2021-09-28 12:40:39 +03:00
|
|
|
|
|
|
|
struct DesktopLockMenuView {
|
|
|
|
View* view;
|
|
|
|
DesktopLockMenuViewCallback callback;
|
|
|
|
void* context;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint8_t idx;
|
2022-09-19 16:03:42 +03:00
|
|
|
bool dummy_mode;
|
2023-04-19 12:33:23 +03:00
|
|
|
bool stealth_mode;
|
2021-09-28 12:40:39 +03:00
|
|
|
} DesktopLockMenuViewModel;
|
|
|
|
|
|
|
|
void desktop_lock_menu_set_callback(
|
|
|
|
DesktopLockMenuView* lock_menu,
|
|
|
|
DesktopLockMenuViewCallback callback,
|
|
|
|
void* context);
|
|
|
|
|
|
|
|
View* desktop_lock_menu_get_view(DesktopLockMenuView* lock_menu);
|
2022-09-19 16:03:42 +03:00
|
|
|
void desktop_lock_menu_set_dummy_mode_state(DesktopLockMenuView* lock_menu, bool dummy_mode);
|
2023-04-19 12:33:23 +03:00
|
|
|
void desktop_lock_menu_set_stealth_mode_state(DesktopLockMenuView* lock_menu, bool stealth_mode);
|
2022-01-29 12:39:10 +03:00
|
|
|
void desktop_lock_menu_set_idx(DesktopLockMenuView* lock_menu, uint8_t idx);
|
2021-09-28 12:40:39 +03:00
|
|
|
DesktopLockMenuView* desktop_lock_menu_alloc();
|
|
|
|
void desktop_lock_menu_free(DesktopLockMenuView* lock_menu);
|