hunting/middleware/GuiEngine/lvgl_common/GuiLvgl.h

48 lines
1.6 KiB
C++

/*
* 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 GuiEngine
{
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<Widget> GetFrameParObject(void) override;
StatusCode SetNowNode(std::shared_ptr<Widget>) override;
std::shared_ptr<Widget> GetNowNode(void) override;
std::shared_ptr<Widget> NewWidget(void) override;
std::shared_ptr<Widget> NewPage(void) override;
std::shared_ptr<Widget> NewImage(void) override;
std::shared_ptr<Widget> NewButton(void) override;
private:
lv_obj_t* JudgeParent(void);
private:
std::shared_ptr<Widget> _LvglParWidget = nullptr;
std::shared_ptr<Widget> _ParWidget = nullptr;
std::shared_ptr<Widget> _NowNode = nullptr;
};
#endif // !GUI_LVGL_H