40 lines
1.1 KiB
C++
Executable File
40 lines
1.1 KiB
C++
Executable File
#include "InterfaceEntryManage.h"
|
|
#include "LvglLinux_x86.h"
|
|
#include "ILog.h"
|
|
#include <iostream>
|
|
#include <thread>
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
extern int mainTest(const unsigned int width, const unsigned int height, void (*appInit)());
|
|
extern int lvglRuning;
|
|
extern const int LVGL_RUNING;
|
|
extern const int LVGL_EXIT;
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
bool CreateGuiEngineImpl()
|
|
{
|
|
std::shared_ptr<GuiEngine> impl = std::move(std::make_shared<LvglLinuxX86>());
|
|
GuiEngine::GetInstance(&impl);
|
|
return true;
|
|
}
|
|
bool LvglLinuxX86::Init(const unsigned int width, const unsigned int height, void (*appInit)())
|
|
{
|
|
InterfaceEntry::GetInstance()->InterfaceEntryFuncArray_pusBack(appInit);
|
|
mainTest(width, height, InterfaceEntryFuncArrayOperation);
|
|
return true;
|
|
}
|
|
void LvglLinuxX86::UnInit()
|
|
{
|
|
/**
|
|
* @brief
|
|
* There is no need to uninit the lvgl, maybe lvgl will do it automatically.
|
|
*/
|
|
lvglRuning = LVGL_EXIT;
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(1000 * 2));
|
|
// monitor_uninit();
|
|
std::cout << "LvglLinuxX86 UnInit." << std::endl;
|
|
}
|