sdlRemoveEventWatch function events

void sdlRemoveEventWatch(
  1. Pointer<NativeFunction<SdlEventFilter>> filter,
  2. Pointer<NativeType> userdata
)

Remove an event watch callback added with SDL_AddEventWatch().

This function takes the same input as SDL_AddEventWatch() to identify and delete the corresponding callback.

\param filter the function originally passed to SDL_AddEventWatch(). \param userdata the pointer originally passed to SDL_AddEventWatch().

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

\since This function is available since SDL 3.2.0.

\sa SDL_AddEventWatch

extern SDL_DECLSPEC void SDLCALL SDL_RemoveEventWatch(SDL_EventFilter filter, void *userdata)

Implementation

void sdlRemoveEventWatch(
  Pointer<NativeFunction<SdlEventFilter>> filter,
  Pointer<NativeType> userdata,
) {
  final sdlRemoveEventWatchLookupFunction = _libSdl
      .lookupFunction<
        Void Function(
          Pointer<NativeFunction<SdlEventFilter>> filter,
          Pointer<NativeType> userdata,
        ),
        void Function(
          Pointer<NativeFunction<SdlEventFilter>> filter,
          Pointer<NativeType> userdata,
        )
      >('SDL_RemoveEventWatch');
  return sdlRemoveEventWatchLookupFunction(filter, userdata);
}