mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-19 22:10:52 +00:00
Renamed SDL_Get/SetProperty() to SDL_Get/SetPointerProperty()
This is consistent with the naming for the functions that affect other data types Fixes https://github.com/libsdl-org/SDL/issues/10241
This commit is contained in:
@@ -953,9 +953,6 @@ extern SDL_DECLSPEC SDL_AudioStream *SDLCALL SDL_CreateAudioStream(const SDL_Aud
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_SetProperty
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetAudioStreamProperties(SDL_AudioStream *stream);
|
||||
|
||||
|
||||
@@ -367,9 +367,6 @@ extern SDL_DECLSPEC SDL_CameraDeviceID SDLCALL SDL_GetCameraInstanceID(SDL_Camer
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_SetProperty
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetCameraProperties(SDL_Camera *camera);
|
||||
|
||||
|
||||
@@ -725,9 +725,6 @@ extern SDL_DECLSPEC SDL_Gamepad *SDLCALL SDL_GetGamepadFromPlayerIndex(int playe
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_SetProperty
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetGamepadProperties(SDL_Gamepad *gamepad);
|
||||
|
||||
|
||||
@@ -395,9 +395,6 @@ extern SDL_DECLSPEC int SDLCALL SDL_CloseIO(SDL_IOStream *context);
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_SetProperty
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetIOProperties(SDL_IOStream *context);
|
||||
|
||||
|
||||
@@ -654,9 +654,6 @@ extern SDL_DECLSPEC int SDLCALL SDL_SendJoystickVirtualSensorData(SDL_Joystick *
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_SetProperty
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetJoystickProperties(SDL_Joystick *joystick);
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
* Properties can be added to and retrieved from a property set through the
|
||||
* following functions:
|
||||
*
|
||||
* - SDL_SetProperty and SDL_GetProperty operate on `void*` pointer types.
|
||||
* - SDL_SetPointerProperty and SDL_GetPointerProperty operate on `void*` pointer types.
|
||||
* - SDL_SetStringProperty and SDL_GetStringProperty operate on string types.
|
||||
* - SDL_SetNumberProperty and SDL_GetNumberProperty operate on signed 64-bit
|
||||
* integer types.
|
||||
@@ -86,9 +86,6 @@ typedef enum SDL_PropertyType
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_SetProperty
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetGlobalProperties(void);
|
||||
|
||||
@@ -113,7 +110,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_CreateProperties(void);
|
||||
*
|
||||
* Copy all the properties from one set of properties to another, with the
|
||||
* exception of properties requiring cleanup (set using
|
||||
* SDL_SetPropertyWithCleanup()), which will not be copied. Any property that
|
||||
* SDL_SetPointerPropertyWithCleanup()), which will not be copied. Any property that
|
||||
* already exists on `dst` will be overwritten.
|
||||
*
|
||||
* \param src the properties to copy.
|
||||
@@ -173,7 +170,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockProperties(SDL_PropertiesID props);
|
||||
* This callback is set per-property. Different properties in the same set can
|
||||
* have different cleanup callbacks.
|
||||
*
|
||||
* This callback will be called _during_ SDL_SetPropertyWithCleanup if the
|
||||
* This callback will be called _during_ SDL_SetPointerPropertyWithCleanup if the
|
||||
* function fails for any reason.
|
||||
*
|
||||
* \param userdata an app-defined pointer passed to the callback.
|
||||
@@ -184,7 +181,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockProperties(SDL_PropertiesID props);
|
||||
*
|
||||
* \since This datatype is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_SetPropertyWithCleanup
|
||||
* \sa SDL_SetPointerPropertyWithCleanup
|
||||
*/
|
||||
typedef void (SDLCALL *SDL_CleanupPropertyCallback)(void *userdata, void *value);
|
||||
|
||||
@@ -213,11 +210,11 @@ typedef void (SDLCALL *SDL_CleanupPropertyCallback)(void *userdata, void *value)
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_SetProperty
|
||||
* \sa SDL_GetPointerProperty
|
||||
* \sa SDL_SetPointerProperty
|
||||
* \sa SDL_CleanupPropertyCallback
|
||||
*/
|
||||
extern SDL_DECLSPEC int SDLCALL SDL_SetPropertyWithCleanup(SDL_PropertiesID props, const char *name, void *value, SDL_CleanupPropertyCallback cleanup, void *userdata);
|
||||
extern SDL_DECLSPEC int SDLCALL SDL_SetPointerPropertyWithCleanup(SDL_PropertiesID props, const char *name, void *value, SDL_CleanupPropertyCallback cleanup, void *userdata);
|
||||
|
||||
/**
|
||||
* Set a property on a set of properties.
|
||||
@@ -232,15 +229,15 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetPropertyWithCleanup(SDL_PropertiesID prop
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_GetPointerProperty
|
||||
* \sa SDL_HasProperty
|
||||
* \sa SDL_SetBooleanProperty
|
||||
* \sa SDL_SetFloatProperty
|
||||
* \sa SDL_SetNumberProperty
|
||||
* \sa SDL_SetPropertyWithCleanup
|
||||
* \sa SDL_SetPointerPropertyWithCleanup
|
||||
* \sa SDL_SetStringProperty
|
||||
*/
|
||||
extern SDL_DECLSPEC int SDLCALL SDL_SetProperty(SDL_PropertiesID props, const char *name, void *value);
|
||||
extern SDL_DECLSPEC int SDLCALL SDL_SetPointerProperty(SDL_PropertiesID props, const char *name, void *value);
|
||||
|
||||
/**
|
||||
* Set a string property on a set of properties.
|
||||
@@ -360,7 +357,7 @@ extern SDL_DECLSPEC SDL_PropertyType SDLCALL SDL_GetPropertyType(SDL_PropertiesI
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread, although
|
||||
* the data returned is not protected and could potentially be
|
||||
* freed if you call SDL_SetProperty() or SDL_ClearProperty() on
|
||||
* freed if you call SDL_SetPointerProperty() or SDL_ClearProperty() on
|
||||
* these properties from another thread. If you need to avoid
|
||||
* this, use SDL_LockProperties() and SDL_UnlockProperties().
|
||||
*
|
||||
@@ -372,9 +369,9 @@ extern SDL_DECLSPEC SDL_PropertyType SDLCALL SDL_GetPropertyType(SDL_PropertiesI
|
||||
* \sa SDL_GetPropertyType
|
||||
* \sa SDL_GetStringProperty
|
||||
* \sa SDL_HasProperty
|
||||
* \sa SDL_SetProperty
|
||||
* \sa SDL_SetPointerProperty
|
||||
*/
|
||||
extern SDL_DECLSPEC void *SDLCALL SDL_GetProperty(SDL_PropertiesID props, const char *name, void *default_value);
|
||||
extern SDL_DECLSPEC void *SDLCALL SDL_GetPointerProperty(SDL_PropertiesID props, const char *name, void *default_value);
|
||||
|
||||
/**
|
||||
* Get a string property on a set of properties.
|
||||
|
||||
@@ -413,9 +413,6 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetRendererName(SDL_Renderer *render
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_SetProperty
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetRendererProperties(SDL_Renderer *renderer);
|
||||
|
||||
@@ -758,9 +755,6 @@ extern SDL_DECLSPEC SDL_Texture *SDLCALL SDL_CreateTextureWithProperties(SDL_Ren
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_SetProperty
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetTextureProperties(SDL_Texture *texture);
|
||||
|
||||
|
||||
@@ -217,9 +217,6 @@ extern SDL_DECLSPEC SDL_Sensor *SDLCALL SDL_GetSensorFromInstanceID(SDL_SensorID
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_SetProperty
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetSensorProperties(SDL_Sensor *sensor);
|
||||
|
||||
|
||||
@@ -211,9 +211,6 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroySurface(SDL_Surface *surface);
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_SetProperty
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetSurfaceProperties(SDL_Surface *surface);
|
||||
|
||||
|
||||
@@ -429,9 +429,6 @@ extern SDL_DECLSPEC SDL_DisplayID SDLCALL SDL_GetPrimaryDisplay(void);
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_SetProperty
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetDisplayProperties(SDL_DisplayID displayID);
|
||||
|
||||
@@ -1225,9 +1222,6 @@ extern SDL_DECLSPEC SDL_Window *SDLCALL SDL_GetWindowParent(SDL_Window *window);
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetProperty
|
||||
* \sa SDL_GetNumberProperty
|
||||
*/
|
||||
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetWindowProperties(SDL_Window *window);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user