2022-02-25 15:22:58 +00:00
|
|
|
/**
|
|
|
|
* @file infrared_app_event.h
|
|
|
|
* Infrared: Scene events description
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <infrared.h>
|
|
|
|
#include <gui/modules/dialog_ex.h>
|
|
|
|
|
|
|
|
/** Infrared events class */
|
|
|
|
class InfraredAppEvent {
|
|
|
|
public:
|
|
|
|
/** Type of event enum */
|
|
|
|
enum class Type : uint8_t {
|
|
|
|
/** Tick event come after no other events came in 100 ms */
|
|
|
|
Tick,
|
|
|
|
/** Exit application event */
|
|
|
|
Exit,
|
|
|
|
/** Back event */
|
|
|
|
Back,
|
|
|
|
/** Menu selected event type. Provided with payload value. */
|
|
|
|
MenuSelected,
|
|
|
|
/** Button press event. Need for continuous signal sending. */
|
|
|
|
MenuSelectedPress,
|
|
|
|
/** Button release event. Need for continuous signal sending. */
|
|
|
|
MenuSelectedRelease,
|
|
|
|
/** Events from DialogEx view module */
|
|
|
|
DialogExSelected,
|
|
|
|
/** Infrared signal received event */
|
|
|
|
InfraredMessageReceived,
|
|
|
|
/** Text edit done event */
|
|
|
|
TextEditDone,
|
|
|
|
/** Popup timer finished event */
|
|
|
|
PopupTimer,
|
|
|
|
/** Button panel pressed event */
|
|
|
|
ButtonPanelPressed,
|
|
|
|
};
|
|
|
|
|
|
|
|
union {
|
2022-05-06 13:37:10 +00:00
|
|
|
int32_t dummy;
|
2022-02-25 15:22:58 +00:00
|
|
|
/** Menu selected event type payload. Selected index. */
|
|
|
|
int32_t menu_index;
|
|
|
|
/** DialogEx view module event type payload */
|
|
|
|
DialogExResult dialog_ex_result;
|
|
|
|
} payload;
|
|
|
|
|
|
|
|
/** Type of event */
|
|
|
|
Type type;
|
|
|
|
};
|