SDL: include: Add `\since` to all documentation that was missing it.

From 0df988389c07cb71a3f6b904e15974dfffdee5ea Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Thu, 11 Apr 2024 13:34:29 -0400
Subject: [PATCH] include: Add `\since` to all documentation that was missing
 it.

---
 build-scripts/wikiheaders.pl  | 22 +++++++++++
 include/SDL3/SDL_atomic.h     |  2 +
 include/SDL3/SDL_audio.h      |  4 ++
 include/SDL3/SDL_camera.h     |  2 +
 include/SDL3/SDL_dialog.h     |  4 ++
 include/SDL3/SDL_events.h     | 70 +++++++++++++++++++++++++++++++++++
 include/SDL3/SDL_filesystem.h |  2 +
 include/SDL3/SDL_gamepad.h    |  8 ++++
 include/SDL3/SDL_guid.h       |  2 +
 include/SDL3/SDL_haptic.h     | 64 ++++++++++++++++++++++++++++++++
 include/SDL3/SDL_hidapi.h     |  6 +++
 include/SDL3/SDL_hints.h      |  2 +
 include/SDL3/SDL_init.h       |  2 +
 include/SDL3/SDL_joystick.h   |  6 +++
 include/SDL3/SDL_keyboard.h   |  2 +
 include/SDL3/SDL_log.h        |  8 ++++
 include/SDL3/SDL_main.h       |  2 +
 include/SDL3/SDL_messagebox.h | 12 ++++++
 include/SDL3/SDL_metal.h      |  2 +
 include/SDL3/SDL_mouse.h      |  6 +++
 include/SDL3/SDL_mutex.h      |  2 +
 include/SDL3/SDL_pen.h        |  2 +
 include/SDL3/SDL_pixels.h     | 12 ++++++
 include/SDL3/SDL_properties.h |  4 ++
 include/SDL3/SDL_render.h     | 16 ++++++++
 include/SDL3/SDL_sensor.h     |  4 ++
 include/SDL3/SDL_stdinc.h     | 22 +++++++++++
 include/SDL3/SDL_surface.h    |  8 ++++
 include/SDL3/SDL_system.h     |  6 +++
 include/SDL3/SDL_thread.h     |  4 ++
 include/SDL3/SDL_time.h       |  6 +++
 include/SDL3/SDL_timer.h      |  2 +
 include/SDL3/SDL_video.h      | 14 +++++++
 33 files changed, 330 insertions(+)

diff --git a/build-scripts/wikiheaders.pl b/build-scripts/wikiheaders.pl
index 751b7bc3b8504..e081b7a085bc7 100755
--- a/build-scripts/wikiheaders.pl
+++ b/build-scripts/wikiheaders.pl
@@ -1454,6 +1454,28 @@ sub print_undocumented_section {
         # Make sure this ends with a double-newline.
         $sections{'See Also'} .= "\n" if defined $sections{'See Also'};
 
+        if (0) {  # !!! FIXME: this was a useful hack, but this needs to be generalized if we're going to do this always.
+            # Plug in a \since section if one wasn't listed.
+            if (not defined $sections{'Version'}) {
+                my $symtypename;
+                if ($symtype == 1) {
+                    $symtypename = 'function';
+                } elsif ($symtype == 2) {
+                    $symtypename = 'macro';
+                } elsif ($symtype == 3) {
+                    $symtypename = 'struct';
+                } elsif ($symtype == 4) {
+                    $symtypename = 'enum';
+                } elsif ($symtype == 5) {
+                    $symtypename = 'datatype';
+                } else {
+                    die("Unexpected symbol type $symtype!");
+                }
+                my $str = "This $symtypename is available since SDL 3.0.0.";
+                $sections{'Version'} = wordwrap(wikify($wikitype, $str)) . "\n";
+            }
+        }
+
         # We can build the wiki table now that we have all the data.
         if (scalar(@params) > 0) {
             my $str = '';
diff --git a/include/SDL3/SDL_atomic.h b/include/SDL3/SDL_atomic.h
index 083bf10cb28ad..c365ca855c8e2 100644
--- a/include/SDL3/SDL_atomic.h
+++ b/include/SDL3/SDL_atomic.h
@@ -266,6 +266,8 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
  * A type representing an atomic integer value.
  *
  * It is a struct so people don't accidentally use numeric operations on it.
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_AtomicInt { int value; } SDL_AtomicInt;
 
diff --git a/include/SDL3/SDL_audio.h b/include/SDL3/SDL_audio.h
index 0d8cd510cb5b4..e77afcbfc1008 100644
--- a/include/SDL3/SDL_audio.h
+++ b/include/SDL3/SDL_audio.h
@@ -72,6 +72,8 @@ extern "C" {
  * ```
  *
  * There are macros to query these bits.
+ *
+ * \since This datatype is available since SDL 3.0.0.
  */
 typedef Uint16 SDL_AudioFormat;
 
@@ -140,6 +142,8 @@ typedef Uint16 SDL_AudioFormat;
 
 /**
  * SDL Audio Device instance IDs.
+ *
+ * \since This datatype is available since SDL 3.0.0.
  */
 typedef Uint32 SDL_AudioDeviceID;
 
diff --git a/include/SDL3/SDL_camera.h b/include/SDL3/SDL_camera.h
index 988b8e2beb1fa..6d2e1e7af9144 100644
--- a/include/SDL3/SDL_camera.h
+++ b/include/SDL3/SDL_camera.h
@@ -46,6 +46,8 @@ extern "C" {
  * The ID value starts at 1 and increments from there. The value 0 is an
  * invalid ID.
  *
+ * \since This datatype is available since SDL 3.0.0.
+ *
  * \sa SDL_GetCameraDevices
  */
 typedef Uint32 SDL_CameraDeviceID;
diff --git a/include/SDL3/SDL_dialog.h b/include/SDL3/SDL_dialog.h
index ab3875c91f8c1..c737bdd68f3b3 100644
--- a/include/SDL3/SDL_dialog.h
+++ b/include/SDL3/SDL_dialog.h
@@ -42,6 +42,8 @@ extern "C" {
  * hyphens, underscores and periods. Alternatively, the whole string can be a
  * single asterisk ("*"), which serves as an "All files" filter.
  *
+ * \since This struct is available since SDL 3.0.0.
+ *
  * \sa SDL_DialogFileCallback
  * \sa SDL_ShowOpenFileDialog
  * \sa SDL_ShowSaveFileDialog
@@ -72,6 +74,8 @@ typedef struct SDL_DialogFileFilter
  * entry) if no filter was selected, or -1 if the platform or method doesn't
  * support fetching the selected filter or if an error occured.
  *
+ * \since This datatype is available since SDL 3.0.0.
+ *
  * \sa SDL_DialogFileFilter
  * \sa SDL_ShowOpenFileDialog
  * \sa SDL_ShowSaveFileDialog
diff --git a/include/SDL3/SDL_events.h b/include/SDL3/SDL_events.h
index f728d5a4dba40..007eb2c571932 100644
--- a/include/SDL3/SDL_events.h
+++ b/include/SDL3/SDL_events.h
@@ -53,6 +53,8 @@ extern "C" {
 
 /**
  * The types of events that can be delivered.
+ *
+ * \since This enum is available since SDL 3.0.0.
  */
 typedef enum SDL_EventType
 {
@@ -241,6 +243,8 @@ typedef enum SDL_EventType
 
 /**
  * Fields shared by every event
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_CommonEvent
 {
@@ -251,6 +255,8 @@ typedef struct SDL_CommonEvent
 
 /**
  * Display state change event data (event.display.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_DisplayEvent
 {
@@ -263,6 +269,8 @@ typedef struct SDL_DisplayEvent
 
 /**
  * Window state change event data (event.window.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_WindowEvent
 {
@@ -276,6 +284,8 @@ typedef struct SDL_WindowEvent
 
 /**
  * Keyboard device event structure (event.kdevice.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_KeyboardDeviceEvent
 {
@@ -287,6 +297,8 @@ typedef struct SDL_KeyboardDeviceEvent
 
 /**
  * Keyboard button event structure (event.key.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_KeyboardEvent
 {
@@ -309,6 +321,8 @@ typedef struct SDL_KeyboardEvent
  *
  * The `text` is owned by SDL and should be copied if the application wants to
  * hold onto it beyond the scope of handling this event.
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_TextEditingEvent
 {
@@ -326,6 +340,8 @@ typedef struct SDL_TextEditingEvent
  *
  * The `text` is owned by SDL and should be copied if the application wants to
  * hold onto it beyond the scope of handling this event.
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_TextInputEvent
 {
@@ -338,6 +354,8 @@ typedef struct SDL_TextInputEvent
 
 /**
  * Mouse device event structure (event.mdevice.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_MouseDeviceEvent
 {
@@ -349,6 +367,8 @@ typedef struct SDL_MouseDeviceEvent
 
 /**
  * Mouse motion event structure (event.motion.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_MouseMotionEvent
 {
@@ -366,6 +386,8 @@ typedef struct SDL_MouseMotionEvent
 
 /**
  * Mouse button event structure (event.button.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_MouseButtonEvent
 {
@@ -384,6 +406,8 @@ typedef struct SDL_MouseButtonEvent
 
 /**
  * Mouse wheel event structure (event.wheel.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_MouseWheelEvent
 {
@@ -401,6 +425,8 @@ typedef struct SDL_MouseWheelEvent
 
 /**
  * Joystick axis motion event structure (event.jaxis.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_JoyAxisEvent
 {
@@ -418,6 +444,8 @@ typedef struct SDL_JoyAxisEvent
 
 /**
  * Joystick trackball motion event structure (event.jball.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_JoyBallEvent
 {
@@ -435,6 +463,8 @@ typedef struct SDL_JoyBallEvent
 
 /**
  * Joystick hat position change event structure (event.jhat.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_JoyHatEvent
 {
@@ -456,6 +486,8 @@ typedef struct SDL_JoyHatEvent
 
 /**
  * Joystick button event structure (event.jbutton.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_JoyButtonEvent
 {
@@ -471,6 +503,8 @@ typedef struct SDL_JoyButtonEvent
 
 /**
  * Joystick device event structure (event.jdevice.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_JoyDeviceEvent
 {
@@ -482,6 +516,8 @@ typedef struct SDL_JoyDeviceEvent
 
 /**
  * Joysick battery level change event structure (event.jbattery.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_JoyBatteryEvent
 {
@@ -495,6 +531,8 @@ typedef struct SDL_JoyBatteryEvent
 
 /**
  * Gamepad axis motion event structure (event.gaxis.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_GamepadAxisEvent
 {
@@ -513,6 +551,8 @@ typedef struct SDL_GamepadAxisEvent
 
 /**
  * Gamepad button event structure (event.gbutton.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_GamepadButtonEvent
 {
@@ -529,6 +569,8 @@ typedef struct SDL_GamepadButtonEvent
 
 /**
  * Gamepad device event structure (event.gdevice.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_GamepadDeviceEvent
 {
@@ -540,6 +582,8 @@ typedef struct SDL_GamepadDeviceEvent
 
 /**
  * Gamepad touchpad event structure (event.gtouchpad.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_GamepadTouchpadEvent
 {
@@ -556,6 +600,8 @@ typedef struct SDL_GamepadTouchpadEvent
 
 /**
  * Gamepad sensor event structure (event.gsensor.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_GamepadSensorEvent
 {
@@ -570,6 +616,8 @@ typedef struct SDL_GamepadSensorEvent
 
 /**
  * Audio device event structure (event.adevice.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_AudioDeviceEvent
 {
@@ -585,6 +633,8 @@ typedef struct SDL_AudioDeviceEvent
 
 /**
  * Camera device event structure (event.cdevice.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_CameraDeviceEvent
 {
@@ -599,6 +649,8 @@ typedef struct SDL_CameraDeviceEvent
 
 /**
  * Touch finger event structure (event.tfinger.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_TouchFingerEvent
 {
@@ -620,6 +672,8 @@ typedef struct SDL_TouchFingerEvent
 
 /**
  * Pressure-sensitive pen touched or stopped touching surface (event.ptip.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_PenTipEvent
 {
@@ -639,6 +693,8 @@ typedef struct SDL_PenTipEvent
 /**
  * Pressure-sensitive pen motion / pressure / angle event structure
  * (event.pmotion.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_PenMotionEvent
 {
@@ -657,6 +713,8 @@ typedef struct SDL_PenMotionEvent
 
 /**
  * Pressure-sensitive pen button event structure (event.pbutton.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_PenButtonEvent
 {
@@ -679,6 +737,8 @@ typedef struct SDL_PenButtonEvent
  *
  * The `data` is owned by SDL and should be copied if the application wants to
  * hold onto it beyond the scope of handling this event. Do not free it!
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_DropEvent
 {
@@ -695,6 +755,8 @@ typedef struct SDL_DropEvent
 /**
  * An event triggered when the clipboard contents have changed
  * (event.clipboard.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_ClipboardEvent
 {
@@ -705,6 +767,8 @@ typedef struct SDL_ClipboardEvent
 
 /**
  * Sensor event structure (event.sensor.*)
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_SensorEvent
 {
@@ -718,6 +782,8 @@ typedef struct SDL_SensorEvent
 
 /**
  * The "quit requested" event
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_QuitEvent
 {
@@ -734,6 +800,8 @@ typedef struct SDL_QuitEvent
  * SDL_PushEvent(). The contents of the structure members are completely up to
  * the programmer; the only requirement is that '''type''' is a value obtained
  * from SDL_RegisterEvents().
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_UserEvent
 {
@@ -749,6 +817,8 @@ typedef struct SDL_UserEvent
 
 /**
  * The structure for all events in SDL.
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef union SDL_Event
 {
diff --git a/include/SDL3/SDL_filesystem.h b/include/SDL3/SDL_filesystem.h
index e27bfb3326905..268fae02eaace 100644
--- a/include/SDL3/SDL_filesystem.h
+++ b/include/SDL3/SDL_filesystem.h
@@ -164,6 +164,8 @@ extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);
  *
  * Note that on macOS/iOS, the Videos folder is called "Movies".
  *
+ * \since This enum is available since SDL 3.0.0.
+ *
  * \sa SDL_GetUserFolder
  */
 typedef enum SDL_Folder
diff --git a/include/SDL3/SDL_gamepad.h b/include/SDL3/SDL_gamepad.h
index de7b9f44b4aab..0364aabf16f5e 100644
--- a/include/SDL3/SDL_gamepad.h
+++ b/include/SDL3/SDL_gamepad.h
@@ -55,6 +55,8 @@ extern "C" {
 
 /**
  * The structure used to identify an SDL gamepad
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 struct SDL_Gamepad;
 typedef struct SDL_Gamepad SDL_Gamepad;
@@ -95,6 +97,8 @@ typedef enum SDL_GamepadType
  *
  * You can query the labels for the face buttons using
  * SDL_GetGamepadButtonLabel()
+ *
+ * \since This enum is available since SDL 3.0.0.
  */
 typedef enum SDL_GamepadButton
 {
@@ -136,6 +140,8 @@ typedef enum SDL_GamepadButton
  *
  * For a complete set, you should look at the button and gamepad type and have
  * a set of symbols that work well with your art style.
+ *
+ * \since This enum is available since SDL 3.0.0.
  */
 typedef enum SDL_GamepadButtonLabel
 {
@@ -161,6 +167,8 @@ typedef enum SDL_GamepadButtonLabel
  * Trigger axis values range from 0 (released) to SDL_JOYSTICK_AXIS_MAX (fully
  * pressed) when reported by SDL_GetGamepadAxis(). Note that this is not the
  * same range that will be reported by the lower-level SDL_GetJoystickAxis().
+ *
+ * \since This enum is available since SDL 3.0.0.
  */
 typedef enum SDL_GamepadAxis
 {
diff --git a/include/SDL3/SDL_guid.h b/include/SDL3/SDL_guid.h
index e94350c842e2e..89f129b46e6dc 100644
--- a/include/SDL3/SDL_guid.h
+++ b/include/SDL3/SDL_guid.h
@@ -51,6 +51,8 @@ extern "C" {
  *
  * GUIDs may be platform-dependent (i.e., the same device may report different
  * GUIDs on different operating systems).
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_GUID {
     Uint8 data[16];
diff --git a/include/SDL3/SDL_haptic.h b/include/SDL3/SDL_haptic.h
index 67e324a4bdf46..a9810f6aab20f 100644
--- a/include/SDL3/SDL_haptic.h
+++ b/include/SDL3/SDL_haptic.h
@@ -167,6 +167,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  *
  * Constant haptic effect.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticCondition
  */
 #define SDL_HAPTIC_CONSTANT     (1u<<0)
@@ -176,6 +178,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  *
  * Periodic haptic effect that simulates sine waves.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticPeriodic
  */
 #define SDL_HAPTIC_SINE         (1u<<1)
@@ -185,6 +189,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  *
  * Periodic haptic effect that simulates square waves.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticPeriodic
  */
 #define SDL_HAPTIC_SQUARE       (1<<2)
@@ -194,6 +200,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  *
  * Periodic haptic effect that simulates triangular waves.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticPeriodic
  */
 #define SDL_HAPTIC_TRIANGLE     (1u<<3)
@@ -203,6 +211,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  *
  * Periodic haptic effect that simulates saw tooth up waves.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticPeriodic
  */
 #define SDL_HAPTIC_SAWTOOTHUP   (1u<<4)
@@ -212,6 +222,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  *
  * Periodic haptic effect that simulates saw tooth down waves.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticPeriodic
  */
 #define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)
@@ -221,6 +233,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  *
  * Ramp haptic effect.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticRamp
  */
 #define SDL_HAPTIC_RAMP         (1u<<6)
@@ -231,6 +245,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  * Condition haptic effect that simulates a spring. Effect is based on the
  * axes position.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticCondition
  */
 #define SDL_HAPTIC_SPRING       (1u<<7)
@@ -241,6 +257,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  * Condition haptic effect that simulates dampening. Effect is based on the
  * axes velocity.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticCondition
  */
 #define SDL_HAPTIC_DAMPER       (1u<<8)
@@ -251,6 +269,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  * Condition haptic effect that simulates inertia. Effect is based on the axes
  * acceleration.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticCondition
  */
 #define SDL_HAPTIC_INERTIA      (1u<<9)
@@ -261,6 +281,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  * Condition haptic effect that simulates friction. Effect is based on the
  * axes movement.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticCondition
  */
 #define SDL_HAPTIC_FRICTION     (1u<<10)
@@ -270,12 +292,16 @@ typedef struct SDL_Haptic SDL_Haptic;
  *
  * Haptic effect for direct control over high/low frequency motors.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticLeftRight
  */
 #define SDL_HAPTIC_LEFTRIGHT    (1u<<11)
 
 /**
  * Reserved for future use
+ *
+ * \since This macro is available since SDL 3.0.0.
  */
 #define SDL_HAPTIC_RESERVED1    (1u<<12)
 #define SDL_HAPTIC_RESERVED2    (1u<<13)
@@ -285,6 +311,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  * Custom effect is supported.
  *
  * User defined custom haptic effect.
+ *
+ * \since This macro is available since SDL 3.0.0.
  */
 #define SDL_HAPTIC_CUSTOM       (1u<<15)
 
@@ -297,6 +325,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  *
  * Device supports setting the global gain.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_SetHapticGain
  */
 #define SDL_HAPTIC_GAIN       (1u<<16)
@@ -306,6 +336,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  *
  * Device supports setting autocenter.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_SetHapticAutocenter
  */
 #define SDL_HAPTIC_AUTOCENTER (1u<<17)
@@ -315,6 +347,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  *
  * Device supports querying effect status.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_GetHapticEffectStatus
  */
 #define SDL_HAPTIC_STATUS     (1u<<18)
@@ -324,6 +358,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  *
  * Devices supports being paused.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_PauseHaptic
  * \sa SDL_ResumeHaptic
  */
@@ -338,6 +374,8 @@ typedef struct SDL_Haptic SDL_Haptic;
 /**
  * Uses polar coordinates for the direction.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticDirection
  */
 #define SDL_HAPTIC_POLAR      0
@@ -345,6 +383,8 @@ typedef struct SDL_Haptic SDL_Haptic;
 /**
  * Uses cartesian coordinates for the direction.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticDirection
  */
 #define SDL_HAPTIC_CARTESIAN  1
@@ -352,6 +392,8 @@ typedef struct SDL_Haptic SDL_Haptic;
 /**
  * Uses spherical coordinates for the direction.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticDirection
  */
 #define SDL_HAPTIC_SPHERICAL  2
@@ -362,6 +404,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  * This provides better compatibility across platforms and devices as SDL will
  * guess the correct axis.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticDirection
  */
 #define SDL_HAPTIC_STEERING_AXIS 3
@@ -377,6 +421,8 @@ typedef struct SDL_Haptic SDL_Haptic;
 /**
  * Used to play a device an infinite number of times.
  *
+ * \since This macro is available since SDL 3.0.0.
+ *
  * \sa SDL_RunHapticEffect
  */
 #define SDL_HAPTIC_INFINITY   4294967295U
@@ -476,6 +522,8 @@ typedef struct SDL_Haptic SDL_Haptic;
  *  direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters.
  * ```
  *
+ * \since This struct is available since SDL 3.0.0.
+ *
  * \sa SDL_HAPTIC_POLAR
  * \sa SDL_HAPTIC_CARTESIAN
  * \sa SDL_HAPTIC_SPHERICAL
@@ -498,6 +546,8 @@ typedef struct SDL_HapticDirection
  * A constant effect applies a constant force in the specified direction to
  * the joystick.
  *
+ * \since This struct is available since SDL 3.0.0.
+ *
  * \sa SDL_HAPTIC_CONSTANT
  * \sa SDL_HapticEffect
  */
@@ -578,6 +628,8 @@ typedef struct SDL_HapticConstant
  *     \|  \|  \|  \|  \|  \|  \|
  * ```
  *
+ * \since This struct is available since SDL 3.0.0.
+ *
  * \sa SDL_HAPTIC_SINE
  * \sa SDL_HAPTIC_SQUARE
  * \sa SDL_HAPTIC_TRIANGLE
@@ -632,6 +684,8 @@ typedef struct SDL_HapticPeriodic
  * SDL_HapticDirection diagram for which side is positive and which is
  * negative.
  *
+ * \since This struct is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticDirection
  * \sa SDL_HAPTIC_SPRING
  * \sa SDL_HAPTIC_DAMPER
@@ -673,6 +727,8 @@ typedef struct SDL_HapticCondition
  * effects get added to the ramp effect making the effect become quadratic
  * instead of linear.
  *
+ * \since This struct is available since SDL 3.0.0.
+ *
  * \sa SDL_HAPTIC_RAMP
  * \sa SDL_HapticEffect
  */
@@ -710,6 +766,8 @@ typedef struct SDL_HapticRamp
  * motors, commonly found in modern game controllers. The small (right) motor
  * is high frequency, and the large (left) motor is low frequency.
  *
+ * \since This struct is available since SDL 3.0.0.
+ *
  * \sa SDL_HAPTIC_LEFTRIGHT
  * \sa SDL_HapticEffect
  */
@@ -738,6 +796,8 @@ typedef struct SDL_HapticLeftRight
  * If channels is one, the effect is rotated using the defined direction.
  * Otherwise it uses the samples in data for the different axes.
  *
+ * \since This struct is available since SDL 3.0.0.
+ *
  * \sa SDL_HAPTIC_CUSTOM
  * \sa SDL_HapticEffect
  */
@@ -831,6 +891,8 @@ typedef struct SDL_HapticCustom
  * Note either the attack_level or the fade_level may be above the actual
  * effect level.
  *
+ * \since This struct is available since SDL 3.0.0.
+ *
  * \sa SDL_HapticConstant
  * \sa SDL_HapticPeriodic
  * \sa SDL_HapticCondition
@@ -858,6 +920,8 @@ typedef union SDL_HapticEffect
  *
  * The ID value starts at 1 and increments from there. The value 0 is an
  * invalid ID.
+ *
+ * \since This datatype is available since SDL 3.0.0.
  */
 typedef Uint32 SDL_HapticID;
 
diff --git a/include/SDL3/SDL_hidapi.h b/include/SDL3/SDL_hidapi.h
index 00d018566568a..313327dd911de 100644
--- a/include/SDL3/SDL_hidapi.h
+++ b/include/SDL3/SDL_hidapi.h
@@ -73,12 +73,16 @@ extern "C" {
 
 /**
  * A handle representing an open HID device
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 struct SDL_hid_device;
 typedef struct SDL_hid_device SDL_hid_device; /**< opaque hidapi structure */
 
 /**
  * HID underlying bus types.
+ *
+ * \since This enum is available since SDL 3.0.0.
  */
 typedef enum SDL_hid_bus_type {
     /** Unknown bus type */
@@ -112,6 +116,8 @@ typedef enum SDL_hid_bus_type {
 
 /**
  * Information about a connected HID device
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_hid_device_info
 {
diff --git a/include/SDL3/SDL_hints.h b/include/SDL3/SDL_hints.h
index ce67e6957ca91..60ba7f3ca2656 100644
--- a/include/SDL3/SDL_hints.h
+++ b/include/SDL3/SDL_hints.h
@@ -3806,6 +3806,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool d
  * \param name what was passed as `name` to SDL_AddHintCallback()
  * \param oldValue the previous hint value
  * \param newValue the new value hint is to be set to
+ *
+ * \since This datatype is available since SDL 3.0.0.
  */
 typedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
 
diff --git a/include/SDL3/SDL_init.h b/include/SDL3/SDL_init.h
index b812fce17778d..00593334d0bb1 100644
--- a/include/SDL3/SDL_init.h
+++ b/include/SDL3/SDL_init.h
@@ -45,6 +45,8 @@ extern "C" {
  * These are the flags which may be passed to SDL_Init(). You should specify
  * the subsystems which you will be using in your application.
  *
+ * \since This enum is available since SDL 3.0.0.
+ *
  * \sa SDL_Init
  * \sa SDL_Quit
  * \sa SDL_InitSubSystem
diff --git a/include/SDL3/SDL_joystick.h b/include/SDL3/SDL_joystick.h
index 8aabe67c51688..2d898e5bcdb64 100644
--- a/include/SDL3/SDL_joystick.h
+++ b/include/SDL3/SDL_joystick.h
@@ -83,6 +83,8 @@ typedef SDL_GUID SDL_JoystickGUID;
  *
  * The ID value starts at 1 and increments from there. The value 0 is an
  * invalid ID.
+ *
+ * \since This datatype is available since SDL 3.0.0.
  */
 typedef Uint32 SDL_JoystickID;
 
@@ -363,6 +365,8 @@ extern DECLSPEC SDL_JoystickID SDLCALL SDL_AttachVirtualJoystick(SDL_JoystickTyp
  * SDL_AttachVirtualJoystickEx() All other elements of this structure are
  * optional and can be left 0.
  *
+ * \since This struct is available since SDL 3.0.0.
+ *
  * \sa SDL_AttachVirtualJoystickEx
  */
 typedef struct SDL_VirtualJoystickDesc
@@ -393,6 +397,8 @@ typedef struct SDL_VirtualJoystickDesc
 
 /**
  * The current version of the SDL_VirtualJoystickDesc structure.
+ *
+ * \since This macro is available since SDL 3.0.0.
  */
 #define SDL_VIRTUAL_JOYSTICK_DESC_VERSION   1
 
diff --git a/include/SDL3/SDL_keyboard.h b/include/SDL3/SDL_keyboard.h
index fc70b229b6dff..ec0affc4655f8 100644
--- a/include/SDL3/SDL_keyboard.h
+++ b/include/SDL3/SDL_keyboard.h
@@ -46,6 +46,8 @@ typedef Uint32 SDL_KeyboardID;
  *
  * If you are looking for translated character input, see the
  * ::SDL_EVENT_TEXT_INPUT event.
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_Keysym
 {
diff --git a/include/SDL3/SDL_log.h b/include/SDL3/SDL_log.h
index be611e3f31b8e..3ded311ffb749 100644
--- a/include/SDL3/SDL_log.h
+++ b/include/SDL3/SDL_log.h
@@ -50,6 +50,8 @@ extern "C" {
  * The maximum size of a log message prior to SDL 2.0.24.
  *
  * As of 2.0.24 there is no limit to the length of SDL log messages.
+ *
+ * \since This macro is available since SDL 3.0.0.
  */
 #define SDL_MAX_LOG_MESSAGE 4096
 
@@ -59,6 +61,8 @@ extern "C" {
  * By default the application category is enabled at the INFO level, the
  * assert category is enabled at the WARN level, test is enabled at the
  * VERBOSE level and all other categories are enabled at the ERROR level.
+ *
+ * \since This enum is available since SDL 3.0.0.
  */
 typedef enum SDL_LogCategory
 {
@@ -97,6 +101,8 @@ typedef enum SDL_LogCategory
 
 /**
  * The predefined log priorities
+ *
+ * \since This enum is available since SDL 3.0.0.
  */
 typedef enum SDL_LogPriority
 {
@@ -363,6 +369,8 @@ extern DECLSPEC void SDLCALL SDL_LogMessageV(int category,
  * \param category the category of the message
  * \param priority the priority of the message
  * \param message the message being output
+ *
+ * \since This datatype is available since SDL 3.0.0.
  */
 typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
 
diff --git a/include/SDL3/SDL_main.h b/include/SDL3/SDL_main.h
index e893fe1d607d1..eed24f8693627 100644
--- a/include/SDL3/SDL_main.h
+++ b/include/SDL3/SDL_main.h
@@ -367,6 +367,8 @@ extern SDLMAIN_DECLSPEC void SDLCALL SDL_AppQuit(void *appstate);
 
 /**
  * The prototype for the application's main() function
+ *
+ * \since This datatype is available since SDL 3.0.0.
  */
 typedef int (SDLCALL *SDL_main_func)(int argc, char *argv[]);
 extern SDLMAIN_DECLSPEC int SDLCALL SDL_main(int argc, char *argv[]);
diff --git a/include/SDL3/SDL_messagebox.h b/include/SDL3/SDL_messagebox.h
index 2e97dba28d3bd..f30b22623c3d5 100644
--- a/include/SDL3/SDL_messagebox.h
+++ b/include/SDL3/SDL_messagebox.h
@@ -36,6 +36,8 @@ extern "C" {
  * SDL_MessageBox flags.
  *
  * If supported will display warning icon, etc.
+ *
+ * \since This enum is available since SDL 3.0.0.
  */
 typedef enum SDL_MessageBoxFlags
 {
@@ -48,6 +50,8 @@ typedef enum SDL_MessageBoxFlags
 
 /**
  * Flags for SDL_MessageBoxButtonData.
+ *
+ * \since This enum is available since SDL 3.0.0.
  */
 typedef enum SDL_MessageBoxButtonFlags
 {
@@ -57,6 +61,8 @@ typedef enum SDL_MessageBoxButtonFlags
 
 /**
  * Individual button data.
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_MessageBoxButtonData
 {
@@ -67,6 +73,8 @@ typedef struct SDL_MessageBoxButtonData
 
 /**
  * RGB value used in a message box color scheme
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_MessageBoxColor
 {
@@ -85,6 +93,8 @@ typedef enum SDL_MessageBoxColorType
 
 /**
  * A set of colors to use for message box dialogs
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_MessageBoxColorScheme
 {
@@ -93,6 +103,8 @@ typedef struct SDL_MessageBoxColorScheme
 
 /**
  * MessageBox structure containing title, text, window, etc.
+ *
+ * \since This struct is available since SDL 3.0.0.
  */
 typedef struct SDL_MessageBoxData
 {
diff --git a/include/SDL3/SDL_metal.h b/include/SDL3/SDL_metal.h
index 18e2bba2c450c..8dd2ce16cba49 100644
--- a/include/SDL3/SDL_metal.h
+++ b/include/SDL3/SDL_metal.h
@@ -38,6 +38,8 @@ extern "C" {
 
 /**
  * A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS).
+ *
+ * \since This datatype is available since SDL 3.0.0.
  */
 typedef void *SDL_MetalView;
 
diff --git a/include/SDL3/SDL_mouse.h b/include/SDL3/SDL_mouse.h
index 0451b131df0ff..c3a2e071ffb48 100644
--- a/include/SDL3/SDL_mouse.h
+++ b/include/SDL3/SDL_mouse.h
@@ -44,6 +44,8 @@ typedef struct SDL_Cursor SDL_Cursor;   /**< Implementation dependent */
 
 /**
  * Cursor types for SDL_CreateSystemCursor().
+ *
+ * \since This enum is available since SDL 3.0.0.
  */
 typedef enum SDL_SystemCursor
 {
@@ -72,6 +74,8 @@ typedef enum SDL_SystemCursor
 
 /**
  * Scroll direction types for the S

(Patch may be truncated, please check the link at the top of this post.)