summaryrefslogtreecommitdiff
path: root/src/displayapp/screens
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/screens')
-rw-r--r--src/displayapp/screens/CheckboxList.h1
-rw-r--r--src/displayapp/screens/FirmwareUpdate.h1
-rw-r--r--src/displayapp/screens/HeartRate.h1
-rw-r--r--src/displayapp/screens/InfiniPaint.h1
-rw-r--r--src/displayapp/screens/Notifications.h3
-rw-r--r--src/displayapp/screens/Paddle.h1
-rw-r--r--src/displayapp/screens/Screen.h7
-rw-r--r--src/displayapp/screens/ScreenList.h1
-rw-r--r--src/displayapp/screens/Twos.h1
-rw-r--r--src/displayapp/screens/WatchFaceAnalog.h1
-rw-r--r--src/displayapp/screens/WatchFaceInfineat.h1
-rw-r--r--src/displayapp/screens/settings/SettingChimes.h1
-rw-r--r--src/displayapp/screens/settings/SettingShakeThreshold.h1
-rw-r--r--src/displayapp/screens/settings/SettingTimeFormat.h1
-rw-r--r--src/displayapp/screens/settings/SettingWakeUp.h1
15 files changed, 23 insertions, 0 deletions
diff --git a/src/displayapp/screens/CheckboxList.h b/src/displayapp/screens/CheckboxList.h
index 48125d4b..359b835e 100644
--- a/src/displayapp/screens/CheckboxList.h
+++ b/src/displayapp/screens/CheckboxList.h
@@ -15,6 +15,7 @@ namespace Pinetime {
class CheckboxList : public Screen {
public:
static constexpr size_t MaxItems = 4;
+
struct Item {
const char* name;
bool enabled;
diff --git a/src/displayapp/screens/FirmwareUpdate.h b/src/displayapp/screens/FirmwareUpdate.h
index 5156b7ea..cc3b09b2 100644
--- a/src/displayapp/screens/FirmwareUpdate.h
+++ b/src/displayapp/screens/FirmwareUpdate.h
@@ -8,6 +8,7 @@ namespace Pinetime {
namespace Controllers {
class Ble;
}
+
namespace Applications {
namespace Screens {
diff --git a/src/displayapp/screens/HeartRate.h b/src/displayapp/screens/HeartRate.h
index 2ad00351..d68133ad 100644
--- a/src/displayapp/screens/HeartRate.h
+++ b/src/displayapp/screens/HeartRate.h
@@ -11,6 +11,7 @@ namespace Pinetime {
namespace Controllers {
class HeartRateController;
}
+
namespace Applications {
namespace Screens {
diff --git a/src/displayapp/screens/InfiniPaint.h b/src/displayapp/screens/InfiniPaint.h
index 8c427402..a6b6eb18 100644
--- a/src/displayapp/screens/InfiniPaint.h
+++ b/src/displayapp/screens/InfiniPaint.h
@@ -10,6 +10,7 @@ namespace Pinetime {
namespace Components {
class LittleVgl;
}
+
namespace Applications {
namespace Screens {
diff --git a/src/displayapp/screens/Notifications.h b/src/displayapp/screens/Notifications.h
index bdaac7bb..a4d2709b 100644
--- a/src/displayapp/screens/Notifications.h
+++ b/src/displayapp/screens/Notifications.h
@@ -13,6 +13,7 @@ namespace Pinetime {
namespace Controllers {
class AlertNotificationService;
}
+
namespace Applications {
namespace Screens {
@@ -45,9 +46,11 @@ namespace Pinetime {
Pinetime::Controllers::AlertNotificationService& alertNotificationService,
Pinetime::Controllers::MotorController& motorController);
~NotificationItem();
+
bool IsRunning() const {
return running;
}
+
void OnCallButtonEvent(lv_obj_t*, lv_event_t event);
private:
diff --git a/src/displayapp/screens/Paddle.h b/src/displayapp/screens/Paddle.h
index 3a30eee6..d62550c4 100644
--- a/src/displayapp/screens/Paddle.h
+++ b/src/displayapp/screens/Paddle.h
@@ -8,6 +8,7 @@ namespace Pinetime {
namespace Components {
class LittleVgl;
}
+
namespace Applications {
namespace Screens {
diff --git a/src/displayapp/screens/Screen.h b/src/displayapp/screens/Screen.h
index e72a2368..a2452da5 100644
--- a/src/displayapp/screens/Screen.h
+++ b/src/displayapp/screens/Screen.h
@@ -7,13 +7,16 @@
namespace Pinetime {
namespace Applications {
class DisplayApp;
+
namespace Screens {
template <class T> class DirtyValue {
public:
DirtyValue() = default; // Use NSDMI
+
explicit DirtyValue(T const& v) : value {v} {
} // Use MIL and const-lvalue-ref
+
bool IsUpdated() {
if (this->isUpdated) {
this->isUpdated = false;
@@ -21,10 +24,12 @@ namespace Pinetime {
}
return false;
}
+
T const& Get() {
this->isUpdated = false;
return value;
} // never expose a non-const lvalue-ref
+
DirtyValue& operator=(const T& other) {
if (this->value != other) {
this->value = other;
@@ -46,6 +51,7 @@ namespace Pinetime {
public:
explicit Screen(DisplayApp* app) : app {app} {
}
+
virtual ~Screen() = default;
static void RefreshTaskCallback(lv_task_t* task);
@@ -64,6 +70,7 @@ namespace Pinetime {
virtual bool OnTouchEvent(TouchEvents event) {
return false;
}
+
virtual bool OnTouchEvent(uint16_t x, uint16_t y) {
return false;
}
diff --git a/src/displayapp/screens/ScreenList.h b/src/displayapp/screens/ScreenList.h
index ad882948..6c9a2218 100644
--- a/src/displayapp/screens/ScreenList.h
+++ b/src/displayapp/screens/ScreenList.h
@@ -11,6 +11,7 @@ namespace Pinetime {
namespace Screens {
enum class ScreenListModes { UpDown, RightLeft, LongPress };
+
template <size_t N> class ScreenList : public Screen {
public:
ScreenList(DisplayApp* app,
diff --git a/src/displayapp/screens/Twos.h b/src/displayapp/screens/Twos.h
index da935724..15017581 100644
--- a/src/displayapp/screens/Twos.h
+++ b/src/displayapp/screens/Twos.h
@@ -9,6 +9,7 @@ namespace Pinetime {
bool merged = false;
unsigned int value = 0;
};
+
namespace Screens {
class Twos : public Screen {
public:
diff --git a/src/displayapp/screens/WatchFaceAnalog.h b/src/displayapp/screens/WatchFaceAnalog.h
index 04d9e711..6e4e88a3 100644
--- a/src/displayapp/screens/WatchFaceAnalog.h
+++ b/src/displayapp/screens/WatchFaceAnalog.h
@@ -18,6 +18,7 @@ namespace Pinetime {
class Ble;
class NotificationManager;
}
+
namespace Applications {
namespace Screens {
diff --git a/src/displayapp/screens/WatchFaceInfineat.h b/src/displayapp/screens/WatchFaceInfineat.h
index 6c3c30ba..2dbb0ab3 100644
--- a/src/displayapp/screens/WatchFaceInfineat.h
+++ b/src/displayapp/screens/WatchFaceInfineat.h
@@ -118,6 +118,7 @@ namespace Pinetime {
static constexpr int nLines = 9;
static constexpr int nColors = 7; // must match number of colors in InfineatColors
+
struct InfineatColors {
int orange[nLines] = {0xfd872b, 0xdb3316, 0x6f1000, 0xfd7a0a, 0xffffff, 0xffffff, 0xffffff, 0xe85102, 0xea1c00};
int blue[nLines] = {0xe7f8ff, 0x2232d0, 0x182a8b, 0xe7f8ff, 0xffffff, 0xffffff, 0xffffff, 0x5991ff, 0x1636ff};
diff --git a/src/displayapp/screens/settings/SettingChimes.h b/src/displayapp/screens/settings/SettingChimes.h
index 3054d06b..3146503b 100644
--- a/src/displayapp/screens/settings/SettingChimes.h
+++ b/src/displayapp/screens/settings/SettingChimes.h
@@ -23,6 +23,7 @@ namespace Pinetime {
Controllers::Settings::ChimesOption chimesOption;
const char* name;
};
+
static constexpr std::array<Option, 3> options = {{{Controllers::Settings::ChimesOption::None, "Off"},
{Controllers::Settings::ChimesOption::Hours, "Every hour"},
{Controllers::Settings::ChimesOption::HalfHours, "Every 30 mins"}}};
diff --git a/src/displayapp/screens/settings/SettingShakeThreshold.h b/src/displayapp/screens/settings/SettingShakeThreshold.h
index 43319468..d0979fa6 100644
--- a/src/displayapp/screens/settings/SettingShakeThreshold.h
+++ b/src/displayapp/screens/settings/SettingShakeThreshold.h
@@ -6,6 +6,7 @@
#include "displayapp/screens/Screen.h"
#include <components/motion/MotionController.h>
#include "systemtask/SystemTask.h"
+
namespace Pinetime {
namespace Applications {
diff --git a/src/displayapp/screens/settings/SettingTimeFormat.h b/src/displayapp/screens/settings/SettingTimeFormat.h
index dc0413ec..426dc197 100644
--- a/src/displayapp/screens/settings/SettingTimeFormat.h
+++ b/src/displayapp/screens/settings/SettingTimeFormat.h
@@ -24,6 +24,7 @@ namespace Pinetime {
Controllers::Settings::ClockType clockType;
const char* name;
};
+
static constexpr std::array<Option, 2> options = {{
{Controllers::Settings::ClockType::H12, "12-hour"},
{Controllers::Settings::ClockType::H24, "24-hour"},
diff --git a/src/displayapp/screens/settings/SettingWakeUp.h b/src/displayapp/screens/settings/SettingWakeUp.h
index 54282f5d..2a4e7509 100644
--- a/src/displayapp/screens/settings/SettingWakeUp.h
+++ b/src/displayapp/screens/settings/SettingWakeUp.h
@@ -23,6 +23,7 @@ namespace Pinetime {
Controllers::Settings::WakeUpMode wakeUpMode;
const char* name;
};
+
Controllers::Settings& settingsController;
static constexpr std::array<Option, 4> options = {{
{Controllers::Settings::WakeUpMode::SingleTap, "Single Tap"},