sdlRemoveHintCallback function

void sdlRemoveHintCallback(
  1. String? name,
  2. Pointer<NativeFunction<SdlHintCallback>> callback,
  3. Pointer<NativeType> userdata
)

Remove a function watching a particular hint.

\param name the hint being watched. \param callback an SDL_HintCallback function that will be called when the hint value changes. \param userdata a pointer being passed to the callback function.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.1.3.

\sa SDL_AddHintCallback

extern SDL_DECLSPEC void SDLCALL SDL_RemoveHintCallback(const char *name, SDL_HintCallback callback, void *userdata)

Implementation

void sdlRemoveHintCallback(
    String? name,
    Pointer<NativeFunction<SdlHintCallback>> callback,
    Pointer<NativeType> userdata) {
  final sdlRemoveHintCallbackLookupFunction = libSdl3.lookupFunction<
      Void Function(
          Pointer<Utf8> name,
          Pointer<NativeFunction<SdlHintCallback>> callback,
          Pointer<NativeType> userdata),
      void Function(
          Pointer<Utf8> name,
          Pointer<NativeFunction<SdlHintCallback>> callback,
          Pointer<NativeType> userdata)>('SDL_RemoveHintCallback');
  final namePointer = name != null ? name.toNativeUtf8() : nullptr;
  final result =
      sdlRemoveHintCallbackLookupFunction(namePointer, callback, userdata);
  calloc.free(namePointer);
  return result;
}