pub enum ControlRequest {
SetAutoBrightness {
control_handle: ControlControlHandle,
},
WatchAutoBrightness {
responder: ControlWatchAutoBrightnessResponder,
},
SetManualBrightness {
value: f32,
control_handle: ControlControlHandle,
},
SetManualBrightnessSmooth {
value: f32,
duration: i64,
control_handle: ControlControlHandle,
},
WatchCurrentBrightness {
responder: ControlWatchCurrentBrightnessResponder,
},
SetAutoBrightnessAdjustment {
adjustment: f32,
control_handle: ControlControlHandle,
},
WatchAutoBrightnessAdjustment {
responder: ControlWatchAutoBrightnessAdjustmentResponder,
},
SetBrightnessTable {
table: BrightnessTable,
control_handle: ControlControlHandle,
},
GetMaxAbsoluteBrightness {
responder: ControlGetMaxAbsoluteBrightnessResponder,
},
}
Expand description
Control provides an interface to manage the brightness component.
Variants§
SetAutoBrightness
Turns the auto-brightness mode on. SetManualBrightness will turn it off.
Fields
control_handle: ControlControlHandle
WatchAutoBrightness
Requests the current auto-brightness mode. This call implements the Hanging Get protocol.
Fields
responder: ControlWatchAutoBrightnessResponder
SetManualBrightness
Turns auto-brightness mode off. Used by e.g. Settings to set manual brightness using a slider Value is in the range 0.0 to 1.0 representing min to max and will be clamped if out of range.
SetManualBrightnessSmooth
Set manual brightness specifying the duration over which the target brightness will be set.
WatchCurrentBrightness
Gets the current brightness in the range 0.0 to 1.0. This result is valid for both manual and auto-brightness modes and is typically used to show the current brightness on a slider. This call implements the Hanging Get protocol.
Fields
responder: ControlWatchCurrentBrightnessResponder
SetAutoBrightnessAdjustment
Sets the brightness adjustment. This will change the brightness curve by the factor of the adjustment. The adjustment is in the range of -1.0 to 1.0.
WatchAutoBrightnessAdjustment
Gets the current auto brightness adjustment. This call implements the Hanging Get protocol.
Fields
SetBrightnessTable
Sets the brightness curve as a set of points. This will override the built-in brightness curve. The default brightness curve will be used if the table is empty. The connection will be closed if table errors are detected.
GetMaxAbsoluteBrightness
Gets the maximum supported backlight brightness in nits, if known.
Fields
responder: ControlGetMaxAbsoluteBrightnessResponder
Implementations§
Source§impl ControlRequest
impl ControlRequest
pub fn into_set_auto_brightness(self) -> Option<ControlControlHandle>
pub fn into_watch_auto_brightness( self, ) -> Option<ControlWatchAutoBrightnessResponder>
pub fn into_set_manual_brightness(self) -> Option<(f32, ControlControlHandle)>
pub fn into_set_manual_brightness_smooth( self, ) -> Option<(f32, i64, ControlControlHandle)>
pub fn into_watch_current_brightness( self, ) -> Option<ControlWatchCurrentBrightnessResponder>
pub fn into_set_auto_brightness_adjustment( self, ) -> Option<(f32, ControlControlHandle)>
pub fn into_watch_auto_brightness_adjustment( self, ) -> Option<ControlWatchAutoBrightnessAdjustmentResponder>
pub fn into_set_brightness_table( self, ) -> Option<(BrightnessTable, ControlControlHandle)>
pub fn into_get_max_absolute_brightness( self, ) -> Option<ControlGetMaxAbsoluteBrightnessResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL