Skip to main content

SDL_HintCallback

Type Alias SDL_HintCallback 

Source
pub type SDL_HintCallback = Option<unsafe extern "C" fn(userdata: *mut c_void, name: *const c_char, oldValue: *const c_char, newValue: *const c_char)>;
Expand description

A callback used to send notifications of hint value changes.

This is called an initial time during SDL_AddHintCallback with the hint’s current value, and then again each time the hint’s value changes. In the initial call, the current value is in both oldValue and newValue.

§Parameters

§Thread safety

This callback is fired from whatever thread is setting a new hint value. SDL holds a lock on the hint subsystem when calling this callback.

§Availability

This datatype is available since SDL 3.2.0.

§See also

Aliased Type§

pub enum SDL_HintCallback {
    None,
    Some(unsafe extern "C" fn(*mut c_void, *const i8, *const i8, *const i8)),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut c_void, *const i8, *const i8, *const i8))

Some value of type T.