sdlGetEventFilter function

bool sdlGetEventFilter(
  1. Pointer<Pointer<NativeFunction<SdlEventFilter>>> filter,
  2. Pointer<Pointer<NativeType>> userdata
)

Query the current event filter.

This function can be used to "chain" filters, by saving the existing filter before replacing it with a function that will call that saved filter.

\param filter the current callback function will be stored here \param userdata the pointer that is passed to the current event filter will be stored here \returns SDL_TRUE on success or SDL_FALSE if there is no event filter set.

\since This function is available since SDL 2.0.0.

\sa SDL_SetEventFilter

extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter, void **userdata)

Implementation

bool sdlGetEventFilter(Pointer<Pointer<NativeFunction<SdlEventFilter>>> filter,
    Pointer<Pointer<NativeType>> userdata) {
  final sdlGetEventFilterLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<Pointer<NativeFunction<SdlEventFilter>>> filter,
          Pointer<Pointer<NativeType>> userdata),
      int Function(Pointer<Pointer<NativeFunction<SdlEventFilter>>> filter,
          Pointer<Pointer<NativeType>> userdata)>('SDL_GetEventFilter');
  return sdlGetEventFilterLookupFunction(filter, userdata) == 1;
}