2020-08-21 11:55:59 +02:00
|
|
|
#pragma once
|
|
|
|
|
2020-11-15 16:49:36 +01:00
|
|
|
#include <lvgl/lvgl.h>
|
2020-08-21 11:55:59 +02:00
|
|
|
#include <cstdint>
|
|
|
|
#include "Screen.h"
|
|
|
|
|
|
|
|
namespace Pinetime {
|
2020-11-15 16:49:36 +01:00
|
|
|
namespace Components {
|
|
|
|
class LittleVgl;
|
|
|
|
}
|
2020-08-21 11:55:59 +02:00
|
|
|
namespace Applications {
|
|
|
|
namespace Screens {
|
2020-11-15 16:49:36 +01:00
|
|
|
|
2020-10-09 10:35:32 +02:00
|
|
|
class InfiniPaint : public Screen {
|
|
|
|
public:
|
|
|
|
InfiniPaint(DisplayApp* app, Pinetime::Components::LittleVgl& lvgl);
|
2020-11-15 16:49:36 +01:00
|
|
|
|
2020-10-09 10:35:32 +02:00
|
|
|
~InfiniPaint() override;
|
2020-11-15 16:49:36 +01:00
|
|
|
|
2020-10-09 10:35:32 +02:00
|
|
|
bool Refresh() override;
|
2020-11-15 16:49:36 +01:00
|
|
|
|
2020-10-09 10:35:32 +02:00
|
|
|
bool OnButtonPushed() override;
|
2020-11-15 16:49:36 +01:00
|
|
|
|
2020-10-09 10:35:32 +02:00
|
|
|
bool OnTouchEvent(TouchEvents event) override;
|
2020-11-15 16:49:36 +01:00
|
|
|
|
2020-10-09 10:35:32 +02:00
|
|
|
bool OnTouchEvent(uint16_t x, uint16_t y) override;
|
2020-11-15 16:49:36 +01:00
|
|
|
|
2020-10-09 10:35:32 +02:00
|
|
|
private:
|
|
|
|
Pinetime::Components::LittleVgl& lvgl;
|
|
|
|
static constexpr uint16_t width = 10;
|
|
|
|
static constexpr uint16_t height = 10;
|
|
|
|
static constexpr uint16_t bufferSize = width * height;
|
|
|
|
lv_color_t b[bufferSize];
|
|
|
|
bool running = true;
|
2020-08-21 11:55:59 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|