Commit graph

114 commits

Author SHA1 Message Date
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
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
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
Sam Lantinga
606903c02f Updated window event names 2024-05-26 11:13:34 -07: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
SDL Wiki Bot
983544a53e Sync SDL3 wiki -> header 2024-05-22 00:41:09 +00: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
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
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
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
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
Petar Popovic
dffbb574ea renaming SDL_eventaction tag to SDL_EventAction 2024-04-28 16:09:09 -07: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
Sam Lantinga
2fa4937e1a Removed obsolete padding 2024-04-15 13:55:01 -07: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
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
407e54e188
include: More improved docs for the wikibridge! 2024-04-11 00:37:11 -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
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
f08c31060a Renaming SDL_eventaction to SDL_EventAction 2024-04-07 12:04:32 -04: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
Sam Lantinga
6443c75eda Removed SDL_TEXTINPUTEVENT_TEXT_SIZE 2024-03-25 13:26:23 -07:00
Sam Lantinga
2fe1a6a279 Initial support for hotplugging mice and keyboards 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
Sam Lantinga
6c11449cd4 Added a note for the SDL_CommonEvent type 2024-03-14 09:00:47 -07:00
Sam Lantinga
442073f379 Added missing reserved field in SDL_CameraDeviceEvent (thanks @Saalvage!) 2024-03-14 08:51:48 -07:00
Sam Lantinga
9bef331dc8 Note that SDL_UserEvent and SDL_Event type are intentionally Uint32 2024-03-14 08:49:02 -07:00
Sam Lantinga
efbbafb3f1 Re-added balls to the SDL joystick API
It turns out these were being used on Linux and at least one virtual driver was making use of them (thanks @mrfixit2001!)
2024-03-10 21:30:14 -07:00
Sam Lantinga
790cd395f5 Make sure the type in the SDL_Event aligns properly across the union 2024-03-07 06:58:43 -08:00
Susko3
722f4104bf Use enums as types in SDL_*Event structures
The main `SDL_Event` union is not using the enum as
valid user events types are not in the enum.
2024-03-06 15:40:05 -08:00
SDL Wiki Bot
2d0cd90171 Sync SDL3 wiki -> header 2024-03-06 17:52:26 +00:00
Sam Lantinga
860155680d SDL_RegisterEvents() now returns 0 if it couldn't allocate any user events. 2024-03-06 09:51:15 -08:00
Sam Lantinga
95fbbc6f07 Fixed accidental use of tabs 2024-03-05 16:55:26 -08:00
Susko3
e268cdbec6
Use specific types in public headers (#9205)
Uses specific typedef'd types instead of generic integral types where applicable.
2024-03-05 16:52:15 -08:00
Ryan C. Gordon
22dbc0f32f camera: Patched to compile after rebasing to latest in main. 2024-02-20 15:56:26 -05:00
Ryan C. Gordon
67708f9110 camera: Emscripten support!
This also adds code to deal with waiting for the user to approve camera
access, reworks testcameraminimal to use main callbacks, etc.
2024-02-20 15:56:26 -05:00
Ryan C. Gordon
d3e6ef3cc6 camera: Massive code reworking.
- Simplified public API, simplified backend interface.
- Camera device hotplug events.
- Thread code is split up so it backends that provide own threads can use it.
- Added "dummy" backend.

Note that CoreMedia (Apple) and Android backends need to be updated, as does
the testcamera app (testcameraminimal works).
2024-02-20 15:56:26 -05:00
Sam Lantinga
cacac6cc34 Updated structure and field names for consistency
Type names are camel case and field names are snake case except for fields ending in id, which are capitalized.

Fixes https://github.com/libsdl-org/SDL/issues/6955
2024-02-11 08:27:56 -08:00
Sam Lantinga
6f87973b9c Added a reserved field to the SDL_Event structure
This guarantees 64-bit alignment for the timestamp
2024-02-11 08:27:56 -08:00
Sam Lantinga
30e176d6ba Added HDR display properties and related event
Also added an HDR calibration stage to testcolorspace
2024-02-06 02:48:05 -08:00
SDL Wiki Bot
b5bcf45a65 Sync SDL3 wiki -> header 2024-01-18 12:02:08 +00:00