summaryrefslogtreecommitdiff
path: root/src/displayapp/LittleVgl.h
diff options
context:
space:
mode:
authorAvamander <avamander@gmail.com>2021-04-18 20:28:14 +0300
committerAvamander <avamander@gmail.com>2021-04-24 11:39:53 +0300
commit40d45d923b033363ff1304b47eac238dd4495a57 (patch)
tree9e7b668fdf23a7be892b8e2bf8b4d62b884cee06 /src/displayapp/LittleVgl.h
parente56ebb8bd621cc8838e86fa032d680a6e7a35ffc (diff)
Reformatted all the files according to clang-format style
Diffstat (limited to 'src/displayapp/LittleVgl.h')
-rw-r--r--src/displayapp/LittleVgl.h87
1 files changed, 43 insertions, 44 deletions
diff --git a/src/displayapp/LittleVgl.h b/src/displayapp/LittleVgl.h
index 28a02e0b..b10b14fa 100644
--- a/src/displayapp/LittleVgl.h
+++ b/src/displayapp/LittleVgl.h
@@ -10,50 +10,49 @@ namespace Pinetime {
namespace Components {
class LittleVgl {
- public:
- enum class FullRefreshDirections { None, Up, Down, Left, Right, LeftAnim, RightAnim };
- LittleVgl(Pinetime::Drivers::St7789& lcd, Pinetime::Drivers::Cst816S& touchPanel);
-
- LittleVgl(const LittleVgl&) = delete;
- LittleVgl& operator=(const LittleVgl&) = delete;
- LittleVgl(LittleVgl&&) = delete;
- LittleVgl& operator=(LittleVgl&&) = delete;
-
- void FlushDisplay(const lv_area_t * area, lv_color_t * color_p);
- bool GetTouchPadInfo(lv_indev_data_t *ptr);
- void SetFullRefresh(FullRefreshDirections direction);
- void SetNewTapEvent(uint16_t x, uint16_t y);
-
- private:
- void InitDisplay();
- void InitTouchpad();
- void InitTheme();
-
-
- Pinetime::Drivers::St7789& lcd;
- Pinetime::Drivers::Cst816S& touchPanel;
-
-
- lv_disp_buf_t disp_buf_2;
- lv_color_t buf2_1[LV_HOR_RES_MAX * 4];
- lv_color_t buf2_2[LV_HOR_RES_MAX * 4];
-
- lv_disp_drv_t disp_drv;
- lv_point_t previousClick;
-
- bool firstTouch = true;
- 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;
-
- uint16_t tap_x = 0;
- uint16_t tap_y = 0;
- bool tapped = false;
+ public:
+ enum class FullRefreshDirections { None, Up, Down, Left, Right, LeftAnim, RightAnim };
+ LittleVgl(Pinetime::Drivers::St7789& lcd, Pinetime::Drivers::Cst816S& touchPanel);
+
+ LittleVgl(const LittleVgl&) = delete;
+ LittleVgl& operator=(const LittleVgl&) = delete;
+ LittleVgl(LittleVgl&&) = delete;
+ LittleVgl& operator=(LittleVgl&&) = delete;
+
+ void FlushDisplay(const lv_area_t* area, lv_color_t* color_p);
+ bool GetTouchPadInfo(lv_indev_data_t* ptr);
+ void SetFullRefresh(FullRefreshDirections direction);
+ void SetNewTapEvent(uint16_t x, uint16_t y);
+
+ private:
+ void InitDisplay();
+ void InitTouchpad();
+ void InitTheme();
+
+ Pinetime::Drivers::St7789& lcd;
+ Pinetime::Drivers::Cst816S& touchPanel;
+
+ lv_disp_buf_t disp_buf_2;
+ lv_color_t buf2_1[LV_HOR_RES_MAX * 4];
+ lv_color_t buf2_2[LV_HOR_RES_MAX * 4];
+
+ lv_disp_drv_t disp_drv;
+ lv_point_t previousClick;
+
+ bool firstTouch = true;
+ 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;
+
+ uint16_t tap_x = 0;
+ uint16_t tap_y = 0;
+ bool tapped = false;
};
}
}
-