2023-05-18 10:48:25 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <gui/view.h>
|
|
|
|
#include "../helpers/subrem_custom_event.h"
|
2023-05-30 13:51:07 +00:00
|
|
|
#include "../helpers/subrem_presets.h"
|
2023-05-18 10:48:25 +00:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
SubRemViewRemoteStateIdle,
|
|
|
|
SubRemViewRemoteStateLoading,
|
|
|
|
SubRemViewRemoteStateSending,
|
2023-05-30 13:51:07 +00:00
|
|
|
SubRemViewRemoteStateOFF,
|
2023-05-18 10:48:25 +00:00
|
|
|
} SubRemViewRemoteState;
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
2023-05-30 13:51:07 +00:00
|
|
|
void subrem_view_remote_update_data_labels(
|
|
|
|
SubRemViewRemote* subrem_view_remote,
|
|
|
|
SubRemSubFilePreset** subs_presets);
|
2023-05-18 10:48:25 +00:00
|
|
|
|
|
|
|
void subrem_view_remote_set_state(
|
|
|
|
SubRemViewRemote* subrem_view_remote,
|
2023-05-21 20:34:42 +00:00
|
|
|
SubRemViewRemoteState state,
|
2023-07-14 11:16:37 +00:00
|
|
|
uint8_t presed_btn);
|
|
|
|
|
|
|
|
void subrem_view_remote_set_radio(SubRemViewRemote* subrem_view_remote, bool external);
|