SDL_CreateWindowWithPosition() and SDL_CreateWindowFrom() have been replaced with SDL_CreateWindowWithProperties()

This is a more general interface that can be extended in the future as needed.
This commit is contained in:
Sam Lantinga
2023-11-13 11:29:30 -08:00
parent 2c1fbe1967
commit 229b7b9d50
47 changed files with 470 additions and 573 deletions

View File

@@ -559,10 +559,10 @@ The following hints have been removed:
* SDL_HINT_IME_SUPPORT_EXTENDED_TEXT - the normal text editing event has extended text
* SDL_HINT_MOUSE_RELATIVE_SCALING - mouse coordinates are no longer automatically scaled by the SDL renderer
* SDL_HINT_RENDER_LOGICAL_SIZE_MODE - the logical size mode is explicitly set with SDL_SetRenderLogicalPresentation()
* SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL - replaced with the "opengl" property in SDL_CreateWindowFrom()
* SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN - replaced with the "vulkan" property in SDL_CreateWindowFrom()
* SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL - replaced with the "opengl" property in SDL_CreateWindowWithProperties()
* SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN - replaced with the "vulkan" property in SDL_CreateWindowWithProperties()
* SDL_HINT_VIDEO_HIGHDPI_DISABLED - high DPI support is always enabled
* SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT - replaced with the "win32.pixel_format_hwnd" in SDL_CreateWindowFrom()
* SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT - replaced with the "native.win32.pixel_format_hwnd" in SDL_CreateWindowWithProperties()
* SDL_HINT_VIDEO_X11_FORCE_EGL - use SDL_HINT_VIDEO_FORCE_EGL instead
* SDL_HINT_VIDEO_X11_XINERAMA - Xinerama no longer supported by the X11 backend
* SDL_HINT_VIDEO_X11_XVIDMODE - Xvidmode no longer supported by the X11 backend
@@ -1261,9 +1261,7 @@ Rather than iterating over displays using display index, there is a new function
}
```
SDL_CreateWindow() has been simplified and no longer takes a window position. You can use SDL_CreateWindowWithPosition() if you need to set the window position when creating it.
SDL_CreateWindowFrom() now takes a set of properties that describe the native window and options.
SDL_CreateWindow() has been simplified and no longer takes a window position. You can use SDL_CreateWindowWithProperties() if you need to set the window position when creating it.
The SDL_WINDOWPOS_UNDEFINED_DISPLAY() and SDL_WINDOWPOS_CENTERED_DISPLAY() macros take a display ID instead of display index. The display ID 0 has a special meaning in this case, and is used to indicate the primary display.
@@ -1332,6 +1330,7 @@ The following functions have been removed:
* SDL_GetNumVideoDisplays() - replaced with SDL_GetDisplays()
* SDL_GetWindowData() - use SDL_GetWindowProperties() instead
* SDL_SetWindowData() - use SDL_GetWindowProperties() instead
* SDL_CreateWindowFrom() - use SDL_CreateWindowWithProperties() with "native.*" properties instead
SDL_Window id type is named SDL_WindowID