Format header files
In my PR updating clang-format, I forgot to also format the headers.
This commit is contained in:
@@ -29,6 +29,7 @@ namespace Pinetime {
|
||||
class Cst816S;
|
||||
class WatchdogView;
|
||||
}
|
||||
|
||||
namespace Controllers {
|
||||
class Settings;
|
||||
class Battery;
|
||||
@@ -43,6 +44,7 @@ namespace Pinetime {
|
||||
namespace System {
|
||||
class SystemTask;
|
||||
};
|
||||
|
||||
namespace Applications {
|
||||
class DisplayApp {
|
||||
public:
|
||||
|
@@ -22,6 +22,7 @@ namespace Pinetime {
|
||||
class Cst816S;
|
||||
class WatchdogView;
|
||||
}
|
||||
|
||||
namespace Controllers {
|
||||
class Settings;
|
||||
class Battery;
|
||||
@@ -63,9 +64,11 @@ namespace Pinetime {
|
||||
Pinetime::Controllers::TouchHandler& touchHandler,
|
||||
Pinetime::Controllers::FS& filesystem);
|
||||
void Start();
|
||||
|
||||
void Start(Pinetime::System::BootErrors) {
|
||||
Start();
|
||||
};
|
||||
|
||||
void PushMessage(Pinetime::Applications::Display::Messages msg);
|
||||
void Register(Pinetime::System::SystemTask* systemTask);
|
||||
|
||||
|
@@ -11,6 +11,7 @@ namespace Pinetime {
|
||||
class LittleVgl {
|
||||
public:
|
||||
enum class FullRefreshDirections { None, Up, Down };
|
||||
|
||||
LittleVgl(Pinetime::Drivers::St7789& lcd, Pinetime::Drivers::Cst816S& touchPanel) {
|
||||
}
|
||||
|
||||
@@ -24,13 +25,17 @@ namespace Pinetime {
|
||||
|
||||
void FlushDisplay(const lv_area_t* area, lv_color_t* color_p) {
|
||||
}
|
||||
|
||||
bool GetTouchPadInfo(lv_indev_data_t* ptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void SetFullRefresh(FullRefreshDirections direction) {
|
||||
}
|
||||
|
||||
void SetNewTapEvent(uint16_t x, uint16_t y) {
|
||||
}
|
||||
|
||||
void SetNewTouchPoint(uint16_t x, uint16_t y, bool contact) {
|
||||
}
|
||||
};
|
||||
|
@@ -52,9 +52,11 @@ namespace Pinetime {
|
||||
static constexpr uint8_t nbWriteLines = 4;
|
||||
static constexpr uint16_t totalNbLines = 320;
|
||||
static constexpr uint16_t visibleNbLines = 240;
|
||||
|
||||
static constexpr uint8_t MaxScrollOffset() {
|
||||
return LV_VER_RES_MAX - nbWriteLines;
|
||||
}
|
||||
|
||||
FullRefreshDirections scrollDirection = FullRefreshDirections::None;
|
||||
uint16_t writeOffset = 0;
|
||||
uint16_t scrollOffset = 0;
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Applications {
|
||||
namespace Display {
|
||||
|
@@ -15,6 +15,7 @@ namespace Pinetime {
|
||||
class CheckboxList : public Screen {
|
||||
public:
|
||||
static constexpr size_t MaxItems = 4;
|
||||
|
||||
struct Item {
|
||||
const char* name;
|
||||
bool enabled;
|
||||
|
@@ -8,6 +8,7 @@ namespace Pinetime {
|
||||
namespace Controllers {
|
||||
class Ble;
|
||||
}
|
||||
|
||||
namespace Applications {
|
||||
namespace Screens {
|
||||
|
||||
|
@@ -11,6 +11,7 @@ namespace Pinetime {
|
||||
namespace Controllers {
|
||||
class HeartRateController;
|
||||
}
|
||||
|
||||
namespace Applications {
|
||||
namespace Screens {
|
||||
|
||||
|
@@ -10,6 +10,7 @@ namespace Pinetime {
|
||||
namespace Components {
|
||||
class LittleVgl;
|
||||
}
|
||||
|
||||
namespace Applications {
|
||||
namespace Screens {
|
||||
|
||||
|
@@ -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:
|
||||
|
@@ -8,6 +8,7 @@ namespace Pinetime {
|
||||
namespace Components {
|
||||
class LittleVgl;
|
||||
}
|
||||
|
||||
namespace Applications {
|
||||
namespace Screens {
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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,
|
||||
|
@@ -9,6 +9,7 @@ namespace Pinetime {
|
||||
bool merged = false;
|
||||
unsigned int value = 0;
|
||||
};
|
||||
|
||||
namespace Screens {
|
||||
class Twos : public Screen {
|
||||
public:
|
||||
|
@@ -18,6 +18,7 @@ namespace Pinetime {
|
||||
class Ble;
|
||||
class NotificationManager;
|
||||
}
|
||||
|
||||
namespace Applications {
|
||||
namespace Screens {
|
||||
|
||||
|
@@ -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};
|
||||
|
@@ -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"}}};
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include <components/motion/MotionController.h>
|
||||
#include "systemtask/SystemTask.h"
|
||||
|
||||
namespace Pinetime {
|
||||
|
||||
namespace Applications {
|
||||
|
@@ -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"},
|
||||
|
@@ -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"},
|
||||
|
@@ -15,9 +15,11 @@ namespace Pinetime {
|
||||
StatusIcons(Controllers::Battery& batteryController, Controllers::Ble& bleController);
|
||||
void Align();
|
||||
void Create();
|
||||
|
||||
lv_obj_t* GetObject() {
|
||||
return container;
|
||||
}
|
||||
|
||||
void Update();
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user