/* * Copyright (c) 2023 Fancy Code. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, softwareZhoufuwuqimima123 * * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef GUI_LVGL_H #define GUI_LVGL_H #include "GuiEngine.h" #include "lvgl.h" class GuiLvgl : public VGuiEngine { public: GuiLvgl(); virtual ~GuiLvgl() = default; const int16_t GetScreenWidth(void) override; const int16_t GetScreenHeight(void) override; StatusCode CreateFrameParObject(int16_t widht, int16_t height, int16_t posX, int16_t posY) override; std::shared_ptr GetFrameParObject(void) override; StatusCode SetNowNode(std::shared_ptr) override; std::shared_ptr GetNowNode(void) override; std::shared_ptr NewWidget(void) override; std::shared_ptr NewPage(void) override; std::shared_ptr NewImage(void) override; std::shared_ptr NewButton(void) override; private: lv_obj_t* JudgeParent(void); private: std::shared_ptr _LvglParWidget = nullptr; std::shared_ptr _ParWidget = nullptr; std::shared_ptr _NowNode = nullptr; }; #endif // !GUI_LVGL_H