Skip to main content

SDL_TrayClickCallback

Type Alias SDL_TrayClickCallback 

Source
pub type SDL_TrayClickCallback = Option<unsafe extern "C" fn(userdata: *mut c_void, tray: *mut SDL_Tray) -> bool>;
Expand description

A callback that is invoked when the tray icon is clicked.

Parameter: userdata an optional pointer to pass extra data to the callback when it will be invoked. May be NULL. Parameter: tray the tray that was clicked. Returns: true to show the tray menu after the callback returns, false to skip showing the menu. This return value is only used for left and right click callbacks; other mouse events ignore the return value.

Available Since: This datatype is available since SDL 3.6.0.

See Also: SDL_CreateTrayWithProperties

Aliased Type§

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

Variants§

§1.0.0

None

No value.

§1.0.0

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

Some value of type T.