diff options
Diffstat (limited to 'src/displayapp/screens/FlashLight.h')
| -rw-r--r-- | src/displayapp/screens/FlashLight.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/displayapp/screens/FlashLight.h b/src/displayapp/screens/FlashLight.h index f227599..827502a 100644 --- a/src/displayapp/screens/FlashLight.h +++ b/src/displayapp/screens/FlashLight.h @@ -11,6 +11,13 @@ namespace Pinetime { namespace Applications { namespace Screens { + namespace FlashLightData { + namespace { + typedef Pinetime::Controllers::BrightnessController::Levels Levels; + } + extern Levels brightnessLevel; + } + class FlashLight : public Screen { public: FlashLight(DisplayApp* app, System::SystemTask& systemTask, Controllers::BrightnessController& brightness, lv_color_t color = LV_COLOR_WHITE); @@ -19,6 +26,7 @@ namespace Pinetime { bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override; private: + void Update(bool on, Pinetime::Controllers::BrightnessController::Levels level); inline void OnClickEvent(lv_obj_t* obj, lv_event_t event) { if (obj == backgroundAction) { if (event == LV_EVENT_CLICKED) { @@ -27,17 +35,15 @@ namespace Pinetime { } else { return; } + using namespace FlashLightData; Update(!isOn, brightnessLevel); } } - void Update(bool on, Pinetime::Controllers::BrightnessController::Levels level); static void EventHandler(lv_obj_t* obj, lv_event_t event); Pinetime::System::SystemTask& systemTask; Controllers::BrightnessController& brightnessController; - Controllers::BrightnessController::Levels brightnessLevel; - lv_obj_t* flashLight; lv_obj_t* backgroundAction; lv_obj_t* indicators[3]; |
