sdlSetX11EventHook function

void sdlSetX11EventHook(
  1. Pointer<NativeFunction<SdlX11EventHook>> callback,
  2. Pointer<NativeType> userdata
)

Set a callback for every X11 event.

The callback may modify the event, and should return true if the event should continue to be processed, or false to prevent further processing.

\param callback the SDL_X11EventHook function to call. \param userdata a pointer to pass to every iteration of callback.

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC void SDLCALL SDL_SetX11EventHook(SDL_X11EventHook callback, void *userdata)

Implementation

void sdlSetX11EventHook(Pointer<NativeFunction<SdlX11EventHook>> callback,
    Pointer<NativeType> userdata) {
  final sdlSetX11EventHookLookupFunction = libSdl3.lookupFunction<
      Void Function(Pointer<NativeFunction<SdlX11EventHook>> callback,
          Pointer<NativeType> userdata),
      void Function(Pointer<NativeFunction<SdlX11EventHook>> callback,
          Pointer<NativeType> userdata)>('SDL_SetX11EventHook');
  return sdlSetX11EventHookLookupFunction(callback, userdata);
}