unleashed-firmware/applications/main/subghz_remote/views/remote.h

32 lines
921 B
C
Raw Normal View History

2023-05-18 13:48:25 +03:00
#pragma once
#include <gui/view.h>
#include "../helpers/subrem_custom_event.h"
typedef enum {
SubRemViewRemoteStateIdle,
SubRemViewRemoteStateLoading,
SubRemViewRemoteStateSending,
} 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-21 23:34:42 +03:00
void subrem_view_remote_add_data_to_show(SubRemViewRemote* subrem_view_remote, const char** labels);
2023-05-18 13:48:25 +03:00
void subrem_view_remote_set_state(
SubRemViewRemote* subrem_view_remote,
2023-05-21 23:34:42 +03:00
SubRemViewRemoteState state,
uint8_t presed_btn);