SDL Wiki Bot
63138c79af
Sync SDL3 wiki -> header
2024-06-15 05:09:09 +00:00
Ryan C. Gordon
38f0214e8a
audio: Refer to audio devices to "playback" and "recording".
...
Fixes #9619 .
2024-06-15 01:08:12 -04:00
Anonymous Maarten
031dc0743f
Use an opaque struct typedef for SDL_GLContext
...
Using a struct typedef instead of a void pointer results in extra C typechecks
2024-06-15 01:43:22 +02:00
Ryan C. Gordon
51902d4ac5
Updated headers with latest wikiheaders tweaks.
2024-06-14 02:09:55 -04:00
Ryan C. Gordon
5bc654aad3
camera: SDL_GetCameraDeviceName() now follows the SDL_GetStringRule.
2024-06-13 18:13:51 -04:00
Ryan C. Gordon
2ad7c70ac6
documentation: clean up a minor syntax issue.
2024-06-13 18:10:28 -04:00
Ryan C. Gordon
466886049c
SDL_main.h: fix up SDL_main_func documentation to match SDL_main.
2024-06-13 18:08:40 -04:00
SDL Wiki Bot
2253c3cacf
Sync SDL3 wiki -> header
2024-06-13 21:49:55 +00:00
Sam Lantinga
0635112119
Added SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE (thanks @lostgoat!)
2024-06-13 14:54:36 -07:00
SDL Wiki Bot
d46b8bc54e
Sync SDL3 wiki -> header
2024-06-13 21:31:58 +00:00
SDL Wiki Bot
fa3e22c5da
Sync SDL3 wiki -> header
2024-06-13 21:04:27 +00:00
Ryan C. Gordon
12119cbaad
include: Several documentation tweaks; cleaned up new wikiheaders warnings.
2024-06-13 17:03:31 -04:00
SDL Wiki Bot
49f2a3463f
Sync SDL3 wiki -> header
2024-06-13 19:34:29 +00:00
SDL Wiki Bot
674cc04ef4
Sync SDL3 wiki -> header
2024-06-13 02:25:45 +00:00
Sam Lantinga
80a907e0e6
Backed out the viewport and cliprect changes in 9fb5a9ccac
...
This ended up being lots of application code churn without any real benefit in practice.
2024-06-12 19:25:15 -07:00
SDL Wiki Bot
99f0309ac1
Sync SDL3 wiki -> header
2024-06-12 23:34:42 +00:00
SDL Wiki Bot
9e3e489012
Sync SDL3 wiki -> header
2024-06-12 19:10:53 +00:00
Ryan C. Gordon
5416bd5fdc
ios: Move animation callback to its own typedef.
2024-06-12 15:10:16 -04:00
SDL Wiki Bot
5b0f14a936
Sync SDL3 wiki -> header
2024-06-12 17:19:08 +00:00
Sam Lantinga
9fb5a9ccac
Use floating point values for viewport, clip rectangle, and texture sizes
...
These are integer values internally, but the API has been changed to make it easier to mix other render code with querying those values.
Fixes https://github.com/libsdl-org/SDL/issues/7519
2024-06-12 10:18:39 -07:00
SDL Wiki Bot
2d13fefc20
Sync SDL3 wiki -> header
2024-06-12 02:20:21 +00:00
SDL Wiki Bot
a4bb93e8e4
Sync SDL3 wiki -> header
2024-06-12 01:34:03 +00:00
Anonymous Maarten
32907a9606
Rename SDL_Swap(16|32|64)(LE|BE) to SDL_Swap(LE|BE)(16|32|64)
2024-06-12 02:29:39 +02:00
Anonymous Maarten
ef6123886e
Add SDL_ReadS8 and SDL_WriteS8
2024-06-12 01:39:08 +02:00
SDL Wiki Bot
f003461a0b
Sync SDL3 wiki -> header
2024-06-11 16:23:27 +00:00
Ryan C. Gordon
96f2ef77ab
include: Make function pointer params into typedefs.
...
This is easier to read and document in general, but will also make some
new parsing work in wikiheaders much easier.
2024-06-11 12:22:46 -04:00
Ryan C. Gordon
8e782602de
wikiheaders: Fixes and cleanups to fix SDL_ReportAssertion's wiki page.
2024-06-11 11:29:44 -04:00
Sam Lantinga
66aac9aced
Fixed channel order typo
2024-06-10 18:05:31 -07:00
SDL Wiki Bot
454d890bef
Sync SDL3 wiki -> header
2024-06-11 00:57:54 +00:00
Ryan C. Gordon
d3a62d8298
audio: Update docs on channel ordering.
2024-06-10 20:56:50 -04:00
Sam Lantinga
4fc68a48f2
Keep track of whether a controller was a gamepad
...
Fixes https://github.com/libsdl-org/SDL/issues/9996
2024-06-09 17:45:20 -07:00
Ryan C. Gordon
8ddf05855b
iostream: clarified SDL_IO_STATUS_READY documentation.
2024-06-09 13:21:31 -04:00
SDL Wiki Bot
9651ca5918
Sync SDL3 wiki -> header
2024-06-09 05:52:14 +00:00
Ryan C. Gordon
6110405c07
include: Fill in some documentation gaps.
2024-06-09 01:51:30 -04:00
Ryan C. Gordon
7d54a37d74
iostream: Make seeking's `whence` value a real enum.
2024-06-09 01:50:48 -04:00
SDL Wiki Bot
35adef17a8
Sync SDL3 wiki -> header
2024-06-09 05:33:28 +00:00
Ryan C. Gordon
40e8d0155e
SDL_joystick.h: Add some notes to the category documentation.
2024-06-09 01:32:41 -04:00
Ryan C. Gordon
8af58b4bec
SDL_FLT_EPSILON: Updated documentation to be wikiheaders-friendly.
2024-06-08 23:15:21 -04:00
Green Sky
997dd3e6eb
reword SDL_FlashWindow params
...
so they link the types in the wiki
2024-06-08 17:25:27 -04:00
Anthony
e9982bf1b5
Filter Android drivers according to SDL_***_DISABLED macros to help reduce APK size ( #9986 )
2024-06-08 08:55:15 -07:00
Sam Lantinga
e69272344c
Added documentation for SDL_FLT_EPSILON (thanks @MrOnlineCoder!)
...
Closes https://github.com/libsdl-org/sdlwiki/pull/549
2024-06-08 08:29:17 -07:00
SDL Wiki Bot
9a4fc81bff
Sync SDL3 wiki -> header
2024-06-06 17:59:48 +00:00
Sam Lantinga
5701c4f4bc
Added migration documentation for iOS window properties
...
Fixes https://github.com/libsdl-org/SDL/issues/9430
2024-06-06 10:59:15 -07:00
SDL Wiki Bot
a5356f9b45
Sync SDL3 wiki -> header
2024-06-06 17:08:43 +00:00
Sam Lantinga
23db1062fc
Document that you can pass NULL to SDL_PeepEvents()
...
Fixes https://github.com/libsdl-org/sdlwiki/issues/547
2024-06-06 10:08:20 -07:00
Sam Lantinga
9b2debb131
Renamed old function reference
2024-06-04 22:25:37 -07:00
SDL Wiki Bot
e5101ebae6
Sync SDL3 wiki -> header
2024-06-04 04:11:34 +00:00
Sam Lantinga
a0d1445ccb
Replaced SDL_GetRendererInfo() with SDL_GetRendererName()
...
The texture formats are available via the SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER property
Fixes https://github.com/libsdl-org/SDL/issues/9851
2024-06-03 21:10:58 -07:00
SDL Wiki Bot
74c9c9a325
Sync SDL3 wiki -> header
2024-06-04 01:23:30 +00:00
Semphris
8c8ee2174d
Dialog: Add filter number, remove NULL termination
2024-06-03 18:22:26 -07:00
Sam Lantinga
a9a51cebde
Disable raw keyboard input by default
...
It interferes with keyboard hooks and most applications don't expect key events coming from another thread
2024-06-03 14:43:46 -07:00
SDL Wiki Bot
39c2dacc8f
Sync SDL3 wiki -> header
2024-06-03 18:21:49 +00:00
Ryan C. Gordon
e23257307e
Introduce formal policy for APIs that return strings.
...
This declares that any `const char *` returned from SDL is owned by SDL, and
promises to be valid _at least_ until the next time the event queue runs, or
SDL_Quit() is called, even if the thing that owns the string gets destroyed
or changed before then.
This is noted in the headers as "the SDL_GetStringRule", so this will both be
greppable to find a detailed explaination in docs/README-strings.md and
wikiheaders will automatically turn it into a link we can point at the
appropriate documentation.
Fixes #9902 .
(and several FIXMEs, both known and yet-undocumented.)
2024-06-03 14:20:49 -04:00
Carlo Bramini
b1f3682216
SDL_assert: add support for aarch64-w64-mingw32
...
GCC 15 development branch provides an experimental support for Windows on ARM64, which will be officially released next year, according to latest news.
I tried to compile SDL2 with this new compiler but I got a tiny problem into SDL_assert.h because it couldn't find the right platform.
However, it has been easy to fix and I included it into this PR.
More details can be also found here:
https://learn.microsoft.com/en-us/cpp/intrinsics/debugbreak?view=msvc-170
(cherry picked from commit 2cb1a2d0a7 )
2024-06-03 10:55:14 -07:00
Ryan C. Gordon
9a9a3d1a33
SDL_SystemCursor: rename enum items to match CSS.
...
Fixes #9079 .
2024-06-01 22:32:43 -04:00
Ozkan Sezer
49b6c24722
always define PRI?64 using 'I64' when targeting windows
...
avoids -Wformat warnings from mingw toolchains -- e.g.:
src/test/SDL_test_harness.c:581:37: warning: unknown conversion type character 'l' in format [-Wformat=]
2024-06-01 22:35:40 +03:00
Sam Lantinga
b1b4638cac
Add basic vulkan support to offscreen video driver so it doesn't crash if you happen to get the offscreen driver and try to use vulkan.
...
Enable offscreen video driver in windows to make it easier to test.
Enable offscreen video driver in macos just to complete the desktop computer trio.
2024-05-28 20:02:55 -07:00
SDL Wiki Bot
04a0a85d92
Sync SDL3 wiki -> header
2024-05-29 02:48:51 +00:00
Sam Lantinga
542a3663de
Added SDL_GetDefaultKeyFromScancode() to the public API
...
This is useful when getting the English name of a key for a non-Latin keyboard layout, for example.
2024-05-28 19:48:24 -07:00
Ozkan Sezer
2b374e6c0f
check dxgi1_6.h before enabling sdr/hdr code in SDL_windowsmodes.c
...
thanks @madebr
2024-05-28 22:11:56 +03:00
SDL Wiki Bot
98fdef75bb
Sync SDL3 wiki -> header
2024-05-28 18:54:02 +00:00
Sam Lantinga
c74886ab00
Added SDL_SetWindowAspectRatio() and SDL_GetWindowAspectRatio()
...
Fixes https://github.com/libsdl-org/SDL/issues/1573
2024-05-28 11:52:31 -07:00
Sam Lantinga
36015ad5e5
Fixed compiling SDL_platform_defines.h on macOS with older compilers (thanks @sezero!)
...
Fixes #9632
2024-05-27 14:34:21 -07:00
Ryan C. Gordon
e508d82f74
include: Tweaked some vsync-related documentation.
...
Reference PR #9903 .
2024-05-27 16:57:32 -04:00
SDL Wiki Bot
6524f9c9b8
Sync SDL3 wiki -> header
2024-05-27 20:12:47 +00:00
Sam Lantinga
dfe4445214
Added SDL_SetWindowSurfaceVSync() and SDL_GetWindowSurfaceVSync()
...
Fixes https://github.com/libsdl-org/SDL/issues/9347
2024-05-27 13:12:17 -07:00
SDL Wiki Bot
7c75801571
Sync SDL3 wiki -> header
2024-05-27 20:04:46 +00:00
Ryan C. Gordon
3364aff757
main: Make the main callback return value symbols smaller (thanks, @Lzard!).
...
Reference #9901 .
2024-05-27 16:03:45 -04:00
SDL Wiki Bot
a086144dad
Sync SDL3 wiki -> header
2024-05-27 16:59:55 +00:00
Ryan C. Gordon
0fe9900429
main: Main callback docs recommend returning the symbols instead of -1, 0, 1.
...
Reference #9901 .
2024-05-27 12:58:22 -04:00
Sam Lantinga
7d81e9d46c
Note that you can redraw in response to SDL_EVENT_WINDOW_EXPOSED from an event watch callback
2024-05-27 08:06:13 -07:00
SDL Wiki Bot
54fcacae31
Sync SDL3 wiki -> header
2024-05-27 14:58:03 +00:00
Sam Lantinga
14667cc0a3
Document that the timer callback can potentially be called before the timer returns.
2024-05-27 07:57:33 -07:00
Sam Lantinga
99599d9236
Added SDL_AddTimerNS()
2024-05-27 07:57:33 -07:00
Sam Lantinga
b6360516e4
Added the timerID to the SDL timer callback
...
Fixes https://github.com/libsdl-org/SDL/issues/2593
2024-05-27 07:57:33 -07:00
Sam Lantinga
df25e4022d
Removed short aliases for 16-bit pixel formats
...
These were potentially misleading in the same way the RGB888/BGR888 aliases were
Fixes https://github.com/libsdl-org/SDL/issues/4994
2024-05-27 07:24:46 -07:00
SDL Wiki Bot
5fa9432b7d
Sync SDL3 wiki -> header
2024-05-27 02:54:30 +00:00
Ryan C. Gordon
066f49da1a
main: Add some macros for main callback return codes.
...
Fixes #9883 .
2024-05-26 22:53:06 -04:00
SDL Wiki Bot
c168ccc3c3
Sync SDL3 wiki -> header
2024-05-27 02:00:01 +00:00
Anonymous Maarten
ddb826d1a0
VC+d3d12: spread test for __has_include and d3d12.h test over multiple lines
2024-05-27 03:02:10 +02:00
Anonymous Maarten
4fa5006247
VC+d3d12: use __has_include to detect presence of d3d12 ehaders
2024-05-27 00:44:53 +02:00
Sam Lantinga
606903c02f
Updated window event names
2024-05-26 11:13:34 -07:00
Ryan C. Gordon
a4ccace9c5
include: Fix warnings from gendynapi.py.
...
Fixes #9890 .
2024-05-26 13:44:16 -04:00
Ryan C. Gordon
a0376ab057
SDL_MouseButtonFlags: Clarified some documentation.
2024-05-26 13:23:21 -04:00
Ryan C. Gordon
10bbf9d1da
Fixed SDL_PenCapabilityFlags from Uint64 to Uint32.
2024-05-26 13:23:21 -04:00
Ryan C. Gordon
0e6db371e8
pen: Make the `\since` field in SDL_PenCapabilityFlags match everything else.
2024-05-26 13:23:21 -04:00
Ryan C. Gordon
cf2874080f
mouse: Move mouse button state from a Uint32 to a formal typedef.
...
Reference Issue #9812 .
2024-05-26 13:23:21 -04:00
Ryan C. Gordon
13b18e3c41
test: Moved some `Uint32` bitfields over to typedefs.
...
Reference Issue #9812 .
2024-05-26 13:23:21 -04:00
Ryan C. Gordon
0f0570b060
pen: Change a Uint32 bitfield into a typedef.
...
Reference Issue #9812 .
2024-05-26 13:23:21 -04:00
SDL Wiki Bot
8e3ff8c3a1
Sync SDL3 wiki -> header
2024-05-26 17:21:54 +00:00
Sam Lantinga
534768c7c5
Added SDL_PauseAudioStreamDevice() and SDL_ResumeAudioStreamDevice()
2024-05-26 13:21:23 -04:00
SDL Wiki Bot
a6da2e6f8b
Sync SDL3 wiki -> header
2024-05-26 16:19:32 +00:00
Ryan C. Gordon
2626304e70
properties: add formal SDL_CleanupPropertyCallback type, improve docs.
2024-05-26 12:17:34 -04:00
SDL Wiki Bot
84cb065da2
Sync SDL3 wiki -> header
2024-05-26 03:34:35 +00:00
Ryan C. Gordon
033793faed
audio: SDL_OpenAudioDeviceStream() now allows a NULL spec.
2024-05-25 23:34:01 -04:00
Ryan C. Gordon
6a40a8eb12
audio: Minor documentation clarifications.
2024-05-25 23:34:00 -04:00
Sam Lantinga
7a043d9958
Note that SDL_BlitSurface() was renamed SDL_BlitSurfaceScaled()
2024-05-24 05:33:51 -07:00
Sam Lantinga
89caa88b73
Get the definition for SDL_PropertiesID in SDL_thread.h
2024-05-23 17:14:07 -07:00
SDL Wiki Bot
66fbbdf46a
Sync SDL3 wiki -> header
2024-05-23 17:09:44 +00:00
SDL Wiki Bot
3e8d8f81b4
Sync SDL3 wiki -> header
2024-05-23 17:04:35 +00:00
SDL Wiki Bot
be5d4e5857
Sync SDL3 wiki -> header
2024-05-22 21:40:15 +00:00
SDL Wiki Bot
6429806dce
Sync SDL3 wiki -> header
2024-05-22 19:47:56 +00:00
Ryan C. Gordon
daf5009395
dialog: fixed typo in docs.
2024-05-22 14:26:50 -04:00
Semphris
93a0db597a
Add documentation about dialogs and events
2024-05-22 11:26:03 -07:00
Ryan C. Gordon
f2e3437311
include: Fixed headers to not break with wikiheaders. This is a hack for now.
...
I broke the "Don't taunt wikiheaders" rule. :)
https://wiki.libsdl.org/SDL3/README/documentation-rules#dont-taunt-wikiheaders
2024-05-22 12:29:30 -04:00
SDL Wiki Bot
b7bb220e60
Sync SDL3 wiki -> header
2024-05-22 15:40:15 +00:00
Ryan C. Gordon
b2ca8fe458
thread: Simplified docs, moved some technical details to a non-wiki comment.
2024-05-22 11:39:43 -04:00
Ryan C. Gordon
b83bb035e6
thread: SDL_CreateThreadWithStackSize is now SDL_CreateThreadWithProperties.
2024-05-22 11:39:43 -04:00
Ryan C. Gordon
0ec716819e
thread: Reworked SDL_CreateThread to be consistent across platforms.
...
Also documented missing and weird bits, rename typedefs to fit SDL standards.
2024-05-22 11:39:43 -04:00
SDL Wiki Bot
983544a53e
Sync SDL3 wiki -> header
2024-05-22 00:41:09 +00:00
Dragon-Baroque
05fb91c7b4
TESTWM : Option and Keyboard action to ShowCursor and HideCursor
...
In include/SDL3/SDL_test_common.h
Add flag hide_cursor
In src/test/SDL_test_common.c
Handle option --hide-cursor to SDL_HideCursor
Handle Ctrl-h toggle to SDL_HideCursor and SDL_ShowCursor
2024-05-21 13:49:35 -07:00
SDL Wiki Bot
71050341d4
Sync SDL3 wiki -> header
2024-05-20 16:46:41 +00:00
Ryan C. Gordon
dd09d4b4ee
hidapi: Replace BSD license with "original" hidapi license.
...
HIDAPI's source code licensing says this:
```
HIDAPI can be used under one of three licenses.
1. The GNU General Public License, version 3.0, in LICENSE-gpl3.txt
2. A BSD-Style License, in LICENSE-bsd.txt.
3. The more liberal original HIDAPI license. LICENSE-orig.txt
The license chosen is at the discretion of the user of HIDAPI. For example:
1. An author of GPL software would likely use HIDAPI under the terms of the
GPL.
2. An author of commercial closed-source software would likely use HIDAPI
under the terms of the BSD-style license or the original HIDAPI license.
```
Since the original license in LICENSE-orig.txt is basically only clause 3 of
the zlib license (do not remove this notice from the source code), it makes
sense to switch to it, since it adds no new requirements to the user.
(Plus, it's extremely short and direct, which is always nice.)
The entire license:
```
HIDAPI - Multi-Platform library for
communication with HID devices.
Copyright 2009, Alan Ott, Signal 11 Software.
All Rights Reserved.
This software may be used by anyone for any reason so
long as the copyright notice in the source files
remains intact.
```
Fixes #9786 .
2024-05-20 12:45:11 -04:00
SDL Wiki Bot
c6cc719067
Sync SDL3 wiki -> header
2024-05-20 01:46:10 +00:00
Sam Lantinga
6f2621438a
Renamed DECLSPEC to SDL_DECLSPEC
2024-05-17 17:09:09 -07:00
SDL Wiki Bot
eda9247f01
Sync SDL3 wiki -> header
2024-05-17 12:37:31 +00:00
Brick
b6b9d5508e
Renamed SDL_MixAudioFormat to SDL_MixAudio, and use float volume
2024-05-17 13:36:51 +01:00
Ali Emre Gülcü
f17b556c76
Add SDL_Vulkan_DestroySurface functionality ( #9817 )
...
Added SDL_Vulkan_DestroySurface, its documentation and corresponding platform specific implementations. Fixed some header inclusion orders to improve consistency between platforms. Added TODOs regarding MetalView creation and destruction which will benefit from the new functionality.
2024-05-16 17:41:15 -07:00
vittorioromeo
a69eaae32e
Add `SDL_NODISCARD` macro to `SDL_begin_code.h`
2024-05-16 17:08:52 -07:00
Sam Lantinga
7cddde32ac
Removed SDL_SWSURFACE, added unsigned suffix for surface flags
2024-05-16 11:40:38 -07:00
SDL Wiki Bot
919c012d29
Sync SDL3 wiki -> header
2024-05-16 18:24:34 +00:00
Sam Lantinga
abfd0dc683
Added SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL
2024-05-16 11:23:29 -07:00
Sam Lantinga
02ff85f2f3
Renamed SDL_SIMDGetAlignment() to SDL_GetSIMDAlignment()
2024-05-16 10:22:15 -07:00
Sam Lantinga
4609af618a
Updated logging functions for SDL3 naming convention
2024-05-16 10:22:15 -07:00
Ryan C. Gordon
241cfaf38f
surface: Make a typedef for SDL_Surface bitflags, as is SDL3 policy.
...
Reference Issue #9812 .
2024-05-16 12:29:58 -04:00
Ryan C. Gordon
253c917296
SDL_render.h: Remove unnecessary `struct x;` before `typedef struct x x;`.
2024-05-16 12:21:14 -04:00
Ryan C. Gordon
45df084287
SDL_keyboard.h: Added a `\sa` to SDL_Keysym's docs.
2024-05-16 12:19:50 -04:00
Ryan C. Gordon
665ff8c5f6
include: Removed `::` from symbol names in comments.
...
This isn't C++ code, so there's no need to append global symbols with two
colons. It looks ugly.
I _did_ leave them for actual C++ things in WinRT-specific comments and other
places, like a reference to a Perl class thing.
Also, even though it's not valid C, it's a useful expression to say
`StructType::SpecificField`, so I left those alone, too.
2024-05-16 12:16:57 -04:00
SDL Wiki Bot
10ab623d43
Sync SDL3 wiki -> header
2024-05-16 16:02:15 +00:00
Ryan C. Gordon
5e6d85b8f0
wikiheaders: bridge wiki Category docs to the headers!
...
Did an initial cleanup on the headers and wrote a few pieces of documentation,
but this needs more work to fill out the documentation.
2024-05-16 11:48:23 -04:00
Sam Lantinga
fbe7e2e6d3
Moved the SDL version back to SDL_version.h
...
Added a comment at the top of SDL.h with the current version, for informational purposes
2024-05-15 14:38:29 -07:00
SDL Wiki Bot
c6354252a1
Sync SDL3 wiki -> header
2024-05-15 21:33:30 +00:00
Susko3
e6345716e0
Fix typo
2024-05-15 14:32:11 -07:00
Susko3
968e8c9275
Prefix names with `SDL_RENDERER_`
2024-05-15 14:32:11 -07:00
Susko3
8d7f91f8e4
Add defined constants for renderer vsync values
2024-05-15 14:32:11 -07:00
SDL Wiki Bot
60d355eb0b
Sync SDL3 wiki -> header
2024-05-15 18:55:12 +00:00
Sam Lantinga
661f2fc1fc
Removed the SDL_Version structure, moved SDL version to SDL.h
...
Inspired by https://github.com/libsdl-org/SDL/issues/9788
2024-05-15 10:43:31 -07:00
Susko3
f229e940a4
Fix missing #include in SDL_blendmode.h
...
Regressed when SDL_BlendMode was changed from an enum to a typedef Uint32.
2024-05-15 10:16:24 -07:00
Petar Popovic
1103294d33
SDL_scancode.h: Updating HID usage tables link
2024-05-14 18:13:21 -07:00
Ryan C. Gordon
1796511782
SDL_revision.h: Put this stuff into the "Version" wiki category.
2024-05-14 15:00:11 -04:00
Ryan C. Gordon
62a7e419f7
wikiheaders: Automatically categorize API symbols by subsystem.
2024-05-14 13:30:42 -04:00
Ryan C. Gordon
17976c1ae1
SDL_filesystem.h: SDL_GLOB_CASEINSENSITIVE was defined twice.
2024-05-14 13:30:41 -04:00
Petar Popovic
3baec8aab4
Renaming SDLK_QUOTEDBL to SDLK_DBLAPOSTROPHE
2024-05-14 08:46:38 -07:00
Sam Lantinga
863a9029ae
Added SDL_GlobFlags
2024-05-14 07:13:35 -07:00
Ryan C. Gordon
03b7e02804
include: SDL_GLOB_CASESENSITIVE is associated with SDL_GlobDirectory.
...
Put it under the function so wikiheaders associates it with the right symbol.
2024-05-14 01:58:04 -04:00
SDL Wiki Bot
8b5f0d07e9
Sync SDL3 wiki -> header
2024-05-13 23:11:31 +00:00
Frank Praznik
df3fea87d6
wayland: Rework scale-to-display
...
This extends the display scaling mode to be global and work in terms of pixels everywhere, with the content scale value set on displays. The per-window property had some issues, and has been removed in favor of retaining only the global hint that changes all coordinates to pixel values, sets the content scale on the displays, and generally makes the Wayland backend behave similarly to Win32 or X11.
Some additional work was needed to fix cases where displays can appear to overlap, since Wayland desktops are always described in logical coordinates, and attempting to adjust the display positions so that they don't overlap can get very ugly in all but the simplest cases, as large gaps between displays can result.
2024-05-13 19:10:19 -04:00
SDL Wiki Bot
c7087fea01
Sync SDL3 wiki -> header
2024-05-13 22:07:34 +00:00
Sam Lantinga
17520c2e6e
Removed SDL_RendererFlags
...
The flags parameter has been removed from SDL_CreateRenderer() and SDL_RENDERER_PRESENTVSYNC has been replaced with SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER during window creation and SDL_PROP_RENDERER_VSYNC_NUMBER after renderer creation.
SDL_SetRenderVSync() now takes additional values besides 0 and 1.
The maximum texture size has been removed from SDL_RendererInfo, replaced with SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER.
2024-05-13 15:06:11 -07:00
SDL Wiki Bot
678cfd23c0
Sync SDL3 wiki -> header
2024-05-13 21:30:12 +00:00
SDL Wiki Bot
7d6453ea33
Sync SDL3 wiki -> header
2024-05-13 21:24:33 +00:00
Ryan C. Gordon
766de7deff
SDL_audio.h: Whoops, one more documentation typo!
2024-05-13 17:24:08 -04:00
Ryan C. Gordon
7bc4bb9f96
SDL_audio.h: Fixed a documentation typo.
2024-05-13 17:23:21 -04:00
Petar Popovic
94cbaaabbf
Renaming SDLK_QUOTE and SDLK_BACKQUOTE
...
Renaming SDLK_QUOTE to SDLK_APOSTROPHE.
Renaming SDLK_BACKQUOTE to SDLK_GRAVE.
This makes them similar to their scancode names.
2024-05-13 11:11:11 -07:00
SDL Wiki Bot
06d6f2cb25
Sync SDL3 wiki -> header
2024-05-13 16:09:32 +00:00
Sam Lantinga
fc62dfc6e2
Added properties for the swap chain in the direct3d11 and direct3d12 renderers
...
Fixes https://github.com/libsdl-org/SDL/issues/9775
2024-05-13 09:06:57 -07:00
SDL Wiki Bot
486af58797
Sync SDL3 wiki -> header
2024-05-13 14:14:30 +00:00
Thomas J Faughnan Jr
ad166be1c5
Add SDL_HINT_AUDIO_DEVICE_APP_ICON_NAME
2024-05-13 10:13:01 -04:00
SDL Wiki Bot
8bd0433966
Sync SDL3 wiki -> header
2024-05-13 07:19:15 +00:00
Sam Lantinga
026edbeab0
Use the correct type for the modifier in SDL_Keysym
...
This shrinks the structure by 32-bits because we've removed implicit padding between the fields
2024-05-10 17:36:10 -07:00
Sam Lantinga
c95c415a0b
Fixed warning C4244: '=': conversion from 'SDL_Keymod' to 'Uint16', possible loss of data
2024-05-10 16:43:09 -07:00
SDL Wiki Bot
cd45e0a1ed
Sync SDL3 wiki -> header
2024-05-10 14:30:13 +00:00
SDL Wiki Bot
7857d34d2c
Sync SDL3 wiki -> header
2024-05-10 01:26:32 +00:00
Sam Lantinga
06a5d4d24f
Documented the return value of SDL_GetDateTimeLocalePreferences()
2024-05-09 18:25:22 -07:00
Sam Lantinga
c1ba31118b
Added ball, touchpad, and sensor support for virtual joysticks
...
Fixes https://github.com/libsdl-org/SDL/issues/9542
2024-05-09 18:25:22 -07:00
Ryan C. Gordon
d231edd2ad
SDL_dialog.h: Added missing `\param` lines to callback documentation.
2024-05-09 19:57:36 -04:00
SDL Wiki Bot
5f86f64f06
Sync SDL3 wiki -> header
2024-05-09 23:33:11 +00:00
Sam Lantinga
bcbf09acde
Renamed SDL_AttachVirtualJoystickEx() to SDL_AttachVirtualJoystick()
...
The shorthand version of this function didn't allow specifying a controller name, which seems pretty important. It seems like anyone actually implementing a virtual joystick is going to want to use some of the extended functionality.
2024-05-09 14:05:58 -07:00
Sam Lantinga
598b4e0a1f
Removed the limit on the number of supported renderer texture formats
...
Fixes https://github.com/libsdl-org/SDL/issues/9056
2024-05-09 13:30:07 -07:00
Wim Taymans
a340748c06
camera: add PipeWire camera support
...
The PipeWire camera will enumerate the pipewire Video/Source nodes with
their formats.
When capturing is started, a stream to the node will be created and
frames will be captured.
2024-05-09 13:19:27 -07:00
Ozkan Sezer
890ceb4ac4
SDL_stdinc.h: add fallback cases for SDL_SINT64_C and SDL_UINT64_C
...
These are needed when INT64_C and UINT64_C macros are either not
available (not likely), or guarded by __STDC_LIMIT_MACROS in C++
compilations (which is the case in many old SDKs.)
2024-05-09 20:55:56 +03:00
Ryan C. Gordon
9245084c06
SDL_video.h: Added a `\sa` from SDL_GLContext to SDL_GL_CreateContext.
2024-05-09 13:51:26 -04:00
Sam Lantinga
54fb629da5
SDL_WindowFlags is now 64-bit
...
Fixes https://github.com/libsdl-org/SDL/issues/7321
2024-05-09 10:39:54 -07:00
Susko3
895586c928
Use `1u` literal for flags/masks calculation
...
Changes `1 <<` and `1<<` to use `1u`.
2024-05-09 10:29:48 -07:00
Sam Lantinga
1944c009e9
SDL_Keycode is now Uint32
2024-05-09 10:00:46 -07:00
SDL Wiki Bot
d3e28f3ab8
Sync SDL3 wiki -> header
2024-05-09 16:18:35 +00:00
Sam Lantinga
33e7238268
Clarified the meaning of the cursor hotspot (thanks @nbriggs!)
...
Fixes https://github.com/libsdl-org/sdlwiki/issues/380
2024-05-09 09:16:46 -07:00
Sam Lantinga
3947356282
Removed obsolete documentation
2024-05-09 09:01:27 -07:00
SDL Wiki Bot
793622ff1c
Sync SDL3 wiki -> header
2024-05-08 21:48:12 +00:00
SDL Wiki Bot
a5e49cc4e8
Sync SDL3 wiki -> header
2024-05-08 19:36:35 +00:00
Frank Praznik
1f43c88220
time: Use a function instead of properties to retrieve the system date and time locale info
...
This allows applications to re-query the values if the system locale is changed during runtime, and better matches the other locale functions. A note is included in the documentation mentioning that this can be slow, as it has to call into OS functions.
Also allows for the removal of the init/quit time functions, as they are no longer needed.
2024-05-08 15:35:04 -04:00
SDL Wiki Bot
7abc589438
Sync SDL3 wiki -> header
2024-05-08 16:56:38 +00:00
Frank Praznik
7d47d16526
kmsdrm: Report the panel orientation hint property
...
Queries the "panel orientation" property on the connector and reports it in degrees of clockwise rotation via the 'SDL.display.KMSDRM.panel_orientation' display property.
This is provided by the kernel as a hint to userspace applications, and the application itself is ultimately responsible for any required coordinate transformations needed to conform to the requested orientation.
2024-05-08 12:55:19 -04:00
SDL Wiki Bot
8af26cf463
Sync SDL3 wiki -> header
2024-05-08 07:53:33 +00:00
Ryan C. Gordon
e14ba41689
Some minor documentation tweaks.
2024-05-08 03:52:31 -04:00
Sam Lantinga
04be04c338
Removed mostly unused SDL_errorcode
2024-05-07 15:45:06 -07:00
Sam Lantinga
afe7c7a644
Changed SDL_ClearError() to always return 0.
...
This will provide a quick and easy way of clearing the error when a function succeeds, if we want to do that in a more widespread way.
For now we guarantee that SDL_Init() will never have an error set when it returns successfully.
Fixes https://github.com/libsdl-org/SDL/issues/8421
2024-05-07 15:45:06 -07:00
Sam Lantinga
748490677c
Use SDL_RendererFlags in the API (thanks @Sackzement!)
2024-05-07 13:41:12 -07:00
SDL Wiki Bot
4928d0e479
Sync SDL3 wiki -> header
2024-05-07 19:25:31 +00:00
Sam Lantinga
aecb62e30d
Improved API consistency for flag data types
...
Flag data types are always unsigned and have the valid values following the typedef.
2024-05-07 12:24:37 -07:00
Sam Lantinga
53a45a4437
Fixed inconsistent hint names (thanks @Sackzement!)
...
Fixes https://github.com/libsdl-org/SDL/issues/9643
2024-05-07 08:47:25 -07:00
SDL Wiki Bot
ea1904eda1
Sync SDL3 wiki -> header
2024-05-06 16:09:31 +00:00
Petar Popovic
45ac1a09d9
System dependent 64 bit integer suffixes
...
Added macros SDL_SINT64_C() and SDL_UINT64_C().
Integer suffixes of SDL_MAX_SINT64, SDL_MIN_SINT64, SDL_MAX_UINT64
and SDL_MIN_UINT64 are now system dependent.
2024-05-06 09:08:49 -07:00
SDL Wiki Bot
d7d3028765
Sync SDL3 wiki -> header
2024-05-06 16:06:32 +00:00
Miku AuahDark
33ae7e38d6
Android: Allow SDL_IOFromFile to open content:// URI. ( #9696 )
2024-05-06 09:05:49 -07:00
Ryan C. Gordon
5dc207b3b6
include: Fix a preformatted piece of documentation that isn't C code.
2024-05-05 01:22:46 -04:00
SDL Wiki Bot
7856c8fb8f
Sync SDL3 wiki -> header
2024-05-03 19:40:33 +00:00
Ryan C. Gordon
cf0b5db9e1
SDL_system.h: Improve window message hook documentation.
2024-05-03 15:37:11 -04:00
Ryan C. Gordon
a04abd78d3
SDL_filesystem.h: Add a `\sa` from SDL_GetUserFolder to SDL_Folder.
...
Reference https://github.com/libsdl-org/sdlwiki/issues/522
2024-05-03 15:24:06 -04:00
SDL Wiki Bot
27b931a8a0
Sync SDL3 wiki -> header
2024-05-03 18:11:35 +00:00
Semphris
06b9d88682
Add more links in SDL_dialog documentation
2024-05-03 11:10:03 -07:00
Ryan C. Gordon
a790a67883
include: Filling in more documentation gaps.
2024-05-03 13:19:26 -04:00
Ryan C. Gordon
3473cef7df
surface: `SDL_blit` is not used in the public API, remove it from headers.
2024-05-03 12:57:09 -04:00
SDL Wiki Bot
7559acaf75
Sync SDL3 wiki -> header
2024-05-03 16:34:33 +00:00
Frank Praznik
3a6d9c59f4
wayland: Add mouse pointer warp support
...
The pointer confinement protocol does allow attempted warping the pointer via a hint, provided that the pointer is locked at the time of the request, and the requested coordinates fall within the bounds of the window.
Toggle the pointer locked state and request the pointer warp when the required protocol is available. This is similar to what XWayland does internally.
2024-05-03 12:33:19 -04:00
Sam Lantinga
b18a071639
Removed SDL_DROPEVENT_DATA_SIZE and SDL_TEXTEDITINGEVENT_TEXT_SIZE
...
Fixes https://github.com/libsdl-org/SDL/issues/9681
2024-05-03 09:19:49 -07:00
SDL Wiki Bot
a03829d636
Sync SDL3 wiki -> header
2024-05-03 13:59:29 +00:00
Ryan C. Gordon
31a45d7cb3
SDL_main.h: Document SDL_main.
2024-05-03 09:58:05 -04:00
Ryan C. Gordon
21c181b3b4
SDL_main.h: Minor documentation tweaks.
2024-05-03 09:48:27 -04:00
SDL Wiki Bot
e86f22b52b
Sync SDL3 wiki -> header
2024-05-03 13:42:29 +00:00
Ryan C. Gordon
d570fd7c2c
SDL_main.h: Document SDL_MAIN_USE_CALLBACKS.
2024-05-03 09:41:02 -04:00
SDL Wiki Bot
3bd04e5a34
Sync SDL3 wiki -> header
2024-05-03 13:32:31 +00:00
SDL Wiki Bot
ab5b904890
Sync SDL3 wiki -> header
2024-05-03 03:27:33 +00:00
Ryan C. Gordon
0e0bb22f79
include: More documentation updates.
2024-05-02 23:25:45 -04:00
Ryan C. Gordon
46b69af5a3
SDL_vulkan.h: Remove Tizen compatibility typedefs.
...
Any app for this system that wants to move to SDL3 will have to adjust to
all the other API changes anyhow, so there's no need to keep these anymore.
Fixes #9678 .
2024-05-02 23:25:44 -04:00
SDL Wiki Bot
10c2682647
Sync SDL3 wiki -> header
2024-05-03 02:54:35 +00:00
Ryan C. Gordon
760d7d276b
include: Filled in some missing documentation.
2024-05-02 22:53:08 -04:00
Ryan C. Gordon
9f842e9b5a
wikiheaders: Bind `#define`s below a function to it, like typedefs.
...
This effectively adds the property symbols for various functions to the
function's wiki page.
2024-05-02 12:49:30 -04:00
Sam Lantinga
d95f5bad24
Updated to version 3.1.2 for the preview release
2024-05-01 09:34:25 -07:00
Semphris
b9d3d746a0
Add trailing path separator to SDL_GetUserFolder()
2024-04-30 18:01:16 -07:00
SDL Wiki Bot
97d0e78842
Sync SDL3 wiki -> header
2024-04-30 17:48:27 +00:00
Semphris
c6a70d6898
Add support for modal windows to more platforms
...
- Adds support for modal windows to Win32, Mac, and Haiku, and enhances functionality on Wayland and X11, which previous set only the parent window, but not the modal state.
- Windows can be declared modal at creation time, and the modal state can be toggled at any time via SDL_SetWindowModalFor() (tested with UE5 through sdl2-compat).
- Allows dynamic unparenting/reparenting of windows.
- Includes a modal window test.
2024-04-30 13:47:57 -04:00
Ravbug
2f8cfce154
Fix SDL_main on UWP with C++20
...
/ZW is incompatible with C++20, so disable the #error in that case. In addition, define a main function because UWP in C++20 mode links to standard main.
2024-04-30 10:16:32 -07:00
Nhalrath
8eeaa815d9
docs: rename num to size in SDL_iostream
2024-04-30 10:16:10 -07:00
SDL Wiki Bot
556d9b8497
Sync SDL3 wiki -> header
2024-04-30 10:45:12 +00:00
SDL Wiki Bot
8b06473a11
Sync SDL3 wiki -> header
2024-04-29 20:53:27 +00:00
Petar Popovic
7bfecacc02
Removing function macro SDL_TABLESIZE()
2024-04-29 13:52:48 -07:00
Petar Popovic
8d0ad44edd
Adding tag names to enums
...
Adding tag names to following enums:
SDL_JoystickType, SDL_JoystickConnectionState, SDL_TouchDeviceType, SDL_DUMMY_ENUM
2024-04-28 16:09:37 -07:00
Petar Popovic
dffbb574ea
renaming SDL_eventaction tag to SDL_EventAction
2024-04-28 16:09:09 -07:00
SDL Wiki Bot
3f2f712fff
Sync SDL3 wiki -> header
2024-04-28 12:29:13 +00:00
Sam Lantinga
14f584a94b
SDL_CreateWindowAndRenderer() takes the window title as the first parameter
...
Fixes https://github.com/libsdl-org/SDL/issues/9626
2024-04-25 20:00:14 -07:00
SDL Wiki Bot
57f96fb124
Sync SDL3 wiki -> header
2024-04-25 21:23:14 +00:00
SDL Wiki Bot
1b8d4d77d6
Sync SDL3 wiki -> header
2024-04-25 21:01:12 +00:00
Ryan C. Gordon
6b1a98e664
wikiheaders: Allow basic typedefs to pull in some preprocessor logic.
...
Reference Issue #9557 .
This lets SDL_AudioFormat have the `#if byteorder == lilendian` section.
2024-04-25 16:44:09 -04:00
SDL Wiki Bot
a13bdeee8a
Sync SDL3 wiki -> header
2024-04-25 20:40:14 +00:00
Ryan C. Gordon
d29b861a76
wikiheaders: Allow blank lines in post-typedef `#define` blocks.
...
Reference Issue #9557 .
2024-04-25 14:26:49 -04:00
Ryan C. Gordon
2fb024ab8e
wikiheaders: Defines directly following a non-struct typedef are documented.
...
The idea is that if you have a `typedef Uint32 MyFlags` that has a bunch of
defines that are meant to be bitflags, you can pack them into the same wiki
page automatically.
This only works with `typedef`s that are _not_ struct/union/enums, and it
only pulls in `#define` lines that immediately follow the typedef line.
Even a blank line or a comment will signal to stop including lines for
this page!
2024-04-25 03:02:27 -04:00
SDL Wiki Bot
47ff4addd4
Sync SDL3 wiki -> header
2024-04-25 06:37:31 +00:00
Ryan C. Gordon
2733345422
SDL_audio.h: Documentation updates.
2024-04-25 02:36:08 -04:00
SDL Wiki Bot
ceeefb0512
Sync SDL3 wiki -> header
2024-04-24 20:43:29 +00:00
Ryan C. Gordon
cdb3cea76d
SDL_atomic.h: Documentation updates.
2024-04-24 16:42:16 -04:00
Ryan C. Gordon
ec97857a87
SDL_assert.h: Documentation improvements.
2024-04-24 15:17:31 -04:00
SDL Wiki Bot
5fbc038375
Sync SDL3 wiki -> header
2024-04-24 17:20:14 +00:00
Sam Lantinga
30d93fb29b
Relax, it's not that exciting :)
2024-04-24 09:19:38 -07:00
Ryan C. Gordon
4a11809370
SDL_TextInputEvent: Note that `text` field is UTF-8 encoded.
...
Reference Issue https://github.com/libsdl-org/sdlwiki/issues/516
2024-04-24 11:18:35 -04:00
Petar Popovic
b98116a996
Removing trailing commas in enums in SDL headers
...
Trailing commas in enums is a C99 feature.
This commit removes them in SDL headers for ANSI compatibility.
2024-04-24 09:44:41 -04:00
Ryan C. Gordon
30970780a9
include: Fixed some old Doxygen markup to be Markdown instead.
2024-04-23 14:38:04 -04:00
Ryan C. Gordon
7a36504952
storage: SDL_WriteStorageFile() wasn't marked as SDLCALL.
...
Fixes #9594 .
2024-04-21 09:26:07 -04:00
Erik Scholz
c623bd2fdc
reword SDL_BlitSurfaceScaled param
...
so it will link to the type in the docs/wiki
2024-04-20 07:51:40 -07:00
Frank Praznik
bede245395
Remove references to renderers being destroyed with windows in the documentation
2024-04-19 12:23:40 -04:00
Anonymous Maarten
7dd4f1ec22
SDL3 removed SDL_HINT_RENDER_SCALE_QUALITY hint
...
textures now default to linear filtering, use SDL_SetTextureScaleMode(texture, SDL_SCALEMODE_NEAREST) if you want nearest pixel mode instead
2024-04-17 16:38:15 -07:00
Ryan C. Gordon
093160904d
SDL_Keymod: Removed SDL_KMOD_RESERVED.
...
Fixes #9481 .
2024-04-17 17:30:10 -04:00
SDL Wiki Bot
2c183c602d
Sync SDL3 wiki -> header
2024-04-17 21:09:29 +00:00
Ryan C. Gordon
a18f3d55b7
SDL_iostream.h: Corrected documentation for SDL_ReadIO and SDL_WriteIO.
...
Fixes #9443 .
2024-04-17 17:08:05 -04:00
SDL Wiki Bot
bf0bf80df6
Sync SDL3 wiki -> header
2024-04-16 17:30:27 +00:00
Ryan C. Gordon
db6b6bd75e
include: Fixed up some sensor documentation.
...
Fixes #9468 .
2024-04-16 13:29:26 -04:00
Sam Lantinga
650d3b44e1
Removed the word "other" since the version has been removed
2024-04-16 08:52:21 -07:00
Ryan C. Gordon
235bfe2631
SDL_log.h: Remove SDL_MAX_LOG_MESSAGE.
...
The message length limit was removed in 2.0.24, so there's no need for
this define in SDL3 at all.
Fixes #9467 .
2024-04-16 00:31:57 -04:00
Brick
edaab8ad9f
Refactored audio conversion to reduce copying
...
More of the logic has been moved into SDL_AudioQueue,
allowing data to be converted directly from the input buffer.
2024-04-15 11:47:18 -10:00
Sam Lantinga
d69e6714a8
Document that tooltip windows don't get mouse or keyboard focus
2024-04-15 14:38:00 -07:00
Sam Lantinga
bfde7294f5
Added a note that the joystick should be initialized on the main thread on Windows
...
Fixes https://github.com/libsdl-org/SDL/issues/9533
2024-04-15 14:19:44 -07:00
SDL Wiki Bot
7000a112a3
Sync SDL3 wiki -> header
2024-04-15 21:13:12 +00:00
Sam Lantinga
70ce808c09
Changed SDL_KeyCode values to defines
...
This clears up confusion about whether to use SDL_KeyCode or SDL_Keycode and makes it clear that the values aren't the full set of possible keycodes.
Fixes https://github.com/libsdl-org/SDL/issues/9493
2024-04-15 11:08:51 -10:00
Sam Lantinga
2fa4937e1a
Removed obsolete padding
2024-04-15 13:55:01 -07:00
SDL Wiki Bot
35c08c828b
Sync SDL3 wiki -> header
2024-04-15 19:23:27 +00:00
Sam Lantinga
1862a62b5d
Replaced SDL_GetNumTouchFingers() and SDL_GetTouchFinger() with SDL_GetTouchFingers()
...
Fixes https://github.com/libsdl-org/SDL/issues/9484
2024-04-15 09:22:41 -10:00
SDL Wiki Bot
cdcd346575
Sync SDL3 wiki -> header
2024-04-15 19:13:11 +00:00
SDL Wiki Bot
69ee186a1e
Sync SDL3 wiki -> header
2024-04-15 16:56:12 +00:00
Ozkan Sezer
f06f761c2f
remove SDL_quit.h include from SDL.h
2024-04-15 18:47:24 +03:00
Ryan C. Gordon
9c8c254af2
include: Removed SDL_quit.h
...
It only had one (sort of scary) macro in it.
Fixes #9534 .
2024-04-15 11:35:39 -04:00
SDL Wiki Bot
0397d23ed8
Sync SDL3 wiki -> header
2024-04-15 14:36:12 +00:00
Petar Popovic
56e6f05440
SDL_RendererFlip rename fixes
2024-04-15 03:32:23 -10:00
Anonymous Maarten
07b7ec68eb
Add SDLTest_CompareMemory function to compare memory ranges
2024-04-15 03:05:05 -10:00
Petar Popovic
875ddb4969
SDL_atomic.h rename fixes
...
Adding following macro to SDL_oldnames.h:
SDL_atomic_t SDL_atomic_t_renamed_SDL_AtomicInt
2024-04-15 09:02:39 -04:00
SDL Wiki Bot
1731d53d02
Sync SDL3 wiki -> header
2024-04-15 13:01:12 +00:00
SDL Wiki Bot
11de629dd2
Sync SDL3 wiki -> header
2024-04-14 05:50:22 +00:00
Ryan C. Gordon
291edc073c
include: Document SDL_TriggerBreakpoint.
2024-04-14 01:48:52 -04:00
SDL Wiki Bot
59c332e569
Sync SDL3 wiki -> header
2024-04-14 05:35:26 +00:00
Ryan C. Gordon
041de0c2eb
include: Some documentation improvements.
2024-04-14 01:33:56 -04:00
Ryan C. Gordon
21bc72bef1
wikiheaders: Allow parts of the headers to be ignored.
...
The specific cases here were SDL_size_mul_overflow_builtin and
SDL_size_add_overflow_builtin, which are forced-inline symbols in
SDL_stdinc.h that have to exist, but aren't really part of the public API,
and thus shouldn't be exported as documentation.
2024-04-13 22:57:23 -04:00
SDL Wiki Bot
e4f097805b
Sync SDL3 wiki -> header
2024-04-14 00:22:23 +00:00
Ryan C. Gordon
081a94e321
include: Updated a bunch of documentation.
2024-04-13 20:10:13 -04:00
Ryan C. Gordon
239b34d760
docs: Added some notes about iOS and the main callbacks.
2024-04-13 15:14:32 -04:00
SDL Wiki Bot
9c5ae7293f
Sync SDL3 wiki -> header
2024-04-13 18:59:10 +00:00
SDL Wiki Bot
cae90ef489
Sync SDL3 wiki -> header
2024-04-13 18:38:11 +00:00
Ryan C. Gordon
6e1ed94913
ios: Renamed APIs that referred to "iPhone" to refer to "iOS".
...
Macros that papered over this difference in SDL2 have been removed for SDL3.
Fixes #9527 .
2024-04-13 14:30:30 -04:00
Ryan C. Gordon
d252a8fe12
joystick: SDL_VirtualJoystickDesc no longer takes a struct version.
...
If we need to extend this in the future, we'll make a second struct and
a second SDL_AttachVirtualJoystickEx-style function that uses it.
Just zero the struct and don't set a version.
Fixes #9489 .
2024-04-13 14:16:12 -04:00
SDL Wiki Bot
202bd7b0ff
Sync SDL3 wiki -> header
2024-04-13 13:24:25 +00:00
Ryan C. Gordon
f01b34fd8d
include: Removed some SDL2 references in the documentation.
2024-04-13 09:23:37 -04:00
Ryan C. Gordon
98e9f361a8
winrt: Remove SDL_WinRTGetFSPathUNICODE, rename SDL_WinRTGetFSPathUTF8.
...
Fixes #9470 .
2024-04-13 08:24:12 -04:00
SDL Wiki Bot
02da4acf0f
Sync SDL3 wiki -> header
2024-04-13 12:07:27 +00:00
Ryan C. Gordon
3f4ac1a3c7
winrt: Implemented SDL_GetUserFolder() for WinRT/UWP.
2024-04-13 08:05:43 -04:00
SDL Wiki Bot
cbb3c69cb0
Sync SDL3 wiki -> header
2024-04-13 01:10:12 +00:00
anon
03bc53fe31
include: Fixes the improper fix I made before of documentation, SDL_SensorType.
2024-04-12 14:51:52 -04:00
SDL Wiki Bot
935b6502ac
Sync SDL3 wiki -> header
2024-04-11 19:40:25 +00:00
anon
7ab8e4797e
include: Add documentation to SDL_MessageBoxColorType.
2024-04-11 15:39:58 -04:00
anon
1abaacedb2
include: Fix documentation generation for SDL_SensorType.
2024-04-11 15:38:54 -04:00
SDL Wiki Bot
2f4f1f6923
Sync SDL3 wiki -> header
2024-04-11 17:35:27 +00:00
Ryan C. Gordon
0df988389c
include: Add `\since` to all documentation that was missing it.
2024-04-11 13:34:29 -04:00
SDL Wiki Bot
073d2378dc
Sync SDL3 wiki -> header
2024-04-11 12:59:41 +00:00
Ryan C. Gordon
9421a01400
SDL_AudioStreamCallback: Note that there's no _requirement_ to do anything.
...
This is as opposed to something like the SDL2 audio callback, where you
_must_ supply data or disaster occurs.
2024-04-11 08:56:10 -04:00
Ryan C. Gordon
e47f2956cf
include: Documented SDL_bool a little.
2024-04-11 00:48:11 -04:00
Ryan C. Gordon
407e54e188
include: More improved docs for the wikibridge!
2024-04-11 00:37:11 -04:00
Ryan C. Gordon
f121553082
include: Fixed up SDL_AudioFormat documentation.
...
(this is not currently bridged to the wiki, but will be soon!)
2024-04-10 18:45:29 -04:00
SDL Wiki Bot
b2239cb7ba
Sync SDL3 wiki -> header
2024-04-10 19:59:14 +00:00
Ryan C. Gordon
557f26e6f0
include: Fixed up some more documentation.
2024-04-10 15:58:28 -04:00
Anonymous Maarten
06758685a5
stdinc: modify default alloca prototype
...
For compatibilty with TinyCC.
2024-04-10 08:03:46 +00:00
Petar Popovic
132cef91c8
Removing macro SDL_FColour from SDL_pixels.h
2024-04-09 18:20:03 -04:00
SDL Wiki Bot
534c44b156
Sync SDL3 wiki -> header
2024-04-09 22:04:21 +00:00
Ryan C. Gordon
a15a46340f
SDL_revision: Added documentation.
2024-04-09 18:02:30 -04:00
Petar Popovic
f687e0732a
Doxygen comment fixes in SDL_pixels.h
2024-04-09 16:57:34 -04:00
SDL Wiki Bot
196d123c66
Sync SDL3 wiki -> header
2024-04-09 16:36:25 +00:00
David Gow
d321e19ee5
stdinc: Document maths functions
...
SDL_stdinc.h has a documentation comment for SDL_acos(), but nothing else. Expand on
that comment, and add comments for the remaining maths functions.
2024-04-09 12:35:42 -04:00
David Gow
afd91b5e9c
stdinc: Note that these functions match their C runtime equivalents
...
This header basically just consists of C runtime #defines and functions, but with
an SDL_ prefix. Note this in the documentation so people don't waste their time
reading through things they already understand.
2024-04-09 12:35:42 -04:00
Henry Wilson
629c694bd6
Fixed Doxygen comments
...
Added '*' to the start of Doxygen comments for SDL_FlipSurface and SDL_DuplicateSurface so they highlight properly in IDEs
2024-04-09 12:30:13 -04:00
Petar Popovic
9b5944a14f
Removing SDL_Colour macro
2024-04-09 12:25:36 -04:00
SDL Wiki Bot
baf09904b3
Sync SDL3 wiki -> header
2024-04-09 13:59:22 +00:00
Ryan C. Gordon
79dc6af98f
SDL_endian.h: Documented SDL_Swap* macros.
2024-04-09 09:58:01 -04:00
Ryan C. Gordon
e044318a8e
Sync SDL3 wiki -> headers
2024-04-09 00:50:03 -04:00
Ryan C. Gordon
ad090d2444
include: A ton of little documentation tweaks, fixes, and improvements.
...
This is just stuff I noticed while working on the wikiheaders updates. A
thorough pass over all the docs would not be terrible, and maybe a simple
script to check for consistency (does everything have a `\since` on it? etc)
might be nice, too.
2024-04-09 00:50:02 -04:00
Ryan C. Gordon
6906c50e8b
assert: SDL_AssertData::always_ignore should be an SDL_bool, not an int.
2024-04-09 00:50:01 -04:00
Petar Popovic
c8a066019b
Renaming SDL_eventaction to SDL_EventAction
2024-04-08 14:28:52 -04:00
Petar Popovic
1efadcc5d4
Revert renaming SDL_eventaction. adding it again in next commit with
...
scripts
This reverts commit f08c31060a .
2024-04-08 14:28:52 -04:00
Petar Popovic
764fe72449
SDL_time.h: Renaming enums SDL_DATE_FORMAT and SDL_TIME_FORMAT to SDL_DateFormat and SDL_TimeFormat
2024-04-07 23:03:01 -04:00
Petar Popovic
f08c31060a
Renaming SDL_eventaction to SDL_EventAction
2024-04-07 12:04:32 -04:00
Ryan C. Gordon
5c9dbf65a3
SDL_version.h: Fix some whitespace.
2024-04-06 02:09:48 -04:00
Semphris
6ad390fc50
File dialog improvements
...
- Add a globally-accessible function to handle the parsing of filter extensions
- Remove the ability of putting the wildcard ('*') among other patterns; it's either a list of patterns or a single '*' now
- Add a hint to select between portals and Zenity on Unix
2024-04-04 22:07:14 -07:00
Sam Lantinga
5fa87e29e7
Removed SDL_RENDERER_ACCELERATED and SDL_RENDERER_SOFTWARE
...
These flags are unnecessary and have always been a source of confusion.
2024-04-04 13:30:49 -07:00
Petar Popovic
3f8dba3713
Including SD_error.h into headers with error-returning functions
2024-04-04 11:12:58 -07:00
Ryan C. Gordon
e12b8e767a
SDL_filesystem.h: Fixed some whitespace.
2024-04-04 10:44:19 -04:00
SDL Wiki Bot
1a97d1f649
Sync SDL3 wiki -> header
2024-04-04 14:42:26 +00:00
Petar Popovic
de91aaa452
SDL_locale.h - SDL_GetPreferredLocales() - adding SDL_GetError() comment
2024-04-04 07:41:50 -07:00
Petar Popovic
7ae5474305
SDL_quit.h - removing SDL_error.h inclusion
2024-04-04 07:41:50 -07:00
Sam Lantinga
0abdc1a343
Renamed GLOBDIR to GLOB
2024-04-04 07:40:48 -07:00
SDL Wiki Bot
ac372e99fe
Sync SDL3 wiki -> header
2024-04-04 13:41:27 +00:00
Ryan C. Gordon
764207d873
filesystem: Added SDL_GlobDirectory() and SDL_GlobStorageDirectory().
...
Fixes #9287 .
2024-04-04 09:40:13 -04:00
Ryan C. Gordon
9192485746
filesystem: SDL_EnumerateDirectory should return -1 or 0.
...
The callback requesting a non-error stop should not return a special value.
2024-04-04 09:40:13 -04:00
Sam Lantinga
c7787a9191
The hint environment variables don't have the word "HINT" in them
...
Fixes https://github.com/libsdl-org/SDL/issues/9436
2024-04-02 19:24:07 -07:00
Sam Lantinga
17d4f8d699
Updated to version 3.1.1 for the preview release
2024-04-01 17:03:46 -07:00
Sam Lantinga
a82ed82bc7
SDL_QueryTexture() fills in a pointer to SDL_PixelFormatEnum
2024-04-01 15:45:22 -07:00
SDL Wiki Bot
18c8af6e48
Sync SDL3 wiki -> header
2024-04-01 21:00:26 +00:00
Sam Lantinga
8847b35244
Separate joystick power state into battery status and percentage
...
This allows you to see battery percentage while the controller is charging
2024-04-01 13:59:00 -07:00
Susko3
5f763083fc
Use SDL_EventType and fix event name in comment
2024-04-01 11:04:02 -07:00
Susko3
c40e9cc634
Sort includes
2024-04-01 11:04:02 -07:00
Susko3
c96bc8b1a2
Add missing includes for SDL_MouseID
...
Missed in f8844d387c and d1eb4adb16 .
2024-03-31 16:11:23 -07:00
SDL Wiki Bot
96c93d2252
Sync SDL3 wiki -> header
2024-03-29 19:02:25 +00:00
Ryan C. Gordon
49029c8454
stdinc: Document a bunch of ctype/string functions.
...
This is intended to help codify the rules for locale and Unicode in SDL3,
which were less-well defined in SDL2.
2024-03-29 15:01:40 -04:00
Ryan C. Gordon
a5c892d2c3
stdlib: Improve Unicode support and consistency in string comparison functions.
...
SDL_strcasecmp (even when calling into a C runtime) does not work with
Unicode chars, and depending on the user's locale, might not work with
even basic ASCII strings.
This implements the function from scratch, using "case-folding,"
which is a more robust method that deals with various languages. It
involves a hashtable of a few hundred codepoints that are "uppercase" and
how to map them to lowercase equivalents (possibly increasing the size of
the string in the process). The vast majority of human languages (and
Unicode) do not have letters with different cases, but still, this static
table takes about 10 kilobytes on a 64-bit machine.
Even this will fail in one known case: the Turkish 'i' folds differently
if you're writing in Turkish vs other languages. Generally this is seen as
unfortunate collateral damage in cases where you can't specify the language
in use.
In addition to case-folding the codepoints, the new functions also know how
to decode the various formats to turn them into codepoints in the first
place, instead of blindly stepping by one byte (or one wchar_t) per
character.
Also included is casefolding.txt from the Unicode Consortium and a perl
script to generate the hashtable from that text file, so we can trivially
update this if new languages are added in the future.
A simple test using the new function:
```c
#include <SDL3/SDL.h>
int main(void)
{
const char *a = "α ε η";
const char *b = "Α Ε Η";
SDL_Log(" strcasecmp(\"%s\", \"%s\") == %d\n", a, b, strcasecmp(a, b));
SDL_Log("SDL_strcasecmp(\"%s\", \"%s\") == %d\n", a, b, SDL_strcasecmp(a, b));
return 0;
}
```
Produces:
```
INFO: strcasecmp("α ε η", "Α Ε Η") == 32
INFO: SDL_strcasecmp("α ε η", "Α Ε Η") == 0
```
glibc strcasecmp() fails to compare a Greek lowercase string to its uppercase
equivalent, even with a UTF-8 locale, but SDL_strcasecmp() works.
Other SDL_stdinc.h functions are changed to be more consistent, which is to
say they now ignore any C runtime and often dictate that only English-based
low-ASCII works with them.
Fixes Issue #9313 .
2024-03-29 15:01:40 -04:00
Ozkan Sezer
6cf71ca9a9
SDL_stdinc.h: Android passes sizeof(ENUM) == sizeof(int) assertion
...
Reference issue: https://github.com/libsdl-org/SDL/issues/9392 .
2024-03-28 20:28:02 +03:00
Ryan C. Gordon
0d007bbb01
psp: Fixed building with pspdev when not using CMake.
...
(psp-cmake defines `__PSP__` on the command line, but the compiler itself
only defines `__psp__` and some variations.
Fixes #9378 .
2024-03-28 09:27:21 -04:00
Ryan C. Gordon
38e3c6a4aa
main: Add an optional `appstate` param to main callback entry points.
...
This allows apps to maintain state data without using global variables.
Fixes #9377 .
2024-03-27 17:22:08 -04:00
SDL Wiki Bot
05b3605a41
Sync SDL3 wiki -> header
2024-03-27 18:02:23 +00:00
Frank Praznik
5abcfad352
video: Document that renderer lifetimes are tied to their associated windows
2024-03-27 11:01:41 -07:00
Sam Lantinga
823ab13b9c
SDL_CreateTexture() takes a SDL_PixelFormatEnum format parameter
2024-03-26 10:40:40 -07:00
Daniel Ludwig
4562b41a4d
VisualC-GDK: Add missing dialog sources, fix Xbox builds
2024-03-26 07:28:22 -07:00
Sam Lantinga
78c7834f90
Added SDL_HINT_WINDOWS_RAW_KEYBOARD to control whether raw keyboard is enabled on Windows
2024-03-25 20:41:05 -07:00
Sam Lantinga
b9a88bbecb
Removed SDL_TextInputShown()
...
This was only implemented on Windows and often confused with SDL_ScreenKeyboardShown()
2024-03-25 13:26:23 -07:00
Sam Lantinga
6443c75eda
Removed SDL_TEXTINPUTEVENT_TEXT_SIZE
2024-03-25 13:26:23 -07:00
Cameron Gutman
f14fb979c1
Remove legacy SDL2 input grab API
2024-03-24 16:53:23 -07:00
Sam Lantinga
36e73bdda4
Updated to version 3.1.0 for the preview release
2024-03-24 06:16:02 -07:00
Anonymous Maarten
1d0e5286aa
Limit CPU features through a hint
2024-03-23 16:36:44 -07:00
SDL Wiki Bot
675216e81b
Sync SDL3 wiki -> header
2024-03-23 23:32:24 +00:00
Sam Lantinga
72fc6f86e5
Text input is no longer automatically enabled when initializing video.
...
Fixes https://github.com/libsdl-org/SDL/issues/9309
Fixes https://github.com/libsdl-org/SDL/issues/9268
2024-03-23 16:31:00 -07:00
Sam Lantinga
9eb87ca325
Note that many things are considered mice and keyboards that you might not expect
2024-03-23 16:31:00 -07:00
Sam Lantinga
c0f4565552
Added SDL_GetKeyboardName() and SDL_GetMouseName()
2024-03-23 16:31:00 -07:00
Sam Lantinga
d1eb4adb16
Be explicit about the event mouse and keyboard ID
2024-03-23 16:31:00 -07:00
Sam Lantinga
2fe1a6a279
Initial support for hotplugging mice and keyboards
2024-03-23 16:31:00 -07:00
Sam Lantinga
171ff041d0
Removed invalid ascii from headers
2024-03-23 16:31:00 -07:00
Sam Lantinga
917d683811
Moved SDL_JoyBallEvent together with the other joystick events
2024-03-21 12:51:59 -07:00
Ozkan Sezer
888cc29df6
add missing `reserved` field to struct SDL_JoyBallEvent,
...
Fixes https://github.com/libsdl-org/SDL/issues/9327
2024-03-21 20:10:50 +03:00
Frank Praznik
4a7e3beeb9
filesystem: Use high-res file times on more platforms
...
Some POSIX platforms don't define macros to note the presence of the POSIX.1-2008 st_*tim timespec members of the stat struct, so check if this member exists during CMake configuration and conditionally enable it.
Apple platforms use st_*timespec naming, which is supported as of OSX 10.6. SDL3 requires 10.9+, so no fallback is needed.
Android only supports the POSIX.1-2008 semantics as of API version 26 or higher, so this has to be conditionally enabled in the makefile build via an API version definition check.
In other cases, file times fall back to the legacy path with second precision.
2024-03-20 11:39:42 -04:00
Sam Lantinga
2265d22f75
Updated Xcode project for time APIs
2024-03-19 14:53:55 -07:00
Susko3
b90fed094f
Standardise header includes
...
Changes "SDL_*.h" and "SDL3/SDL_*.h" to <SDL3/SDL_*.h>
2024-03-19 13:41:53 -07:00
SDL Wiki Bot
ba0417db40
Sync SDL3 wiki -> header
2024-03-19 17:58:24 +00:00
Frank Praznik
a6fbf0488c
Add time and realtime clock functions
...
Adds functions to query the system's realtime clock, convert time intervals to/from a calendar date and time in either UTC or the local time, and perform time related calculations.
An SDL_Time type (a time interval represented in nanoseconds), and SDL_DateTime struct (broken down calendar date and time) were added to facilitate this functionality.
Querying the system time results in a value expressed in nanoseconds since the Unix epoch (Jan 1, 1970) in UTC +0000. Conversions to and from the various platform epochs and units are performed when required.
Any direct handling of timezones and DST were intentionally avoided. The offset from UTC is provided when converting from UTC to a local time by calculating the difference between the original UTC and the resulting local time, but no other timezone or DST information is used.
The preferred date formatting and 12/24 hour time for the system locale can be retrieved via global preferences.
Helper functions for obtaining the day of week or day or year for calendar date, and getting the number of days in a month in a given year are provided for convenience. These are simple, but useful for performing various time related calculations.
An automated test for time conversion is included, as is a simple standalone test to display the current system date and time onscreen along with a calendar, the rendering of which demonstrates the use of the utility functions (press up/down to increment or decrement the current month, and keys 1-5 to change the date and time formats).
2024-03-19 10:57:36 -07:00
SDL Wiki Bot
b2682da035
Sync SDL3 wiki -> header
2024-03-19 04:57:27 +00:00
Sam Lantinga
24ec1c09b9
Renamed SDL_PROP_IOSTREAM_STDIO_HANDLE_POINTER to SDL_PROP_IOSTREAM_STDIO_FILE_POINTER
2024-03-18 21:56:11 -07:00
Frank Praznik
1eb7b79986
video: Prepend global video property with "SDL"
2024-03-18 21:52:39 -04:00
SDL Wiki Bot
0d0aaa2d75
Sync SDL3 wiki -> header
2024-03-18 15:57:23 +00:00
Sam Lantinga
92d01ef12a
You can pass NULL to SDL_GetPathInfo() and SDL_GetStoragePathInfo() to test for the existence of a file.
2024-03-18 08:56:24 -07:00
Frank Praznik
ebb6582534
wayland: Handle the toplevel export property as a string
...
xdg-toplevel export handles are strings, so treat the property as one. Avoids the need to manually manage the string pointer.
2024-03-18 11:41:02 -04:00
SDL Wiki Bot
fc26d5d328
Sync SDL3 wiki -> header
2024-03-18 04:28:30 +00:00
Sam Lantinga
a1a0156756
Renamed SDL_SizeIO() SDL_GetIOSize()
2024-03-18 00:27:18 -04:00
Sam Lantinga
df0f5deddf
Added SDL_IOFromDynamicMem()
2024-03-18 00:27:18 -04:00
Sam Lantinga
747300b356
SDL file times are 64-bit integers representing nanoseconds since the Unix epoch
2024-03-17 13:21:04 -07:00
SDL Wiki Bot
e7b9f75e62
Sync SDL3 wiki -> header
2024-03-17 19:29:22 +00:00
Sam Lantinga
d65ae710a1
Renamed SDL_LogGetOutputFunction() and SDL_LogSetOutputFunction() to match SDL 3.0 naming convention
2024-03-17 12:28:11 -07:00
Sam Lantinga
d8a54cd4f8
Updated "see also" references to be more consistent
...
Fixes https://github.com/libsdl-org/SDL/issues/9282
2024-03-17 12:28:11 -07:00
SDL Wiki Bot
a206e1e3c0
Sync SDL3 wiki -> header
2024-03-17 15:40:25 +00:00
Sam Lantinga
f460f42e70
Added filesystem operations to SDL_Storage
2024-03-17 08:39:43 -07:00
Sam Lantinga
7a088527c1
Removed the reserved parameter from SDL_EnumerateDirectoryCallback
...
If someone needs to, say, include an SDL_Storage object, they can simply point userdata at a structure that includes the the storage and any other data needed in enumeration.
2024-03-17 08:39:43 -07:00
Sam Lantinga
ec3ba387d1
Added SDL_OpenFileStorage() for local file storage
2024-03-17 08:39:43 -07:00
Sam Lantinga
db0c1d7aeb
Added portable file and directory operations (thanks @icculus!)
2024-03-17 08:39:43 -07:00
Sam Lantinga
fe5c34d4bd
Renamed storage functions to match SDL 3.0 naming convention
2024-03-17 08:39:43 -07:00
SDL Wiki Bot
9ccde0def4
Sync SDL3 wiki -> header
2024-03-16 14:20:24 +00:00
Ethan Lee
744227e6ab
Add SDL_storage
2024-03-16 07:19:50 -07:00
Frank Praznik
19764ffcc8
wayland: Add the xdg-foreign-unstable-v2 protocol
...
Add the xdg-foreign-unstable-v2 protocol and use it to create export handles for toplevel windows, which will be used when an external component, such as the file chooser portal, requires it.
2024-03-15 18:30:05 -04:00
Petar Popovic
2b45452dd5
Adding comments to init-flags SDL_INIT_AUDIO and SDL_INIT_SENSOR that they imply SDL_INIT_EVENTS
...
When initializing SDL with the flag SDL_INIT_AUDIO or SDL_INIT_SENSOR the event subsystem also gets initialized(SDL_INIT_EVENTS). This isn't mentioned in the comments.
This commit adds these two comments.
2024-03-15 13:10:49 -07:00
SDL Wiki Bot
fa7ec59ecd
Sync SDL3 wiki -> header
2024-03-15 19:59:26 +00:00
Ryan C. Gordon
b7cda16613
iostream: Final fixes before merging.
...
- SDL_GetRWProperties -> SDL_GetIOProperties
- SDL_GetRWStatus -> SDL_GetIOStatus
- Some documentation corrections and improvements.
2024-03-15 15:37:03 -04:00