pub enum DeviceRequest {
GetStateNormalized {
responder: DeviceGetStateNormalizedResponder,
},
SetStateNormalized {
state: State,
responder: DeviceSetStateNormalizedResponder,
},
GetStateAbsolute {
responder: DeviceGetStateAbsoluteResponder,
},
SetStateAbsolute {
state: State,
responder: DeviceSetStateAbsoluteResponder,
},
GetMaxAbsoluteBrightness {
responder: DeviceGetMaxAbsoluteBrightnessResponder,
},
SetNormalizedBrightnessScale {
scale: f64,
responder: DeviceSetNormalizedBrightnessScaleResponder,
},
GetNormalizedBrightnessScale {
responder: DeviceGetNormalizedBrightnessScaleResponder,
},
}
Variants§
GetStateNormalized
Gets the current backlight brightness as a percentage value between 0.0 and 1.0
Fields
responder: DeviceGetStateNormalizedResponder
SetStateNormalized
Sets the current backlight brightness as a percentage value between 0.0 and 1.0
GetStateAbsolute
Gets the current backlight brightness in nits
Fields
responder: DeviceGetStateAbsoluteResponder
SetStateAbsolute
Sets the current backlight brightness in nits. Not affected by the scale set by SetNormalizedBrightnessScale.
GetMaxAbsoluteBrightness
Gets the maximum supported backlight brightness in nits, if known. Otherwise returns error ZX_ERR_NOT_SUPPORTED.
Fields
responder: DeviceGetMaxAbsoluteBrightnessResponder
SetNormalizedBrightnessScale
Scales the maximum normalized brightness by a percentage value in [0.0, 1.0], if supported. Otherwise returns error ZX_ERR_NOT_SUPPORTED. Values passed to SetStateNormalized will correspond to a maximum brightness of scale * GetMaxAbsoluteBrightness(). Calling this may change the current absolute brightness.
GetNormalizedBrightnessScale
Gets the current normalized brightness scale as a percentage value in [0.0, 1.0].
Fields
responder: DeviceGetNormalizedBrightnessScaleResponder
Implementations§
Source§impl DeviceRequest
impl DeviceRequest
pub fn into_get_state_normalized( self, ) -> Option<DeviceGetStateNormalizedResponder>
pub fn into_set_state_normalized( self, ) -> Option<(State, DeviceSetStateNormalizedResponder)>
pub fn into_get_state_absolute(self) -> Option<DeviceGetStateAbsoluteResponder>
pub fn into_set_state_absolute( self, ) -> Option<(State, DeviceSetStateAbsoluteResponder)>
pub fn into_get_max_absolute_brightness( self, ) -> Option<DeviceGetMaxAbsoluteBrightnessResponder>
pub fn into_set_normalized_brightness_scale( self, ) -> Option<(f64, DeviceSetNormalizedBrightnessScaleResponder)>
pub fn into_get_normalized_brightness_scale( self, ) -> Option<DeviceGetNormalizedBrightnessScaleResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL