blob: caa23fd432a45cfe0244fb86799da14588f4d55a (
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
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
|
/*
* Copyright 2023 jacqueline <me@jacqueline.id.au>
*
* SPDX-License-Identifier: GPL-3.0-only
*/
#pragma once
#include <stdint.h>
#include <cstdint>
#include <memory>
#include <vector>
#include "display.hpp"
#include "index.hpp"
#include "lvgl.h"
#include "nvs.hpp"
#include "screen.hpp"
namespace ui {
namespace screens {
class Settings : public MenuScreen {
public:
Settings();
};
class Bluetooth : public MenuScreen {
public:
Bluetooth();
};
class Headphones : public MenuScreen {
public:
Headphones(drivers::NvsStorage& nvs);
auto ChangeMaxVolume(uint8_t index) -> void;
auto ChangeCustomVolume(int8_t diff) -> void;
private:
auto UpdateCustomVol(uint16_t) -> void;
drivers::NvsStorage& nvs_;
lv_obj_t* custom_vol_container_;
lv_obj_t* custom_vol_label_;
std::vector<uint16_t> index_to_level_;
uint16_t custom_limit_;
};
class Appearance : public MenuScreen {
public:
Appearance(drivers::NvsStorage& nvs, drivers::Display& display);
auto ChangeBrightness(uint_fast8_t) -> void;
auto CommitBrightness() -> void;
private:
drivers::NvsStorage& nvs_;
drivers::Display& display_;
lv_obj_t* current_brightness_label_;
uint_fast8_t current_brightness_;
};
class InputMethod : public MenuScreen {
public:
InputMethod();
};
class Storage : public MenuScreen {
public:
Storage();
};
class FirmwareUpdate : public MenuScreen {
public:
FirmwareUpdate();
};
class About : public MenuScreen {
public:
About();
};
} // namespace screens
} // namespace ui
|