InfiniTime/src/displayapp/screens/FlashLight.h

39 lines
989 B
C
Raw Normal View History

#pragma once
#include "Screen.h"
#include "components/brightness/BrightnessController.h"
2021-10-13 10:04:40 +00:00
#include "systemtask/SystemTask.h"
#include <cstdint>
#include <lvgl/lvgl.h>
namespace Pinetime {
namespace Applications {
namespace Screens {
class FlashLight : public Screen {
2021-04-24 09:00:45 +00:00
public:
FlashLight(DisplayApp* app, System::SystemTask& systemTask, Controllers::BrightnessController& brightness);
~FlashLight() override;
bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override;
void OnClickEvent(lv_obj_t* obj, lv_event_t event);
2021-04-24 09:00:45 +00:00
private:
2021-10-13 10:04:40 +00:00
void SetIndicators();
void SetColors();
Pinetime::System::SystemTask& systemTask;
2021-10-13 10:04:40 +00:00
Controllers::BrightnessController& brightnessController;
Controllers::BrightnessController::Levels brightnessLevel;
lv_obj_t* flashLight;
lv_obj_t* backgroundAction;
2021-10-13 10:04:40 +00:00
lv_obj_t* indicators[3];
bool isOn = false;
};
}
}
}