Type Alias sdl2_sys::SDL_EventFilter

source ·
pub type SDL_EventFilter = Option<unsafe extern "C" fn(userdata: *mut c_void, event: *mut SDL_Event) -> c_int>;
Expand description

A function pointer used for callbacks that watch the event queue.

\param userdata what was passed as userdata to SDL_SetEventFilter() or SDL_AddEventWatch, etc \param event the event that triggered the callback \returns 1 to permit event to be added to the queue, and 0 to disallow it. When used with SDL_AddEventWatch, the return value is ignored.

\sa SDL_SetEventFilter \sa SDL_AddEventWatch

Aliased Type§

enum SDL_EventFilter {
    None,
    Some(unsafe extern "C" fn(_: *mut c_void, _: *mut SDL_Event) -> i32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut c_void, _: *mut SDL_Event) -> i32)

Some value of type T.