unleashed-firmware/applications/external/subghz_remote_configurator/views/remote.h

36 lines
1016 B
C
Raw Normal View History

2023-05-12 16:47:39 +03:00
#pragma once
#include <gui/view.h>
#include "../helpers/subrem_custom_event.h"
#include "../helpers/subrem_presets.h"
2023-05-12 16:47:39 +03:00
2023-05-17 17:52:46 +03:00
typedef enum {
SubRemViewRemoteStateIdle,
SubRemViewRemoteStateLoading,
SubRemViewRemoteStateSending,
SubRemViewRemoteStateOFF,
2023-05-17 17:52:46 +03:00
} SubRemViewRemoteState;
2023-05-12 16:47:39 +03:00
typedef struct SubRemViewRemote SubRemViewRemote;
typedef void (*SubRemViewRemoteCallback)(SubRemCustomEvent event, void* context);
void subrem_view_remote_set_callback(
SubRemViewRemote* subrem_view_remote,
SubRemViewRemoteCallback callback,
void* context);
SubRemViewRemote* subrem_view_remote_alloc();
void subrem_view_remote_free(SubRemViewRemote* subrem_view_remote);
View* subrem_view_remote_get_view(SubRemViewRemote* subrem_view_remote);
void subrem_view_remote_update_data_labels(
2023-05-12 16:47:39 +03:00
SubRemViewRemote* subrem_view_remote,
SubRemSubFilePreset** subs_presets);
2023-05-17 17:52:46 +03:00
void subrem_view_remote_set_state(
SubRemViewRemote* subrem_view_remote,
SubRemViewRemoteState state,
uint8_t presed_btn);