SDL_X11EventHook(3type)

SDL_X11EventHook3type

A callback to be used with sdl_setx11eventhook .

Usage

#include "SDL3/SDL.h"

typedef bool (SDLCALL *SDL_X11EventHook)(void *userdata, XEvent *xevent);

Header file

Defined in SDL3/SDL_system.h

Overview

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

As this is processing an event directly from the X11 event loop, this callback should do the minimum required work and return quickly.

Function parameters

userdata

the app-defined pointer provided to SDL_SetX11EventHook .

xevent

a pointer to an Xlib XEvent union to process.

Return value

Returns true to let event continue on, false to drop it.

Thread safety

This may only be called (by SDL) from the thread handling the X11 event loop.

Availability

This datatype is available since SDL 3.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.