Create an SDL window from properties representing an existing native window.
SDL_Window* SDL_CreateWindowFrom(SDL_PropertiesID props);
props | a set of properties describing the native window and options |
Returns the window that was created or NULL on failure; call SDL_GetError() for more information.
These are the supported properties:
On macOS:
"cocoa.window" (pointer) - the (__unsafe_unretained) NSWindow associated with the window
"cocoa.view" (pointer) - optional, the (__unsafe_unretained) NSView associated with the window, defaults to [window contentView]
On Windows:
"win32.hwnd" (pointer) - the HWND associated with the window
"win32.pixel_format_hwnd" (pointer) - optional, another window to share pixel format with, useful for OpenGL windows
On X11:
"x11.window" (number) - the X11 Window associated with the window
On all platforms:
"opengl" (boolean) - optional, true if the window will be used with OpenGL rendering
"vulkan" (boolean) - optional, true if the window will be used with Vulkan rendering
This function is available since SDL 3.0.0.