Frank Praznik
e987c4a463
video: Add the concept of child popup windows
...
Add the CreatePopupWindow function to allow the creation of child tooltip and menu popup windows. Popup windows must be created as either a tooltip or popup menu and cannot be minimized, maximized, made fullscreen, or grab the mouse.
Child popup windows are tracked and will be recursively hidden, shown, or destroyed in tandem with the parent window.
2023-03-10 15:51:13 -08:00
Ozkan Sezer
bb59f46cbe
Removed guard around the enabled assertions support code
...
Otherwise, SDL_assert_always() wouldn't work.
Fixes https://github.com/libsdl-org/SDL/issues/7433
2023-03-09 20:51:50 +03:00
David Demelier
d0c4849d0b
Rename SDL_atomic_t to SDL_AtomicInt
2023-03-09 09:00:09 -08:00
Sam Lantinga
8994878767
Added SDL_GetSystemTheme() to return whether the system is using a dark or light color theme, and SDL_EVENT_SYSTEM_THEME_CHANGED is sent when this changes
...
Fixes https://github.com/libsdl-org/SDL/issues/5334
Fixes https://github.com/libsdl-org/SDL/issues/6958
Closes https://github.com/libsdl-org/SDL/pull/6440
2023-03-09 03:25:20 -08:00
Sam Lantinga
fb0c3197e0
Fixed the documentation for SDL_SetRelativeMouseMode()
2023-03-08 22:32:54 -08:00
Sam Lantinga
698dbd8464
SDL_CreateWindow() has been simplified and no longer takes a window position.
2023-03-06 09:50:12 -08:00
Sylvain
a946a34452
Add Drag and drop position, for x11, wayland and MACOSX
2023-03-06 08:44:05 -08:00
Sam Lantinga
6b87d1938f
Added SDL_EVENT_DISPLAY_SCALE_CHANGED
2023-03-03 11:16:31 -08:00
Sam Lantinga
bd2e2ee7aa
SDL_RenderTexture() and SDL_RenderTextureRotated() take floating point source coordinates
...
See the discussion at https://discourse.libsdl.org/t/sdl-rendercopyf-uses-ints/36732/8
2023-03-02 09:42:32 -08:00
Sam Lantinga
d5775f6708
The gamepad event structures caxis, cbutton, cdevice, ctouchpad, and csensor have been renamed gaxis, gbutton, gdevice, gtouchpad, and gsensor.
...
Fixes https://github.com/libsdl-org/SDL/issues/7375
2023-03-01 09:48:28 -08:00
Ryan C. Gordon
f48d0cc164
audio: Remove AUDIO_U16* support.
...
It wasn't heavily used, and you can't use memset to silence a U16 buffer.
Fixes #7380 .
2023-03-01 10:26:01 -05:00
Sam Lantinga
941a603665
Document that SDL_IsScreenSaverEnabled() was renamed SDL_ScreenSaverEnabled()
2023-02-28 15:56:49 -08:00
SDL Wiki Bot
260dcb856e
Sync SDL3 wiki -> header
2023-02-28 17:27:14 +00:00
Eddy Jansson
5f5abb6805
Always allocate zt in output of SDL_iconv_string()
...
Before this, the function could not be used on buffers,
as it would not account for the zero-termination unless
it was included in the input.
2023-02-28 09:26:01 -08:00
Ryan C. Gordon
9f8425a7a9
include: Fixed wiki formatting that got mangled into the headers.
2023-02-26 21:47:17 -05:00
Ryan C. Gordon
0598ecc150
Sync wiki -> headers.
2023-02-24 11:49:41 -05:00
Ozkan Sezer
2eb4ab5bb0
SDL_revision.h: added missing newline at end of file.
2023-02-23 23:55:56 +03:00
Sam Lantinga
a758f87f6f
Fixed compile error on Android when assert is defined as SDL_assert
2023-02-22 15:32:49 -08:00
Anonymous Maarten
213fbd01c5
SDL_endian.h: improve doxygen documentation
2023-02-19 10:01:33 -08:00
Anonymous Maarten
549cedfa88
include: add \brief to includes
2023-02-19 10:01:33 -08:00
Anonymous Maarten
18f38bef03
Remove include/SDL3/SDL_name.h
2023-02-18 12:33:54 -08:00
Sam Lantinga
284ae91734
Include SDL_events.h for SDL_ConvertEventToRenderCoordinates()
2023-02-13 17:50:29 -08:00
Sylvain
81c94a165c
Add \since docs where missing and resets some to 3.0.0
...
- remove a \returns
2023-02-12 20:43:11 +01:00
Sylvain
3d93b07d5b
Documentation \param fixes
2023-02-12 08:21:36 -08:00
Sylvain
49e47b523a
Update `\returns` to the generic form
2023-02-12 08:21:02 -08:00
Sylvain
612584277c
Fix build documentation
2023-02-12 09:54:36 +01:00
Sylvain
e9af964cf4
More `\param` added for SDL function in stdinc.h
2023-02-12 09:50:38 +01:00
Sylvain
43c08170af
Add missing '\param' documentation
2023-02-12 09:42:13 +01:00
Sylvain
ce366facaa
Add missing \returns, change "return" to "returns" to have same naming
2023-02-12 09:22:25 +01:00
Sam Lantinga
144390f8fc
Fixed renaming suggestion for SDL_WINDOWEVENT_CLOSE
2023-02-10 06:48:54 -08:00
Sam Lantinga
13d9e41c3f
SDL_WINDOWEVENT_SIZE_CHANGED was renamed SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED
2023-02-10 06:38:14 -08:00
Sam Lantinga
69a6796476
Note that the coordinates in SDL_GetDisplayForPoint() and SDL_GetDisplayForRect() are screen coordinates
2023-02-10 06:31:10 -08:00
Sylvain
32d30944a1
SDL_GetNumTouchFingers(): 0 is a valid value. negative is automatically an error
2023-02-10 09:30:31 +01:00
Sylvain
a2f3711c80
SDL_AndroidGetExternalStorageState(): return 0 on success, and fills *state with flags
2023-02-10 09:30:31 +01:00
Sam Lantinga
5b77ad54c4
Fixed order and constness of parameters to SDL_ConvertAudioSamples()
2023-02-09 17:49:35 -08:00
Sam Lantinga
e65e2c8ed7
SDL_CloseJoystick() should return void, not int
2023-02-09 17:26:16 -08:00
Sylvain
dc74a67a57
SDL_UnlockTexture: change from 'int' to 'void'
2023-02-09 20:17:27 +01:00
Sylvain
cee245b6a9
SDL_*SceenSaver(): change return value to int. // add SDL_Unsupported() errors
2023-02-09 08:16:46 -08:00
Sylvain
e2e5e670bf
Remove returns int from Destroy/Close/Unlock functions
2023-02-09 07:57:14 -08:00
Linus Probert
3bd737d44c
Add error returns to void functions that can fail/set errors.
...
This takes care of the last set of void functions that could
potentially be shifted to instead return an int indicating success and
setting an error in case of an error.
2023-02-09 07:23:21 -08:00
Sylvain
b305d9e3c0
Change return type from void to int for audio function. Eventually set invalid parameter error.
2023-02-08 17:43:44 -08:00
Sam Lantinga
824b9b0a58
Removed SDL_GetDisplayDPI()
...
This function wasn't consistently correct across platforms and devices.
If you want the UI scale factor, you can use display_scale in the structure returned by SDL_GetDesktopDisplayMode(). If you need an approximate DPI, you can multiply this value times 160 on iPhone and Android, and 96 on other platforms.
2023-02-08 17:35:54 -08:00
Sylvain
c5c94a6be6
Change return type from void to int, for functions that set an error
...
(SDL_SetError(), SDL_OutOfMemory(), SDL_Unsupported(), SDL_InvalidParam())
Update prototype to forward errors to generic layer, for the functions:
MoveCursor, WarpMouse, GL_DeleteContext, GetDisplayModes.
Check invalid parameter in SDL_SetTextInputRect() generic layer.
2023-02-07 13:51:45 -08:00
Ozkan Sezer
7f3036c353
make sure to not enable SDL_PASSED_BEGINTHREAD_ENDTHREAD for WinRT
2023-02-07 00:22:37 +03:00
Linus Probert
375bde8a4f
[SDL3] Cleanup void functions ( #7253 )
...
Some functions that do call SDL_SetError but return void changed to instead return non-zero in case of errors.
2023-02-06 08:53:52 -08:00
Ozkan Sezer
02fbf2cf99
replaced line comments in public header.
2023-02-04 10:02:10 +03:00
Anonymous Maarten
d6fdb842b0
include: add comment documenting the change(s) to SDL_opengl_glext.h
2023-02-04 02:44:10 +01:00
Sam Lantinga
a34a84ba98
Rename int versions of the SDL2 render functions ( #7235 )
...
This makes it clear what the new versions are, and in the case of SDL_RenderDrawPoint() and SDL_RenderDrawLine(), the coccinelle script actually does the (float) casts for you.
2023-02-03 14:55:32 -08:00
Sam Lantinga
14a4ce8b59
Fixed SDL_ScaleMode values for consistency
2023-02-03 14:20:51 -08:00
Sam Lantinga
dcd17f5473
Renderer logical size is now implemented as a render target
...
This fixes rounding errors with coordinate scaling and gives more flexibility in the presentation, as well as making it easy to maintain device independent resolution as windows move between different pixel density displays.
By default when a renderer is created, it will match the window size so window coordinates and render coordinates are 1-1.
Mouse and touch events are no longer filtered to change their coordinates, instead you can call SDL_ConvertEventToRenderCoordinates() to explicitly map event coordinates into the rendering viewport.
SDL_RenderWindowToLogical() and SDL_RenderLogicalToWindow() have been renamed SDL_RenderCoordinatesFromWindow() and SDL_RenderCoordinatesToWindow() and take floating point coordinates in both directions.
The viewport, clipping state, and scale for render targets are now persistent and will remain set whenever they are active.
2023-02-03 12:57:37 -08:00