stuff-from-scratch/test/windows/TestWaylandWindow.cpp

30 lines
627 B
C++
Raw Normal View History

2022-11-11 10:35:41 +00:00
#include "WaylandInterface.h"
2022-05-18 07:42:44 +00:00
#include "Window.h"
2022-11-10 10:48:22 +00:00
#include "FileLogger.h"
2022-05-18 07:42:44 +00:00
2022-11-10 17:10:18 +00:00
#include "DesktopManager.h"
2022-05-18 07:42:44 +00:00
int main()
{
2022-11-10 10:48:22 +00:00
FileLogger::GetInstance().Open();
2022-11-11 10:35:41 +00:00
auto desktop_manager = DesktopManager::Create();
2022-11-10 17:10:18 +00:00
2022-11-11 10:35:41 +00:00
auto window = desktop_manager->GetWindowManager()->GetMainWindow();
2022-11-10 10:48:22 +00:00
window->SetSize(800, 600);
2022-05-18 07:42:44 +00:00
2022-11-11 10:35:41 +00:00
WaylandInterface window_interface(desktop_manager.get());
window_interface.setUseHardwareRendering(true);
window_interface.initialize();
window_interface.addWindow(window);
2022-05-18 07:42:44 +00:00
2022-11-11 10:35:41 +00:00
window_interface.showWindow(window);
2022-05-18 07:42:44 +00:00
2022-11-11 10:35:41 +00:00
window_interface.loop();
2022-05-18 07:42:44 +00:00
2022-11-10 17:10:18 +00:00
window_interface.shutDown();
2022-11-10 10:48:22 +00:00
return 0;
2022-05-18 07:42:44 +00:00
}