sdlGetPropertyType function properties
Get the type of a property in a group of properties.
\param props the properties to query. \param name the name of the property to query. \returns the type of the property, or SDL_PROPERTY_TYPE_INVALID if it is not set.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.2.0.
\sa SDL_HasProperty
extern SDL_DECLSPEC SDL_PropertyType SDLCALL SDL_GetPropertyType(SDL_PropertiesID props, const char *name)
Implementation
int sdlGetPropertyType(int props, String? name) {
final sdlGetPropertyTypeLookupFunction = _libSdl
.lookupFunction<
Int32 Function(Uint32 props, Pointer<Utf8> name),
int Function(int props, Pointer<Utf8> name)
>('SDL_GetPropertyType');
final namePointer = name != null ? name.toNativeUtf8() : nullptr;
final result = sdlGetPropertyTypeLookupFunction(props, namePointer);
calloc.free(namePointer);
return result;
}