Commit Graph

294 Commits

Author SHA1 Message Date
Ryan C. Gordon 7a5604cf0c
Sync SDL3 wiki -> headers. 2025-01-21 13:12:25 -05:00
SDL Wiki Bot 670a7d8126 Sync SDL3 wiki -> header
[ci skip]
2025-01-21 16:11:20 +00:00
Frank Praznik 8a67896d9a
docs: Note the preferred function for getting the content scale of a window
SDL_GetWindowDisplayScale() should be preferred over SDL_GetDisplayForWindow() + SDL_GetDisplayContentScale() for querying the per-window content scale, as the former provides a more accurate and current value for individual windows, as the per-window value can differ from the base display scale value, particularly on high-DPI and multi-monitor desktops.
2025-01-21 11:07:11 -05:00
SDL Wiki Bot 9ed96f392d Sync SDL3 wiki -> header
[ci skip]
2025-01-17 19:46:20 +00:00
Sam Lantinga ae8df1dcbd Note that the primary monitor isn't always at 0,0 2025-01-17 11:52:33 -08:00
Ryan C. Gordon 56d7cc7a02
SDL_video.h: Added a note about platform quirks to SDL_DestroyWindow docs.
Fixes #10081.
2025-01-04 03:48:10 -05:00
SDL Wiki Bot 32ab09ba21 Sync SDL3 wiki -> header
[ci skip]
2025-01-02 19:44:57 +00:00
Frank Praznik 1461f893c3
video: Correct the window position property documentation
Windows are only relative to the parent if the "tooltip" or "menu" property is set.
2025-01-02 14:44:08 -05:00
Sam Lantinga f2074d7af3 Updated copyright for 2025 2025-01-01 07:45:52 -08:00
Ryan C. Gordon f0fad41f2c
include: Filled in all remaining missing documentation! 2024-12-22 01:58:13 -05:00
SDL Wiki Bot 19bdc01b8c Sync SDL3 wiki -> header
[ci skip]
2024-12-17 15:46:19 +00:00
Frank Praznik eda0261c4e video: Drop size and position requests for windows in a fixed size/position state
It is not uncommon for clients to redundantly set the window size and position, either as a holdover from an SDL 1 port, when this was required, due to any window state change triggering a universal update function that sets all window state, even if unnecessary (e.g. always calling SDL_SetWindowSize(), even if the window is fullscreen), or due to the use of compatability layers. Historically, these clients expect that their behavior won't override the base window state, which is an assumption that the windowing changes in SDL 3 broke by caching size and position changes that can't be applied immediately.

This change drops size and position requests when the window is in the maximized and fullscreen states (fullscreen-desktop windows will be repositioned, but the non-fullscreen floating position will not be overwritten), which is behavior more in line with existing client assumptions, and should ease the porting process, as well as prevent annoying bugs when older software is run via sdl2-compat.

In the process of making these changes, pending window state has been moved to separate variables in the SDL_Window struct, as this fixes bugs regarding fullscreen display selection and centering windows immediately after resize on asynchronous platforms, which had issues due to pending state possibly being overwritten.
2024-12-17 10:45:40 -05:00
Sam Lantinga bc4185c685 Document that video and input functions should be called on the main thread.
This is a hard requirement on Apple platforms and while most other platforms don't have a concept of main thread, all video and input functions should be called on the same thread.
2024-12-05 13:53:51 -08:00
SDL Wiki Bot 3c13bae64f Sync SDL3 wiki -> header
[ci skip]
2024-11-25 19:07:53 +00:00
SDL Wiki Bot e9fdcf6c60 Sync SDL3 wiki -> header
[ci skip]
2024-11-25 17:20:21 +00:00
SDL Wiki Bot e14d939ead Sync SDL3 wiki -> header
[ci skip]
2024-11-24 17:41:07 +00:00
SDL Wiki Bot 3877bf55a3 Sync SDL3 wiki -> header
[ci skip]
2024-11-13 20:44:45 +00:00
SDL Wiki Bot fb2145f731 Sync SDL3 wiki -> header
[ci skip]
2024-11-04 05:04:44 +00:00
Petar Popovic 96729e745a SDL_GetClosestFullscreenDisplayMode(): Rename parameter `mode` to `closest`
Also: Check, if the parameter is NULL inside the function.
2024-11-03 21:03:44 -08:00
SDL Wiki Bot cacfdc8cfa Sync SDL3 wiki -> header
[ci skip]
2024-11-03 05:23:05 +00:00
Sam Lantinga 7031b240df Added SDL_PROP_WINDOW_WAYLAND_VIEWPORT_POINTER 2024-11-02 22:22:29 -07:00
Ryan C. Gordon 7108291d0b video: Change SDL_GLattr to SDL_GLAttr. 2024-10-23 18:50:52 -04:00
Ryan C. Gordon c0e9205a92 video: Change capitalization on various OpenGL attribute typedefs. 2024-10-23 18:50:52 -04:00
Ryan C. Gordon 3c506630c3 video: Turn several OpenGL attribute enums into integer typedefs.
Fixes #11308.
2024-10-23 18:50:52 -04:00
Ryan C. Gordon 1c1706a00b
fnsince: update `\since` policy for documentation.
Everything in SDL3 up to the ABI lock is reported as available since 3.1.3.
Everything else will be reported as since 3.2.0 (what will be the first
official release).

Also ran a Perl script over the headers to change everything to 3.1.3 that
wasn't an API function, since fnsince.pl can't manage those. If there's a
macro or datatype that has snuck in that needs to be 3.2.0 instead, we'll
have to manually fix it up, but it shouldn't be a big deal in any case.

Reference PR #11304.
2024-10-23 12:22:43 -04:00
Frank Praznik 541ba33714
Fix SDL_GetClosestFullscreenDisplayMode documentation
It returns false on failure, not NULL.
2024-10-19 16:01:08 -04:00
SDL Wiki Bot 2654d5d48b Sync SDL3 wiki -> header
[ci skip]
2024-10-18 02:34:29 +00:00
Sam Lantinga e81e917c5e Added an OpenVR video driver (thanks @cnlohr!) 2024-10-17 19:38:04 -07:00
SDL Wiki Bot b865708039 Sync SDL3 wiki -> header
[ci skip]
2024-10-14 16:02:54 +00:00
Sam Lantinga 0b6ad8bf62 Improved the documentation for SDL_SetWindowShape()
Fixes https://github.com/libsdl-org/SDL/issues/11199
2024-10-14 09:02:04 -07:00
SDL Wiki Bot e4b1a9f382 Sync SDL3 wiki -> header
[ci skip]
2024-10-10 15:24:38 +00:00
SDL Wiki Bot 95aaaa3232 Sync SDL3 wiki -> header
[ci skip]
2024-10-08 17:06:41 +00:00
Frank Praznik 158ba93d61
Update some window function documentation
Updates some documentation to correspond with changes made since it was originally written, clarifies some function behavior, and includes some assorted typo fixes.
2024-10-08 13:05:20 -04:00
SDL Wiki Bot d0ef58b442 Sync SDL3 wiki -> header
[ci skip]
2024-10-06 23:03:29 +00:00
SDL Wiki Bot cbb9a16367 Sync SDL3 wiki -> header
'[ci skip]'
2024-10-06 22:58:06 +00:00
SDL Wiki Bot a3413e050b Sync SDL3 wiki -> header 2024-10-04 20:23:29 +00:00
Ryan C. Gordon c25423b94c
docs: Filled in some category pages. 2024-10-04 16:22:00 -04:00
SDL Wiki Bot ca0b1eaf5a Sync SDL3 wiki -> header 2024-10-04 05:54:33 +00:00
Sam Lantinga 93c27a6675 Fixed the documentation for consistency. 2024-10-03 22:54:05 -07:00
SDL Wiki Bot 3ae2af8aa1 Sync SDL3 wiki -> header 2024-10-04 05:53:50 +00:00
Ryan C. Gordon 9a5d5a2839 video: Improve the EGL attribute callbacks.
Now it has access to information it needs and it's clear who is reponsible
for memory management.

Fixes #11039.
2024-10-03 22:52:52 -07:00
SDL Wiki Bot 34033d5838 Sync SDL3 wiki -> header 2024-10-01 18:45:52 +00:00
Sam Lantinga eced9f58a9 Added a userdata parameter for EGL attribute callbacks
Fixes https://github.com/libsdl-org/SDL/issues/11013
2024-10-01 11:45:19 -07:00
SDL Wiki Bot 026d3c2306 Sync SDL3 wiki -> header 2024-09-18 15:33:11 +00:00
Sam Lantinga a90ad3b0e2 Removed SDL_bool in favor of plain bool
We require stdbool.h in the build environment, so we might as well use the plain bool type.

If your environment doesn't have stdbool.h, this simple replacement will suffice:
typedef signed char bool;
2024-09-18 08:32:30 -07:00
SDL Wiki Bot 926d143966 Sync SDL3 wiki -> header 2024-09-16 20:12:52 +00:00
Sam Lantinga 1bbc897e48 Updated documentation for bool return type
Also updated the test CRC functions to return bool.
2024-09-16 13:12:15 -07:00
SDL Wiki Bot f006d61bd1 Sync SDL3 wiki -> header 2024-09-16 17:57:51 +00:00
SDL Wiki Bot 1ba99c53d4 Sync SDL3 wiki -> header 2024-09-08 04:22:26 +00:00
SDL Wiki Bot 2b77b2e4ef Sync SDL3 wiki -> header 2024-09-08 04:18:26 +00:00