NativeWindow.h
1 
8 #pragma once
9 // LIBOS LICENCE
10 //
11 // GNU Lesser General Public License Version 3.0
12 //
13 // Copyright Luke Shore (c) 2020, 2023
15 #include <libos/Window.h>
19 typedef enum losUsedWindowAPI
20 {
21  WIN32_API,
22  WINRT_API,
23  XCB_API,
24  WAYLAND_API
25 } losUsedWindowAPI;
26 
27 #if __has_include(<wayland-client.h>)
31 typedef struct losWindowWayland
32 {
33  void *display;
34  void *surface;
35  explicit losWindowWayland(void *display_in, void *surface_in)
36  : display(display_in)
37  , surface(surface_in){};
38 } losWindowWayland;
39 #endif
40 #if __has_include(<xcb/xcb.h>)
44 typedef struct losWindowXCB
45 {
46  void *connection;
47  void *window;
48  explicit losWindowXCB(void *connection_in, void *window_in)
49  : connection(connection_in)
50  , window(window_in){};
51 } losWindowXCB;
52 #endif
53 #if __has_include(<windows.h>)
57 typedef struct losWindowWin32
58 {
59  void *window;
60  explicit losWindowWin32(void *window_in)
61  : window(window_in){};
62 } losWindowWin32;
63 #endif
67 EXPORT_DLL losUsedWindowAPI losWhatApiIsWindowUsed(losWindow window);
71 EXPORT_DLL void *losGetWindowNativePointer(losWindow window);
#define EXPORT_DLL
on windows some extra syntax is required for the dll to work properly so that is dose not affect the ...
Definition: Defines.h:33
WINDOW is a simple cross-platform API for accessing the native platform window, keyboard and mouse io...
struct losWindow_T * losWindow
this is the Library object that is used to Control the Native as the user only holds a pointer to the...
Definition: Window.h:20