From 4f6e81cf622323ca9a5abb90c7b324286fa6a365 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Sun, 8 Sep 2024 00:17:34 -0400
Subject: [PATCH] include: Fixed up some minor documentation gaps.
---
include/SDL3/SDL_haptic.h | 11 +++++------
include/SDL3/SDL_pen.h | 1 -
include/SDL3/SDL_pixels.h | 30 +++++++++++++++++++++++++-----
include/SDL3/SDL_sensor.h | 13 ++++---------
include/SDL3/SDL_video.h | 4 ++--
5 files changed, 36 insertions(+), 23 deletions(-)
diff --git a/include/SDL3/SDL_haptic.h b/include/SDL3/SDL_haptic.h
index 95446fe2b70e2..dfd2a699a0086 100644
--- a/include/SDL3/SDL_haptic.h
+++ b/include/SDL3/SDL_haptic.h
@@ -139,15 +139,14 @@ extern "C" {
*/
/**
- * \typedef SDL_Haptic
+ * The haptic structure used to identify an SDL haptic.
*
- * The haptic structure used to identify an SDL haptic.
+ * \sa SDL_OpenHaptic
+ * \sa SDL_OpenHapticFromJoystick
+ * \sa SDL_CloseHaptic
*
- * \sa SDL_OpenHaptic
- * \sa SDL_OpenHapticFromJoystick
- * \sa SDL_CloseHaptic
+ * \since This struct is available since SDL 3.0.0.
*/
-struct SDL_Haptic;
typedef struct SDL_Haptic SDL_Haptic;
diff --git a/include/SDL3/SDL_pen.h b/include/SDL3/SDL_pen.h
index 6c495c34d8ba9..2babed902a299 100644
--- a/include/SDL3/SDL_pen.h
+++ b/include/SDL3/SDL_pen.h
@@ -112,4 +112,3 @@ typedef enum SDL_PenAxis
#endif /* SDL_pen_h_ */
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL3/SDL_pixels.h b/include/SDL3/SDL_pixels.h
index 22813ff5af525..95b432283ef95 100644
--- a/include/SDL3/SDL_pixels.h
+++ b/include/SDL3/SDL_pixels.h
@@ -74,7 +74,11 @@ extern "C" {
*/
#define SDL_ALPHA_TRANSPARENT_FLOAT 0.0f
-/** Pixel type. */
+/**
+ * Pixel type.
+ *
+ * \since This enum is available since SDL 3.0.0.
+ */
typedef enum SDL_PixelType
{
SDL_PIXELTYPE_UNKNOWN,
@@ -93,7 +97,11 @@ typedef enum SDL_PixelType
SDL_PIXELTYPE_INDEX2
} SDL_PixelType;
-/** Bitmap pixel order, high bit -> low bit. */
+/**
+ * Bitmap pixel order, high bit -> low bit.
+ *
+ * \since This enum is available since SDL 3.0.0.
+ */
typedef enum SDL_BitmapOrder
{
SDL_BITMAPORDER_NONE,
@@ -101,7 +109,11 @@ typedef enum SDL_BitmapOrder
SDL_BITMAPORDER_1234
} SDL_BitmapOrder;
-/** Packed component order, high bit -> low bit. */
+/**
+ * Packed component order, high bit -> low bit.
+ *
+ * \since This enum is available since SDL 3.0.0.
+ */
typedef enum SDL_PackedOrder
{
SDL_PACKEDORDER_NONE,
@@ -115,7 +127,11 @@ typedef enum SDL_PackedOrder
SDL_PACKEDORDER_BGRA
} SDL_PackedOrder;
-/** Array component order, low byte -> high byte. */
+/**
+ * Array component order, low byte -> high byte.
+ *
+ * \since This enum is available since SDL 3.0.0.
+ */
typedef enum SDL_ArrayOrder
{
SDL_ARRAYORDER_NONE,
@@ -127,7 +143,11 @@ typedef enum SDL_ArrayOrder
SDL_ARRAYORDER_ABGR
} SDL_ArrayOrder;
-/** Packed component layout. */
+/**
+ * Packed component layout.
+ *
+ * \since This enum is available since SDL 3.0.0.
+ */
typedef enum SDL_PackedLayout
{
SDL_PACKEDLAYOUT_NONE,
diff --git a/include/SDL3/SDL_sensor.h b/include/SDL3/SDL_sensor.h
index 3ae48566f02cd..1500f23e29212 100644
--- a/include/SDL3/SDL_sensor.h
+++ b/include/SDL3/SDL_sensor.h
@@ -23,6 +23,10 @@
* # CategorySensor
*
* SDL sensor management.
+ *
+ * In order to use these functions, SDL_Init() must have been called
+ * with the SDL_INIT_SENSOR flag. This causes SDL to scan the system
+ * for sensors, and load appropriate drivers.
*/
#ifndef SDL_sensor_h_
@@ -40,15 +44,6 @@ extern "C" {
/* *INDENT-ON* */
#endif
-/**
- * SDL_sensor.h
- *
- * In order to use these functions, SDL_Init() must have been called
- * with the SDL_INIT_SENSOR flag. This causes SDL to scan the system
- * for sensors, and load appropriate drivers.
- */
-
-struct SDL_Sensor;
typedef struct SDL_Sensor SDL_Sensor;
/**
diff --git a/include/SDL3/SDL_video.h b/include/SDL3/SDL_video.h
index 27f9fddabab0c..33d784af9e75f 100644
--- a/include/SDL3/SDL_video.h
+++ b/include/SDL3/SDL_video.h
@@ -2217,7 +2217,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowOpacity(SDL_Window *window, fl
*/
extern SDL_DECLSPEC float SDLCALL SDL_GetWindowOpacity(SDL_Window *window);
- /**
+/**
* Set the window as a child of a parent window.
*
* If the window is already the child of an existing window, it will be reparented
@@ -2240,7 +2240,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetWindowOpacity(SDL_Window *window);
*
* \sa SDL_SetWindowModal
*/
- extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowParent(SDL_Window *window, SDL_Window *parent);
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowParent(SDL_Window *window, SDL_Window *parent);
/**
* Toggle the state of the window as modal.