2020-02-16 18:32:36 +01:00
|
|
|
#pragma once
|
|
|
|
|
2020-11-15 16:49:36 +01:00
|
|
|
#include <lvgl/lvgl.h>
|
2020-02-16 18:32:36 +01:00
|
|
|
#include <cstdint>
|
2020-11-15 16:49:36 +01:00
|
|
|
#include <memory>
|
|
|
|
#include "Screen.h"
|
|
|
|
#include "../Apps.h"
|
2021-02-24 20:40:24 +01:00
|
|
|
#include "components/settings/Settings.h"
|
2020-02-16 18:32:36 +01:00
|
|
|
|
|
|
|
namespace Pinetime {
|
|
|
|
namespace Applications {
|
|
|
|
namespace Screens {
|
|
|
|
class Tile : public Screen {
|
|
|
|
public:
|
2020-08-14 09:46:37 +02:00
|
|
|
struct Applications {
|
|
|
|
const char* icon;
|
|
|
|
Pinetime::Applications::Apps application;
|
|
|
|
};
|
|
|
|
|
2021-02-24 20:40:24 +01:00
|
|
|
explicit Tile(uint8_t screenID, DisplayApp* app, Controllers::Settings& settingsController, std::array<Applications, 6>& applications);
|
2020-02-16 18:32:36 +01:00
|
|
|
~Tile() override;
|
|
|
|
|
2020-02-23 16:14:03 +01:00
|
|
|
bool Refresh() override;
|
2020-02-23 13:44:39 +01:00
|
|
|
bool OnButtonPushed() override;
|
|
|
|
|
2020-02-23 16:14:03 +01:00
|
|
|
void OnObjectEvent(lv_obj_t* obj, lv_event_t event, uint32_t buttonId);
|
2020-02-16 18:32:36 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
lv_obj_t * btnm1;
|
2020-02-23 13:44:39 +01:00
|
|
|
bool running = true;
|
2020-02-26 20:49:26 +01:00
|
|
|
|
2020-08-14 09:46:37 +02:00
|
|
|
const char* btnm_map1[8];
|
|
|
|
Pinetime::Applications::Apps apps[6];
|
2020-02-16 18:32:36 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|