blob: 4362249be1358aa4ccb4505fb8dbba8d3a283e75 (
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
|
/*
* Copyright 2023 jacqueline <me@jacqueline.id.au>
*
* SPDX-License-Identifier: GPL-3.0-only
*/
#pragma once
#include <atomic>
#include <cstdbool>
#include <memory>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/timers.h"
#include "display.hpp"
#include "relative_wheel.hpp"
#include "screen.hpp"
#include "themes.hpp"
#include "touchwheel.hpp"
#include "wheel_encoder.hpp"
namespace ui {
class UiTask {
public:
static auto Start() -> UiTask*;
~UiTask();
// FIXME: Once we have more input devices, this function should accept a more
// generic interface.
auto SetInputDevice(std::shared_ptr<TouchWheelEncoder> dev) -> void;
private:
UiTask();
auto Main() -> void;
std::shared_ptr<TouchWheelEncoder> input_device_;
std::shared_ptr<Screen> current_screen_;
};
} // namespace ui
|