XPLMAvionicsBrightness_f

Type Alias XPLMAvionicsBrightness_f 

Source
pub type XPLMAvionicsBrightness_f = Option<unsafe extern "C" fn(inRheoValue: f32, inAmbiantBrightness: f32, inBusVoltsRatio: f32, inRefcon: *mut c_void) -> f32>;
Expand description

XPLMAvionicsBrightness_f

This is the prototype for screen brightness callbacks for custom devices. If you provide a callback, you can return the ratio of the screen’s maximum brightness that the simulator should use when displaying the screen in the 3D cockpit.

inRheoValue is the current ratio value (between 0 and 1) of the instrument brightness rheostat to which the device is bound.

inAmbientBrightness is the value (between 0 and 1) that the callback should return for the screen to be at a usable brightness based on ambient light (if your device has a photo cell and automatically adjusts its brightness, you can return this and your screen will be at the optimal brightness to be readable, but not blind the pilot).

inBusVoltsRatio is the ratio of the nominal voltage currently present on the bus to which the device is bound, or -1 if the device is not bound to the current aircraft.

Refcon is a unique value that you specify when creating the device, allowing you to slip a pointer to your own data to the callback.

Aliased Type§

pub enum XPLMAvionicsBrightness_f {
    None,
    Some(unsafe extern "C" fn(f32, f32, f32, *mut c_void) -> f32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

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

Some value of type T.