pub struct ControlSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ControlSynchronousProxy
impl ControlSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ControlEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ControlEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn set_auto_brightness(&self) -> Result<(), Error>
pub fn set_auto_brightness(&self) -> Result<(), Error>
Turns the auto-brightness mode on. SetManualBrightness will turn it off.
Sourcepub fn watch_auto_brightness(
&self,
___deadline: MonotonicInstant,
) -> Result<bool, Error>
pub fn watch_auto_brightness( &self, ___deadline: MonotonicInstant, ) -> Result<bool, Error>
Requests the current auto-brightness mode. This call implements the Hanging Get protocol.
Sourcepub fn set_manual_brightness(&self, value: f32) -> Result<(), Error>
pub fn set_manual_brightness(&self, value: f32) -> Result<(), Error>
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.
Sourcepub fn set_manual_brightness_smooth(
&self,
value: f32,
duration: i64,
) -> Result<(), Error>
pub fn set_manual_brightness_smooth( &self, value: f32, duration: i64, ) -> Result<(), Error>
Set manual brightness specifying the duration over which the target brightness will be set.
Sourcepub fn watch_current_brightness(
&self,
___deadline: MonotonicInstant,
) -> Result<f32, Error>
pub fn watch_current_brightness( &self, ___deadline: MonotonicInstant, ) -> Result<f32, Error>
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.
Sourcepub fn set_auto_brightness_adjustment(
&self,
adjustment: f32,
) -> Result<(), Error>
pub fn set_auto_brightness_adjustment( &self, adjustment: f32, ) -> Result<(), Error>
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.
Sourcepub fn watch_auto_brightness_adjustment(
&self,
___deadline: MonotonicInstant,
) -> Result<f32, Error>
pub fn watch_auto_brightness_adjustment( &self, ___deadline: MonotonicInstant, ) -> Result<f32, Error>
Gets the current auto brightness adjustment. This call implements the Hanging Get protocol.
Sourcepub fn set_brightness_table(&self, table: &BrightnessTable) -> Result<(), Error>
pub fn set_brightness_table(&self, table: &BrightnessTable) -> Result<(), Error>
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.
Sourcepub fn get_max_absolute_brightness(
&self,
___deadline: MonotonicInstant,
) -> Result<ControlGetMaxAbsoluteBrightnessResult, Error>
pub fn get_max_absolute_brightness( &self, ___deadline: MonotonicInstant, ) -> Result<ControlGetMaxAbsoluteBrightnessResult, Error>
Gets the maximum supported backlight brightness in nits, if known.
Trait Implementations§
Source§impl Debug for ControlSynchronousProxy
impl Debug for ControlSynchronousProxy
Source§impl SynchronousProxy for ControlSynchronousProxy
impl SynchronousProxy for ControlSynchronousProxy
Source§type Proxy = ControlProxy
type Proxy = ControlProxy
Source§type Protocol = ControlMarker
type Protocol = ControlMarker
Proxy
controls.