diff options
Diffstat (limited to 'src/DisplayApp/LittleVgl.h')
-rw-r--r-- | src/DisplayApp/LittleVgl.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/DisplayApp/LittleVgl.h b/src/DisplayApp/LittleVgl.h index 555f5f0f..c6e728b2 100644 --- a/src/DisplayApp/LittleVgl.h +++ b/src/DisplayApp/LittleVgl.h @@ -14,6 +14,7 @@ namespace Pinetime { namespace Components { class LittleVgl { public: + enum class FullRefreshDirections { None, Up, Down }; LittleVgl(Pinetime::Drivers::St7789& lcd, Pinetime::Drivers::Cst816S& touchPanel); LittleVgl(const LittleVgl&) = delete; @@ -23,7 +24,9 @@ namespace Pinetime { void FlushDisplay(const lv_area_t * area, lv_color_t * color_p); bool GetTouchPadInfo(lv_indev_data_t *ptr); - void SetFullRefresh(); + void SetFullRefresh(FullRefreshDirections direction); + void SetNewTapEvent(uint16_t x, uint16_t y); + private: void InitDisplay(); void InitTouchpad(); @@ -99,15 +102,17 @@ namespace Pinetime { lv_style_t win_btn_pr; bool firstTouch = true; - bool fullRefresh = false; 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; } - enum class ScrollDirections {Unknown, Up, Down}; - ScrollDirections scrollDirection = ScrollDirections::Up; + 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; }; } } |