2021-09-28 09:40:39 +00:00
|
|
|
#pragma once
|
|
|
|
|
2023-05-25 14:22:31 +00:00
|
|
|
#include <furi.h>
|
|
|
|
|
2024-08-04 09:54:02 +00:00
|
|
|
#include "desktop_settings.h"
|
2023-05-11 09:50:17 +00:00
|
|
|
|
|
|
|
#define RECORD_DESKTOP "desktop"
|
|
|
|
|
2024-08-04 09:54:02 +00:00
|
|
|
typedef struct Desktop Desktop;
|
2023-05-25 14:22:31 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
bool locked;
|
|
|
|
} DesktopStatus;
|
|
|
|
|
2024-08-04 09:54:02 +00:00
|
|
|
bool desktop_api_is_locked(Desktop* instance);
|
|
|
|
|
|
|
|
void desktop_api_unlock(Desktop* instance);
|
|
|
|
|
2023-05-25 14:22:31 +00:00
|
|
|
FuriPubSub* desktop_api_get_status_pubsub(Desktop* instance);
|
2024-08-04 09:54:02 +00:00
|
|
|
|
|
|
|
void desktop_api_get_settings(Desktop* instance, DesktopSettings* settings);
|
|
|
|
|
|
|
|
void desktop_api_set_settings(Desktop* instance, const DesktopSettings* settings);
|
2024-09-16 13:27:24 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Adds 1 to the count of active external autolock inhibitors
|
|
|
|
*
|
|
|
|
* Autolocking will not get triggered while there's at least 1 inhibitor
|
|
|
|
*/
|
|
|
|
void desktop_api_add_external_inhibitor(Desktop* instance);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Removes 1 from the count of active external autolock inhibitors
|
|
|
|
*
|
|
|
|
* Autolocking will not get triggered while there's at least 1 inhibitor
|
|
|
|
*/
|
|
|
|
void desktop_api_remove_external_inhibitor(Desktop* instance);
|