Fix WindowHandles

This commit is contained in:
Lynix
2020-05-27 18:55:03 +02:00
parent 65ee3c5c2a
commit 2d189dc85e
11 changed files with 143 additions and 49 deletions

View File

@@ -8,11 +8,44 @@
#define NAZARA_WINDOWHANDLE_HPP
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Utility/Config.hpp>
namespace Nz
{
// Real type is SDL_Window
using WindowHandle = void*;
enum class WindowManager
{
None,
X11,
Wayland,
Windows
};
struct WindowHandle
{
WindowManager type = WindowManager::None;
union
{
struct
{
void* display; //< Display*
void* window; //< Window
} x11;
struct
{
void* display; //< wl_display*
void* surface; //< wl_surface*
void* shellSurface; //< wl_shell_surface*
} wayland;
struct
{
void* window; //< HWND
} windows;
};
};
}
#endif // NAZARA_WINDOWHANDLE_HPP