SDL_WindowsMessageHook

Type Alias SDL_WindowsMessageHook 

Source
pub type SDL_WindowsMessageHook = Option<unsafe extern "C" fn(userdata: *mut c_void, msg: *mut MSG) -> bool>;
Available on Windows only.
Expand description

A callback to be used with SDL_SetWindowsMessageHook.

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

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

§Parameters

  • userdata: the app-defined pointer provided to SDL_SetWindowsMessageHook.
  • msg: a pointer to a Win32 event structure 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 Windows event loop.

§Availability

This datatype is available since SDL 3.2.0.

§See also

Aliased Type§

pub enum SDL_WindowsMessageHook {
    None,
    Some(unsafe extern "C" fn(*mut c_void, *mut MSG) -> bool),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut c_void, *mut MSG) -> bool)

Some value of type T.