-
Notifications
You must be signed in to change notification settings - Fork 0
/
ir_gui_remotes.h
119 lines (98 loc) · 2.17 KB
/
ir_gui_remotes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#ifndef IR_GUI_REMOTES_H
#define IR_GUI_REMOTES_H
#pragma once
#include <furi.h>
#include <dialogs/dialogs.h>
#include <storage/storage.h>
#include <infrared/worker/infrared_worker.h>
#include <notification/notification_messages.h>
#include "gui_manager.h"
#include "ir_gui_remotes_icons.h"
typedef struct App App;
typedef struct GUIManager GUIManager;
typedef struct InfraredGuiRemoteButton InfraredGuiRemoteButton;
typedef struct InfraredGuiRemote InfraredGuiRemote;
/**
* Infrared Gui Remote Button Data Structure
*
* @param label Button Label
* @param ir_message Infrared Message
* @param icon Icon
* @param icon_hover Icon Hover
*/
struct InfraredGuiRemoteButton {
const char* label;
const InfraredMessage ir_message;
const Icon* icon;
const Icon* icon_hover;
const int color;
};
/**
* Infrared Gui Remote Data Structure
*
* @param label Label
* @param rows Rows
* @param cols Columns
* @param buttons Buttons
*
*/
struct InfraredGuiRemote {
char* label;
InfraredGuiRemoteButton* buttons;
};
/**
* App Structure Definition
*
* @param gui_manager GUI Manager
* @param ir_worker Infrared Worker
* @param ir_transmitting Infrared Transmitting Flag
*
*/
struct App {
// GUI Manager
GUIManager* gui_manager;
DialogsApp* dialogs;
Storage* storage;
FuriString* file_path;
// Infrared Worker
InfraredWorker* ir_worker;
bool ir_transmitting;
// Remote
InfraredGuiRemote* remote;
// Notifications
NotificationApp* notifications;
};
/**
* Turn on Notification LED with Hex color code
*
* @param context App context
* @param hexColor Hex Color
*
* @return void
*/
void turn_on_led(void* context, int hexColor);
/**
* Turn off Notification LED
*
* @param context App context
*
* @return void
*/
void turn_off_led(void* context);
/**
* Start transmitting Infrared Message
*
* @param ir_message Infrared Message to transmit
*
* @return void
*/
void start_ir_transmission(InfraredMessage* ir_message, void* context);
/**
* Stop transmitting Infrared Message
*
* @param context App context
*
* @return void
*/
void stop_ir_transmission(void* context);
#endif // IR_GUI_REMOTES_H