Trait gio::prelude::PowerProfileMonitorExt
source · pub trait PowerProfileMonitorExt: IsA<PowerProfileMonitor> + Sealed + 'static {
// Provided methods
fn is_power_saver_enabled(&self) -> bool { ... }
fn connect_power_saver_enabled_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Available on crate feature
v2_70
only.Expand description
Provided Methods§
sourcefn is_power_saver_enabled(&self) -> bool
fn is_power_saver_enabled(&self) -> bool
Gets whether the system is in “Power Saver” mode.
You are expected to listen to the #GPowerProfileMonitor::notify::power-saver-enabled signal to know when the profile has changed.
§Returns
Whether the system is in “Power Saver” mode.
fn connect_power_saver_enabled_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Object Safety§
This trait is not object safe.