summaryrefslogtreecommitdiff
path: root/src/tangara/ui/ui_events.hpp
blob: 0f371769372c072b25ee08c44d06e2723ee11394 (plain)
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
/*
 * Copyright 2023 jacqueline <me@jacqueline.id.au>
 *
 * SPDX-License-Identifier: GPL-3.0-only
 */

#pragma once

#include <memory>

#include "tinyfsm.hpp"

#include "database/database.hpp"
#include "database/index.hpp"
#include "drivers/gpios.hpp"
#include "drivers/nvs.hpp"
#include "ui/screen.hpp"

namespace ui {

struct OnStorageChange : tinyfsm::Event {
  bool is_mounted;
};

struct OnSystemError : tinyfsm::Event {};

struct OnLuaError : tinyfsm::Event {
  std::string message;
};

struct DumpLuaStack : tinyfsm::Event {};

struct Screenshot : tinyfsm::Event {
  std::string filename;
};

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 DismissAlerts : tinyfsm::Event {};

}  // namespace internal

}  // namespace ui