Fork of Tangara with customizations
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
tangara-fw/src/ui/include/ui_events.hpp

54 lines
1.0 KiB

/*
* Copyright 2023 jacqueline <me@jacqueline.id.au>
*
* SPDX-License-Identifier: GPL-3.0-only
*/
#pragma once
#include <memory>
#include "database.hpp"
#include "gpios.hpp"
#include "index.hpp"
#include "nvs.hpp"
#include "screen.hpp"
#include "tinyfsm.hpp"
namespace ui {
// TODO(jacqueline): is this needed? is this good?
/*
* Event emitted by the main task on heartbeat.
*/
struct OnStorageChange : tinyfsm::Event {
bool is_mounted;
};
struct OnSystemError : tinyfsm::Event {};
struct OnLuaError : tinyfsm::Event {
std::string message;
};
struct DumpLuaStack : tinyfsm::Event {};
namespace internal {
struct InitDisplay : tinyfsm::Event {
drivers::IGpios& gpios;
drivers::NvsStorage& nvs;
};
struct ReindexDatabase : tinyfsm::Event {};
struct BackPressed : tinyfsm::Event {};
struct ShowNowPlaying : tinyfsm::Event {};
struct ModalConfirmPressed : tinyfsm::Event {};
struct ModalCancelPressed : tinyfsm::Event {};
struct DismissAlerts : tinyfsm::Event {};
} // namespace internal
} // namespace ui