25 lines
737 B
C++
Executable File
25 lines
737 B
C++
Executable File
#include "lvgl_board_main.h"
|
|
#include "LvglBoard.h"
|
|
#include <iostream>
|
|
#include <thread>
|
|
bool CreateGuiEngineImpl()
|
|
{
|
|
std::shared_ptr<GuiEngine> impl = std::move(std::make_shared<LvglLinuxBoard>());
|
|
GuiEngine::GetInstance(&impl);
|
|
return true;
|
|
}
|
|
bool LvglLinuxBoard::Init(const unsigned int width, const unsigned int height, void (*appInit)())
|
|
{
|
|
auto mainFunc = [](const unsigned int width_, const unsigned int height_, void (*appInit_)())
|
|
{
|
|
lvgl_board_main(width_, height_, appInit_);
|
|
};
|
|
std::thread(mainFunc, width, height, appInit).detach();
|
|
return true;
|
|
}
|
|
void LvglLinuxBoard::UnInit()
|
|
{
|
|
lvgl_board_exit();
|
|
std::cout << "LvglLinuxBoard UnInit." << std::endl;
|
|
}
|