From ea0c2f55bedea0a940cb35a0b5842c76c30815ca Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 28 Dec 2022 19:34:01 -0800
Subject: [PATCH] SDL API renaming: *Is* functions
Feedback from @icculus:
"IsTablet" uses "is" as a form of "to be" ...like, the actual question is of its nature.
The rest is just a superfluous word in the question and it flows as better English with if (RectEmpty) than if (IsRectEmpty)
Fixes https://github.com/libsdl-org/SDL/issues/6932
---
docs/README-ios.md | 2 +-
docs/README-migration.md | 20 +++----
include/SDL3/SDL_gamepad.h | 4 +-
include/SDL3/SDL_joystick.h | 2 +-
include/SDL3/SDL_keyboard.h | 8 +--
include/SDL3/SDL_oldnames.h | 40 ++++++-------
include/SDL3/SDL_rect.h | 32 +++++------
include/SDL3/SDL_render.h | 8 +--
include/SDL3/SDL_video.h | 6 +-
src/dynapi/SDL_dynapi.sym | 18 +++---
src/dynapi/SDL_dynapi_overrides.h | 18 +++---
src/dynapi/SDL_dynapi_procs.h | 18 +++---
src/joystick/SDL_gamepad.c | 6 +-
src/joystick/SDL_joystick.c | 2 +-
src/render/SDL_render.c | 6 +-
src/test/SDL_test_common.c | 4 +-
src/video/SDL_blit.c | 2 +-
src/video/SDL_fillrect.c | 2 +-
src/video/SDL_rect.c | 4 +-
src/video/SDL_video.c | 10 ++--
src/video/android/SDL_androidevents.c | 4 +-
src/video/cocoa/SDL_cocoamouse.m | 2 +-
src/video/cocoa/SDL_cocoawindow.m | 4 +-
src/video/wayland/SDL_waylandevents.c | 4 +-
src/video/wayland/SDL_waylandkeyboard.c | 4 +-
src/video/wayland/SDL_waylandwindow.c | 4 +-
src/video/x11/SDL_x11xfixes.c | 2 +-
test/checkkeys.c | 4 +-
test/checkkeysthreads.c | 2 +-
test/testautomation_rect.c | 76 ++++++++++++-------------
test/testautomation_video.c | 28 ++++-----
test/testgamepad.c | 4 +-
test/testhittesting.c | 2 +-
test/testwm2.c | 2 +-
34 files changed, 174 insertions(+), 180 deletions(-)
diff --git a/docs/README-ios.md b/docs/README-ios.md
index 99e956af711c..25745f6ff89d 100644
--- a/docs/README-ios.md
+++ b/docs/README-ios.md
@@ -160,7 +160,7 @@ void SDL_StartTextInput()
void SDL_StopTextInput()
-- disables text events and hides the onscreen keyboard.
-SDL_bool SDL_IsTextInputActive()
+SDL_bool SDL_TextInputActive()
-- returns whether or not text events are enabled (and the onscreen keyboard is visible)
diff --git a/docs/README-migration.md b/docs/README-migration.md
index d42785155c96..578e6b366c15 100644
--- a/docs/README-migration.md
+++ b/docs/README-migration.md
@@ -140,7 +140,7 @@ The following functions have been renamed:
* SDL_GameControllerFromPlayerIndex => SDL_GetGamepadFromPlayerIndex
* SDL_GameControllerGetAppleSFSymbolsNameForAxis => SDL_GetGamepadAppleSFSymbolsNameForAxis
* SDL_GameControllerGetAppleSFSymbolsNameForButton => SDL_GetGamepadAppleSFSymbolsNameForButton
-* SDL_GameControllerGetAttached => SDL_IsGamepadConnected
+* SDL_GameControllerGetAttached => SDL_GamepadConnected
* SDL_GameControllerGetAxis => SDL_GetGamepadAxis
* SDL_GameControllerGetAxisFromString => SDL_GetGamepadAxisFromString
* SDL_GameControllerGetBindForAxis => SDL_GetGamepadBindForAxis
@@ -168,7 +168,7 @@ The following functions have been renamed:
* SDL_GameControllerHasRumble => SDL_GamepadHasRumble
* SDL_GameControllerHasRumbleTriggers => SDL_GamepadHasRumbleTriggers
* SDL_GameControllerHasSensor => SDL_GamepadHasSensor
-* SDL_GameControllerIsSensorEnabled => SDL_IsGamepadSensorEnabled
+* SDL_GameControllerIsSensorEnabled => SDL_GamepadSensorEnabled
* SDL_GameControllerMapping => SDL_GetGamepadMapping
* SDL_GameControllerMappingForGUID => SDL_GetGamepadMappingForGUID
* SDL_GameControllerMappingForIndex => SDL_GetGamepadMappingForIndex
@@ -307,7 +307,7 @@ The following functions have been renamed:
* SDL_JoystickDetachVirtual => SDL_DetachVirtualJoystick
* SDL_JoystickFromInstanceID => SDL_GetJoystickFromInstanceID
* SDL_JoystickFromPlayerIndex => SDL_GetJoystickFromPlayerIndex
-* SDL_JoystickGetAttached => SDL_IsJoystickConnected
+* SDL_JoystickGetAttached => SDL_JoystickConnected
* SDL_JoystickGetAxis => SDL_GetJoystickAxis
* SDL_JoystickGetAxisInitialState => SDL_GetJoystickAxisInitialState
* SDL_JoystickGetButton => SDL_GetJoystickButton
@@ -432,18 +432,17 @@ The preprocessor symbol __MACOSX__ has been renamed __MACOS__, and __IPHONEOS__
The following functions have been renamed:
* SDL_EncloseFPoints => SDL_GetRectEnclosingPointsF
* SDL_EnclosePoints => SDL_GetRectEnclosingPoints
-* SDL_FRectEmpty => SDL_IsRectEmptyF
-* SDL_FRectEqualsEpsilon => SDL_AreRectsEqualF
+* SDL_FRectEmpty => SDL_RectEmptyF
+* SDL_FRectEquals => SDL_RectsEqualF
+* SDL_FRectEqualsEpsilon => SDL_RectsEqualEpsilon
* SDL_HasIntersection => SDL_HasRectIntersection
* SDL_HasIntersectionF => SDL_HasRectIntersectionF
* SDL_IntersectFRect => SDL_GetRectIntersectionF
* SDL_IntersectFRectAndLine => SDL_GetRectAndLineIntersectionF
* SDL_IntersectRect => SDL_GetRectIntersection
* SDL_IntersectRectAndLine => SDL_GetRectAndLineIntersection
-* SDL_PointInFRect => SDL_IsPointInRectF
-* SDL_PointInRect => SDL_IsPointInRect
-* SDL_RectEmpty => SDL_IsRectEmpty
-* SDL_RectEquals => SDL_AreRectsEqual
+* SDL_PointInFRect => SDL_PointInRectF
+* SDL_RectEquals => SDL_RectsEqual
* SDL_UnionFRect => SDL_GetRectUnionF
* SDL_UnionRect => SDL_GetRectUnion
@@ -486,14 +485,13 @@ The following functions have been renamed:
* SDL_RenderGetScale => SDL_GetRenderScale
* SDL_RenderGetViewport => SDL_GetRenderViewport
* SDL_RenderGetWindow => SDL_GetRenderWindow
-* SDL_RenderIsClipEnabled => SDL_IsRenderClipEnabled
+* SDL_RenderIsClipEnabled => SDL_RenderClipEnabled
* SDL_RenderSetClipRect => SDL_SetRenderClipRect
* SDL_RenderSetIntegerScale => SDL_SetRenderIntegerScale
* SDL_RenderSetLogicalSize => SDL_SetRenderLogicalSize
* SDL_RenderSetScale => SDL_SetRenderScale
* SDL_RenderSetVSync => SDL_SetRenderVSync
* SDL_RenderSetViewport => SDL_SetRenderViewport
-* SDL_RenderTargetSupported => SDL_IsRenderTargetSupported
## SDL_rwops.h
diff --git a/include/SDL3/SDL_gamepad.h b/include/SDL3/SDL_gamepad.h
index a1dcf89366a1..f88e640c3227 100644
--- a/include/SDL3/SDL_gamepad.h
+++ b/include/SDL3/SDL_gamepad.h
@@ -625,7 +625,7 @@ extern DECLSPEC const char * SDLCALL SDL_GetGamepadSerial(SDL_Gamepad *gamepad);
* \sa SDL_CloseGamepad
* \sa SDL_OpenGamepad
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_IsGamepadConnected(SDL_Gamepad *gamepad);
+extern DECLSPEC SDL_bool SDLCALL SDL_GamepadConnected(SDL_Gamepad *gamepad);
/**
* Get the underlying joystick from a gamepad
@@ -905,7 +905,7 @@ extern DECLSPEC int SDLCALL SDL_SetGamepadSensorEnabled(SDL_Gamepad *gamepad, SD
*
* \since This function is available since SDL 3.0.0.
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_IsGamepadSensorEnabled(SDL_Gamepad *gamepad, SDL_SensorType type);
+extern DECLSPEC SDL_bool SDLCALL SDL_GamepadSensorEnabled(SDL_Gamepad *gamepad, SDL_SensorType type);
/**
* Get the data rate (number of events per second) of a gamepad
diff --git a/include/SDL3/SDL_joystick.h b/include/SDL3/SDL_joystick.h
index 5e2742e92729..b6de79227861 100644
--- a/include/SDL3/SDL_joystick.h
+++ b/include/SDL3/SDL_joystick.h
@@ -657,7 +657,7 @@ extern DECLSPEC void SDLCALL SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint
* \sa SDL_CloseJoystick
* \sa SDL_OpenJoystick
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_IsJoystickConnected(SDL_Joystick *joystick);
+extern DECLSPEC SDL_bool SDLCALL SDL_JoystickConnected(SDL_Joystick *joystick);
/**
* Get the instance ID of an opened joystick.
diff --git a/include/SDL3/SDL_keyboard.h b/include/SDL3/SDL_keyboard.h
index e35b97df44f5..fa5a11b5d459 100644
--- a/include/SDL3/SDL_keyboard.h
+++ b/include/SDL3/SDL_keyboard.h
@@ -269,7 +269,7 @@ extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
*
* \sa SDL_StartTextInput
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);
+extern DECLSPEC SDL_bool SDLCALL SDL_TextInputActive(void);
/**
* Stop receiving any text input events.
@@ -295,7 +295,7 @@ extern DECLSPEC void SDLCALL SDL_ClearComposition(void);
*
* \since This function is available since SDL 3.0.0.
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputShown(void);
+extern DECLSPEC SDL_bool SDLCALL SDL_TextInputShown(void);
/**
* Set the rectangle used to type Unicode text inputs.
@@ -326,7 +326,7 @@ extern DECLSPEC void SDLCALL SDL_SetTextInputRect(const SDL_Rect *rect);
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_StartTextInput
- * \sa SDL_IsScreenKeyboardShown
+ * \sa SDL_ScreenKeyboardShown
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void);
@@ -340,7 +340,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void);
*
* \sa SDL_HasScreenKeyboardSupport
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);
+extern DECLSPEC SDL_bool SDLCALL SDL_ScreenKeyboardShown(SDL_Window *window);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
diff --git a/include/SDL3/SDL_oldnames.h b/include/SDL3/SDL_oldnames.h
index 269e27e7f2d3..f42a43ef24d2 100644
--- a/include/SDL3/SDL_oldnames.h
+++ b/include/SDL3/SDL_oldnames.h
@@ -129,7 +129,7 @@
#define SDL_GameControllerFromPlayerIndex SDL_GetGamepadFromPlayerIndex
#define SDL_GameControllerGetAppleSFSymbolsNameForAxis SDL_GetGamepadAppleSFSymbolsNameForAxis
#define SDL_GameControllerGetAppleSFSymbolsNameForButton SDL_GetGamepadAppleSFSymbolsNameForButton
-#define SDL_GameControllerGetAttached SDL_IsGamepadConnected
+#define SDL_GameControllerGetAttached SDL_GamepadConnected
#define SDL_GameControllerGetAxis SDL_GetGamepadAxis
#define SDL_GameControllerGetAxisFromString SDL_GetGamepadAxisFromString
#define SDL_GameControllerGetBindForAxis SDL_GetGamepadBindForAxis
@@ -157,7 +157,7 @@
#define SDL_GameControllerHasRumble SDL_GamepadHasRumble
#define SDL_GameControllerHasRumbleTriggers SDL_GamepadHasRumbleTriggers
#define SDL_GameControllerHasSensor SDL_GamepadHasSensor
-#define SDL_GameControllerIsSensorEnabled SDL_IsGamepadSensorEnabled
+#define SDL_GameControllerIsSensorEnabled SDL_GamepadSensorEnabled
#define SDL_GameControllerMapping SDL_GetGamepadMapping
#define SDL_GameControllerMappingForGUID SDL_GetGamepadMappingForGUID
#define SDL_GameControllerMappingForIndex SDL_GetGamepadMappingForIndex
@@ -185,7 +185,7 @@
#define SDL_JoystickDetachVirtual SDL_DetachVirtualJoystick
#define SDL_JoystickFromInstanceID SDL_GetJoystickFromInstanceID
#define SDL_JoystickFromPlayerIndex SDL_GetJoystickFromPlayerIndex
-#define SDL_JoystickGetAttached SDL_IsJoystickConnected
+#define SDL_JoystickGetAttached SDL_JoystickConnected
#define SDL_JoystickGetAxis SDL_GetJoystickAxis
#define SDL_JoystickGetAxisInitialState SDL_GetJoystickAxisInitialState
#define SDL_JoystickGetButton SDL_GetJoystickButton
@@ -258,18 +258,17 @@
/* ##SDL_rect.h */
#define SDL_EncloseFPoints SDL_GetRectEnclosingPointsF
#define SDL_EnclosePoints SDL_GetRectEnclosingPoints
-#define SDL_FRectEmpty SDL_IsRectEmptyF
-#define SDL_FRectEqualsEpsilon SDL_AreRectsEqualF
+#define SDL_FRectEmpty SDL_RectEmptyF
+#define SDL_FRectEquals SDL_RectsEqualF
+#define SDL_FRectEqualsEpsilon SDL_RectsEqualEpsilon
#define SDL_HasIntersection SDL_HasRectIntersection
#define SDL_HasIntersectionF SDL_HasRectIntersectionF
#define SDL_IntersectFRect SDL_GetRectIntersectionF
#define SDL_IntersectFRectAndLine SDL_GetRectAndLineIntersectionF
#define SDL_IntersectRect SDL_GetRectIntersection
#define SDL_IntersectRectAndLine SDL_GetRectAndLineIntersection
-#define SDL_PointInFRect SDL_IsPointInRectF
-#define SDL_PointInRect SDL_IsPointInRect
-#define SDL_RectEmpty SDL_IsRectEmpty
-#define SDL_RectEquals SDL_AreRectsEqual
+#define SDL_PointInFRect SDL_PointInRectF
+#define SDL_RectEquals SDL_RectsEqual
#define SDL_UnionFRect SDL_GetRectUnionF
#define SDL_UnionRect SDL_GetRectUnion
@@ -298,14 +297,13 @@
#define SDL_RenderGetScale SDL_GetRenderScale
#define SDL_RenderGetViewport SDL_GetRenderViewport
#define SDL_RenderGetWindow SDL_GetRenderWindow
-#define SDL_RenderIsClipEnabled SDL_IsRenderClipEnabled
+#define SDL_RenderIsClipEnabled SDL_RenderClipEnabled
#define SDL_RenderSetClipRect SDL_SetRenderClipRect
#define SDL_RenderSetIntegerScale SDL_SetRenderIntegerScale
#define SDL_RenderSetLogicalSize SDL_SetRenderLogicalSize
#define SDL_RenderSetScale SDL_SetRenderScale
#define SDL_RenderSetVSync SDL_SetRenderVSync
#define SDL_RenderSetViewport SDL_SetRenderViewport
-#define SDL_RenderTargetSupported SDL_IsRenderTargetSupported
/* ##SDL_rwops.h */
#define RW_SEEK_CUR SDL_RW_SEEK_CUR
@@ -439,7 +437,7 @@
#define SDL_GameControllerFromPlayerIndex SDL_GameControllerFromPlayerIndex_renamed_SDL_GetGamepadFromPlayerIndex
#define SDL_GameControllerGetAppleSFSymbolsNameForAxis SDL_GameControllerGetAppleSFSymbolsNameForAxis_renamed_SDL_GetGamepadAppleSFSymbolsNameForAxis
#define SDL_GameControllerGetAppleSFSymbolsNameForButton SDL_GameControllerGetAppleSFSymbolsNameForButton_renamed_SDL_GetGamepadAppleSFSymbolsNameForButton
-#define SDL_GameControllerGetAttached SDL_GameControllerGetAttached_renamed_SDL_IsGamepadConnected
+#define SDL_GameControllerGetAttached SDL_GameControllerGetAttached_renamed_SDL_GamepadConnected
#define SDL_GameControllerGetAxis SDL_GameControllerGetAxis_renamed_SDL_GetGamepadAxis
#define SDL_GameControllerGetAxisFromString SDL_GameControllerGetAxisFromString_renamed_SDL_GetGamepadAxisFromString
#define SDL_GameControllerGetBindForAxis SDL_GameControllerGetBindForAxis_renamed_SDL_GetGamepadBindForAxis
@@ -467,7 +465,7 @@
#define SDL_GameControllerHasRumble SDL_GameControllerHasRumble_renamed_SDL_GamepadHasRumble
#define SDL_GameControllerHasRumbleTriggers SDL_GameControllerHasRumbleTriggers_renamed_SDL_GamepadHasRumbleTriggers
#define SDL_GameControllerHasSensor SDL_GameControllerHasSensor_renamed_SDL_GamepadHasSensor
-#define SDL_GameControllerIsSensorEnabled SDL_GameControllerIsSensorEnabled_renamed_SDL_IsGamepadSensorEnabled
+#define SDL_GameControllerIsSensorEnabled SDL_GameControllerIsSensorEnabled_renamed_SDL_GamepadSensorEnabled
#define SDL_GameControllerMapping SDL_GameControllerMapping_renamed_SDL_GetGamepadMapping
#define SDL_GameControllerMappingForDeviceIndex SDL_GameControllerMappingForDeviceIndex_renamed_SDL_GetGamepadMappingForDeviceIndex
#define SDL_GameControllerMappingForGUID SDL_GameControllerMappingForGUID_renamed_SDL_GetGamepadMappingForGUID
@@ -499,7 +497,7 @@
#define SDL_JoystickDetachVirtual SDL_JoystickDetachVirtual_renamed_SDL_DetachVirtualJoystick
#define SDL_JoystickFromInstanceID SDL_JoystickFromInstanceID_renamed_SDL_GetJoystickFromInstanceID
#define SDL_JoystickFromPlayerIndex SDL_JoystickFromPlayerIndex_renamed_SDL_GetJoystickFromPlayerIndex
-#define SDL_JoystickGetAttached SDL_JoystickGetAttached_renamed_SDL_IsJoystickConnected
+#define SDL_JoystickGetAttached SDL_JoystickGetAttached_renamed_SDL_JoystickConnected
#define SDL_JoystickGetAxis SDL_JoystickGetAxis_renamed_SDL_GetJoystickAxis
#define SDL_JoystickGetAxisInitialState SDL_JoystickGetAxisInitialState_renamed_SDL_GetJoystickAxisInitialState
#define SDL_JoystickGetButton SDL_JoystickGetButton_renamed_SDL_GetJoystickButton
@@ -580,18 +578,17 @@
/* ##SDL_rect.h */
#define SDL_EncloseFPoints SDL_EncloseFPoints_renamed_SDL_GetRectEnclosingPointsF
#define SDL_EnclosePoints SDL_EnclosePoints_renamed_SDL_GetRectEnclosingPoints
-#define SDL_FRectEmpty SDL_FRectEmpty_renamed_SDL_IsRectEmptyF
-#define SDL_FRectEqualsEpsilon SDL_FRectEqualsEpsilon_renamed_SDL_AreRectsEqualF
+#define SDL_FRectEmpty SDL_FRectEmpty_renamed_SDL_RectEmptyF
+#define SDL_FRectEquals SDL_FRectEquals_renamed_SDL_RectsEqualF
+#define SDL_FRectEqualsEpsilon SDL_FRectEqualsEpsilon_renamed_SDL_RectsEqualEpsilon
#define SDL_HasIntersection SDL_HasIntersection_renamed_SDL_HasRectIntersection
#define SDL_HasIntersectionF SDL_HasIntersectionF_renamed_SDL_HasRectIntersectionF
#define SDL_IntersectFRect SDL_IntersectFRect_renamed_SDL_GetRectIntersectionF
#define SDL_IntersectFRectAndLine SDL_IntersectFRectAndLine_renamed_SDL_GetRectAndLineIntersectionF
#define SDL_IntersectRect SDL_IntersectRect_renamed_SDL_GetRectIntersection
#define SDL_IntersectRectAndLine SDL_IntersectRectAndLine_renamed_SDL_GetRectAndLineIntersection
-#define SDL_PointInFRect SDL_PointInFRect_renamed_SDL_IsPointInRectF
-#define SDL_PointInRect SDL_PointInRect_renamed_SDL_IsPointInRect
-#define SDL_RectEmpty SDL_RectEmpty_renamed_SDL_IsRectEmpty
-#define SDL_RectEquals SDL_RectEquals_renamed_SDL_AreRectsEqual
+#define SDL_PointInFRect SDL_PointInFRect_renamed_SDL_PointInRectF
+#define SDL_RectEquals SDL_RectEquals_renamed_SDL_RectsEqual
#define SDL_UnionFRect SDL_UnionFRect_renamed_SDL_GetRectUnionF
#define SDL_UnionRect SDL_UnionRect_renamed_SDL_GetRectUnion
@@ -620,14 +617,13 @@
#define SDL_RenderGetScale SDL_RenderGetScale_renamed_SDL_GetRenderScale
#define SDL_RenderGetViewport SDL_RenderGetViewport_renamed_SDL_GetRenderViewport
#define SDL_RenderGetWindow SDL_RenderGetWindow_renamed_SDL_GetRenderWindow
-#define SDL_RenderIsClipEnabled SDL_RenderIsClipEnabled_renamed_SDL_IsRenderClipEnabled
+#define SDL_RenderIsClipEnabled SDL_RenderIsClipEnabled_renamed_SDL_RenderClipEnabled
#define SDL_RenderSetClipRect SDL_RenderSetClipRect_renamed_SDL_SetRenderClipRect
#define SDL_RenderSetIntegerScale SDL_RenderSetIntegerScale_renamed_SDL_SetRenderIntegerScale
#define SDL_RenderSetLogicalSize SDL_RenderSetLogicalSize_renamed_SDL_SetRenderLogicalSize
#define SDL_RenderSetScale SDL_RenderSetScale_renamed_SDL_SetRenderScale
#define SDL_RenderSetVSync SDL_RenderSetVSync_renamed_SDL_SetRenderVSync
#define SDL_RenderSetViewport SDL_RenderSetViewport_renamed_SDL_SetRenderViewport
-#define SDL_RenderTargetSupported SDL_RenderTargetSupported_renamed_SDL_IsRenderTargetSupported
/* ##SDL_rwops.h */
#define RW_SEEK_CUR RW_SEEK_CUR_renamed_SDL_RW_SEEK_CUR
diff --git a/include/SDL3/SDL_rect.h b/include/SDL3/SDL_rect.h
index b66b5dc9ee03..87e51480fb4f 100644
--- a/include/SDL3/SDL_rect.h
+++ b/include/SDL3/SDL_rect.h
@@ -43,7 +43,7 @@ extern "C" {
* The structure that defines a point (integer)
*
* \sa SDL_GetRectEnclosingPoints
- * \sa SDL_IsPointInRect
+ * \sa SDL_PointInRect
*/
typedef struct SDL_Point
{
@@ -55,7 +55,7 @@ typedef struct SDL_Point
* The structure that defines a point (floating point)
*
* \sa SDL_GetRectEnclosingPointsF
- * \sa SDL_IsPointInRectF
+ * \sa SDL_PointInRectF
*/
typedef struct SDL_FPoint
{
@@ -67,8 +67,8 @@ typedef struct SDL_FPoint
/**
* A rectangle, with the origin at the upper left (integer).
*
- * \sa SDL_IsRectEmpty
- * \sa SDL_AreRectsEqual
+ * \sa SDL_RectEmpty
+ * \sa SDL_RectsEqual
* \sa SDL_HasRectIntersection
* \sa SDL_GetRectIntersection
* \sa SDL_GetRectAndLineIntersection
@@ -85,15 +85,15 @@ typedef struct SDL_Rect
/**
* A rectangle, with the origin at the upper left (floating point).
*
- * \sa SDL_IsRectEmptyF
- * \sa SDL_FRectEquals
- * \sa SDL_AreRectsEqualF
+ * \sa SDL_RectEmptyF
+ * \sa SDL_RectsEqualF
+ * \sa SDL_RectsEqualEpsilon
* \sa SDL_HasRectIntersectionF
* \sa SDL_GetRectIntersectionF
* \sa SDL_GetRectAndLineIntersectionF
* \sa SDL_GetRectUnionF
* \sa SDL_GetRectEnclosingPointsF
- * \sa SDL_IsPointInRectF
+ * \sa SDL_PointInRectF
*/
typedef struct SDL_FRect
{
@@ -107,7 +107,7 @@ typedef struct SDL_FRect
/**
* Returns true if point resides inside a rectangle.
*/
-SDL_FORCE_INLINE SDL_bool SDL_IsPointInRect(const SDL_Point *p, const SDL_Rect *r)
+SDL_FORCE_INLINE SDL_bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r)
{
return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&
(p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;
@@ -116,7 +116,7 @@ SDL_FORCE_INLINE SDL_bool SDL_IsPointInRect(const SDL_Point *p, const SDL_Rect *
/**
* Returns true if the rectangle has no area.
*/
-SDL_FORCE_INLINE SDL_bool SDL_IsRectEmpty(const SDL_Rect *r)
+SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)
{
return ((!r) || (r->w <= 0) || (r->h <= 0)) ? SDL_TRUE : SDL_FALSE;
}
@@ -124,7 +124,7 @@ SDL_FORCE_INLINE SDL_bool SDL_IsRectEmpty(const SDL_Rect *r)
/**
* Returns true if the two rectangles are equal.
*/
-SDL_FORCE_INLINE SDL_bool SDL_AreRectsEqual(const SDL_Rect *a, const SDL_Rect *b)
+SDL_FORCE_INLINE SDL_bool SDL_RectsEqual(const SDL_Rect *a, const SDL_Rect *b)
{
return (a && b && (a->x == b->x) && (a->y == b->y) &&
(a->w == b->w) && (a->h == b->h)) ? SDL_TRUE : SDL_FALSE;
@@ -230,7 +230,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetRectAndLineIntersection(const SDL_Rect *
/**
* Returns true if point resides inside a rectangle.
*/
-SDL_FORCE_INLINE SDL_bool SDL_IsPointInRectF(const SDL_FPoint *p, const SDL_FRect *r)
+SDL_FORCE_INLINE SDL_bool SDL_PointInRectF(const SDL_FPoint *p, const SDL_FRect *r)
{
return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&
(p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;
@@ -239,7 +239,7 @@ SDL_FORCE_INLINE SDL_bool SDL_IsPointInRectF(const SDL_FPoint *p, const SDL_FRec
/**
* Returns true if the rectangle has no area.
*/
-SDL_FORCE_INLINE SDL_bool SDL_IsRectEmptyF(const SDL_FRect *r)
+SDL_FORCE_INLINE SDL_bool SDL_RectEmptyF(const SDL_FRect *r)
{
return ((!r) || (r->w <= 0.0f) || (r->h <= 0.0f)) ? SDL_TRUE : SDL_FALSE;
}
@@ -249,7 +249,7 @@ SDL_FORCE_INLINE SDL_bool SDL_IsRectEmptyF(const SDL_FRect *r)
*
* \since This function is available since SDL 2.0.22.
*/
-SDL_FORCE_INLINE SDL_bool SDL_AreRectsEqualF(const SDL_FRect *a, const SDL_FRect *b, const float epsilon)
+SDL_FORCE_INLINE SDL_bool SDL_RectsEqualEpsilon(const SDL_FRect *a, const SDL_FRect *b, const float epsilon)
{
return (a && b && ((a == b) ||
((SDL_fabsf(a->x - b->x) <= epsilon) &&
@@ -264,9 +264,9 @@ SDL_FORCE_INLINE SDL_bool SDL_AreRectsEqualF(const SDL_FRect *a, const SDL_FRect
*
* \since This function is available since SDL 2.0.22.
*/
-SDL_FORCE_INLINE SDL_bool SDL_FRectEquals(const SDL_FRect *a, const SDL_FRect *b)
+SDL_FORCE_INLINE SDL_bool SDL_RectsEqualF(const SDL_FRect *a, const SDL_FRect *b)
{
- return SDL_AreRectsEqualF(a, b, SDL_FLT_EPSILON);
+ return SDL_RectsEqualEpsilon(a, b, SDL_FLT_EPSILON);
}
/**
diff --git a/include/SDL3/SDL_render.h b/include/SDL3/SDL_render.h
index c53722ac5591..676479f703d0 100644
--- a/include/SDL3/SDL_render.h
+++ b/include/SDL3/SDL_render.h
@@ -769,7 +769,7 @@ extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
*
* \sa SDL_SetRenderTarget
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_IsRenderTargetSupported(SDL_Renderer *renderer);
+extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer);
/**
* Set a texture as the current rendering target.
@@ -938,7 +938,7 @@ extern DECLSPEC void SDLCALL SDL_GetRenderViewport(SDL_Renderer * renderer,
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetRenderClipRect
- * \sa SDL_IsRenderClipEnabled
+ * \sa SDL_RenderClipEnabled
*/
extern DECLSPEC int SDLCALL SDL_SetRenderClipRect(SDL_Renderer * renderer,
const SDL_Rect * rect);
@@ -953,7 +953,7 @@ extern DECLSPEC int SDLCALL SDL_SetRenderClipRect(SDL_Renderer * renderer,
*
* \since This function is available since SDL 3.0.0.
*
- * \sa SDL_IsRenderClipEnabled
+ * \sa SDL_RenderClipEnabled
* \sa SDL_SetRenderClipRect
*/
extern DECLSPEC void SDLCALL SDL_GetRenderClipRect(SDL_Renderer * renderer,
@@ -971,7 +971,7 @@ extern DECLSPEC void SDLCALL SDL_GetRenderClipRect(SDL_Renderer * renderer,
* \sa SDL_GetRenderClipRect
* \sa SDL_SetRenderClipRect
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_IsRenderClipEnabled(SDL_Renderer * renderer);
+extern DECLSPEC SDL_bool SDLCALL SDL_RenderClipEnabled(SDL_Renderer * renderer);
/**
diff --git a/include/SDL3/SDL_video.h b/include/SDL3/SDL_video.h
index 8fdd06d31965..8bc260e0586d 100644
--- a/include/SDL3/SDL_video.h
+++ b/include/SDL3/SDL_video.h
@@ -1612,7 +1612,7 @@ extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);
* \sa SDL_DisableScreenSaver
* \sa SDL_EnableScreenSaver
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void);
+extern DECLSPEC SDL_bool SDLCALL SDL_ScreenSaverEnabled(void);
/**
* Allow the screen to be blanked by a screen saver.
@@ -1620,7 +1620,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void);
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_DisableScreenSaver
- * \sa SDL_IsScreenSaverEnabled
+ * \sa SDL_ScreenSaverEnabled
*/
extern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void);
@@ -1636,7 +1636,7 @@ extern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void);
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_EnableScreenSaver
- * \sa SDL_IsScreenSaverEnabled
+ * \sa SDL_ScreenSaverEnabled
*/
extern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void);
diff --git a/src/dynapi/SDL_dynapi.sym b/src/dynapi/SDL_dynapi.sym
index 328b9cc4775d..9dabd6f38575 100644
--- a/src/dynapi/SDL_dynapi.sym
+++ b/src/dynapi/SDL_dynapi.sym
@@ -426,18 +426,18 @@ SDL3_0.0.0 {
SDL_IsChromebook;
SDL_IsDeXMode;
SDL_IsGamepad;
- SDL_IsGamepadConnected;
- SDL_IsGamepadSensorEnabled;
- SDL_IsJoystickConnected;
+ SDL_GamepadConnected;
+ SDL_GamepadSensorEnabled;
+ SDL_JoystickConnected;
SDL_IsJoystickVirtual;
- SDL_IsRenderClipEnabled;
- SDL_IsRenderTargetSupported;
- SDL_IsScreenKeyboardShown;
- SDL_IsScreenSaverEnabled;
+ SDL_RenderClipEnabled;
+ SDL_RenderTargetSupported;
+ SDL_ScreenKeyboardShown;
+ SDL_ScreenSaverEnabled;
SDL_IsShapedWindow;
SDL_IsTablet;
- SDL_IsTextInputActive;
- SDL_IsTextInputShown;
+ SDL_TextInputActive;
+ SDL_TextInputShown;
SDL_JoystickHasLED;
SDL_JoystickHasRumble;
SDL_JoystickHasRumbleTriggers;
diff --git a/src/dynapi/SDL_dynapi_overrides.h b/src/dynapi/SDL_dynapi_overrides.h
index 7c77747cc567..f1a18313ab61 100644
--- a/src/dynapi/SDL_dynapi_overrides.h
+++ b/src/dynapi/SDL_dynapi_overrides.h
@@ -452,18 +452,18 @@
#define SDL_IsChromebook SDL_IsChromebook_REAL
#define SDL_IsDeXMode SDL_IsDeXMode_REAL
#define SDL_IsGamepad SDL_IsGamepad_REAL
-#define SDL_IsGamepadConnected SDL_IsGamepadConnected_REAL
-#define SDL_IsGamepadSensorEnabled SDL_IsGamepadSensorEnabled_REAL
-#define SDL_IsJoystickConnected SDL_IsJoystickConnected_REAL
+#define SDL_GamepadConnected SDL_GamepadConnected_REAL
+#define SDL_GamepadSensorEnabled SDL_GamepadSensorEnabled_REAL
+#define SDL_JoystickConnected SDL_JoystickConnected_REAL
#define SDL_IsJoystickVirtual SDL_IsJoystickVirtual_REAL
-#define SDL_IsRenderClipEnabled SDL_IsRenderClipEnabled_REAL
-#define SDL_IsRenderTargetSupported SDL_IsRenderTargetSupported_REAL
-#define SDL_IsScreenKeyboardShown SDL_IsScreenKeyboardShown_REAL
-#define SDL_IsScreenSaverEnabled SDL_IsScreenSaverEnabled_REAL
+#define SDL_RenderClipEnabled SDL_RenderClipEnabled_REAL
+#define SDL_RenderTargetSupported SDL_RenderTargetSupported_REAL
+#define SDL_ScreenKeyboardShown SDL_ScreenKeyboardShown_REAL
+#define SDL_ScreenSaverEnabled SDL_ScreenSaverEnabled_REAL
#define SDL_IsShapedWindow SDL_IsShapedWindow_REAL
#define SDL_IsTablet SDL_IsTablet_REAL
-#define SDL_IsTextInputActive SDL_IsTextInputActive_REAL
-#define SDL_IsTextInputShown SDL_IsTextInputShown_REAL
+#define SDL_TextInputActive SDL_TextInputActive_REAL
+#define SDL_TextInputShown SDL_TextInputShown_REAL
#define SDL_JoystickHasLED SDL_JoystickHasLED_REAL
#define SDL_JoystickHasRumble SDL_JoystickHasRumble_REAL
#define SDL_JoystickHasRumbleTriggers SDL_JoystickHasRumbleTriggers_REAL
diff --git a/src/dynapi/SDL_dynapi_procs.h b/src/dynapi/SDL_dynapi_procs.h
index 62953b55d499..81cc2eda5ea9 100644
--- a/src/dynapi/SDL_dynapi_procs.h
+++ b/src/dynapi/SDL_dynapi_procs.h
@@ -523,18 +523,18 @@ SDL_DYNAPI_PROC(void,SDL_HideWindow,(SDL_Window *a),(a),)
SDL_DYNAPI_PROC(int,SDL_Init,(Uint32 a),(a),return)
SDL_DYNAPI_PROC(int,SDL_InitSubSystem,(Uint32 a),(a),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_IsGamepad,(SDL_JoystickID a),(a),return)
-SDL_DYNAPI_PROC(SDL_bool,SDL_IsGamepadConnected,(SDL_Gamepad *a),(a),return)
-SDL_DYNAPI_PROC(SDL_bool,SDL_IsGamepadSensorEnabled,(SDL_Gamepad *a, SDL_SensorType b),(a,b),return)
-SDL_DYNAPI_PROC(SDL_bool,SDL_IsJoystickConnected,(SDL_Joystick *a),(a),return)
+SDL_DYNAPI_PROC(SDL_bool,SDL_GamepadConnected,(SDL_Gamepad *a),(a),return)
+SDL_DYNAPI_PROC(SDL_bool,SDL_GamepadSensorEnabled,(SDL_Gamepad *a, SDL_SensorType b),(a,b),return)
+SDL_DYNAPI_PROC(SDL_bool,SDL_JoystickConnected,(SDL_Joystick *a),(a),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_IsJoystickVirtual,(SDL_JoystickID a),(a),return)
-SDL_DYNAPI_PROC(SDL_bool,SDL_IsRenderClipEnabled,(SDL_Renderer *a),(a),return)
-SDL_DYNAPI_PROC(SDL_bool,SDL_IsRenderTargetSupported,(SDL_Renderer *a),(a),return)
-SDL_DYNAPI_PROC(SDL_bool,SDL_IsScreenKeyboardShown,(SDL_Window *a),(a),return)
-SDL_DYNAPI_PROC(SDL_bool,SDL_IsScreenSaverEnabled,(void),(),return)
+SDL_DYNAPI_PROC(SDL_bool,SDL_RenderClipEnabled,(SDL_Renderer *a),(a),return)
+SDL_DYNAPI_PROC(SDL_bool,SDL_RenderTargetSupported,(SDL_Renderer *a),(a),return)
+SDL_DYNAPI_PROC(SDL_bool,SDL_ScreenKeyboardShown,(SDL_Window *a),(a),return)
+SDL_DYNAPI_PROC(SDL_bool,SDL_ScreenSaverEnabled,(void),(),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_IsShapedWindow,(const SDL_Window *a),(a),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_IsTablet,(void),(),return)
-SDL_DYNAPI_PROC(SDL_bool,SDL_IsTextInputActive,(void),(),return)
-SDL_DYNAPI_PROC(SDL_bool,SDL_IsTextInputShown,(void),(),return)
+SDL_DYNAPI_PROC(SDL_bool,SDL_TextInputActive,(void),(),return)
+SDL_DYNAPI_PROC(SDL_bool,SDL_TextInputShown,(void),(),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_JoystickHasLED,(SDL_Joystick *a),(a),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_JoystickHasRumble,(SDL_Joystick *a),(a),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_JoystickHasRumbleTriggers,(SDL_Joystick *a),(a),return)
diff --git a/src/joystick/SDL_gamepad.c b/src/joystick/SDL_gamepad.c
index 0e8a27d7418b..e82b420c10f3 100644
--- a/src/joystick/SDL_gamepad.c
+++ b/src/joystick/SDL_gamepad.c
@@ -2572,7 +2572,7 @@ int SDL_SetGamepadSensorEnabled(SDL_Gamepad *gamepad, SDL_SensorType type, SDL_b
/*
* Query whether sensor data reporting is enabled for a gamepad
*/
-SDL_bool SDL_IsGamepadSensorEnabled(SDL_Gamepad *gamepad, SDL_SensorType type)
+SDL_bool SDL_GamepadSensorEnabled(SDL_Gamepad *gamepad, SDL_SensorType type)
{
SDL_bool retval = SDL_FALSE;
@@ -2764,14 +2764,14 @@ const char * SDL_GetGamepadSerial(SDL_Gamepad *gamepad)
* Return if the gamepad in question is currently attached to the system,
* \return 0 if not plugged in, 1 if still present.
*/
-SDL_bool SDL_IsGamepadConnected(SDL_Gamepad *gamepad)
+SDL_bool SDL_GamepadConnected(SDL_Gamepad *gamepad)
{
SDL_Joystick *joystick = SDL_GetGamepadJoystick(gamepad);
if (joystick == NULL) {
return SDL_FALSE;
}
- return SDL_IsJoystickConnected(joystick);
+ return SDL_JoystickConnected(joystick);
}
/*
diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index cf3a41aa13e
(Patch may be truncated, please check the link at the top of this post.)