Struct ashpd::desktop::inhibit::InhibitProxy [−][src]
pub struct InhibitProxy<'a>(_);
Expand description
The interface lets sandboxed applications inhibit the user session from ending, suspending, idling or getting switched away.
Implementations
Create a new instance of InhibitProxy
.
pub async fn create_monitor(
&self,
identifier: WindowIdentifier
) -> Result<SessionProxy<'a>, Error>
pub async fn create_monitor(
&self,
identifier: WindowIdentifier
) -> Result<SessionProxy<'a>, Error>
Creates a monitoring session.
While this session is active, the caller will receive state_changed
signals with updates on the session state.
Arguments
identifier
- The application window identifier.
pub async fn inhibit(
&self,
identifier: WindowIdentifier,
flags: BitFlags<InhibitFlags>,
reason: &str
) -> Result<(), Error>
pub async fn inhibit(
&self,
identifier: WindowIdentifier,
flags: BitFlags<InhibitFlags>,
reason: &str
) -> Result<(), Error>
Inhibits a session status changes.
Arguments
identifier
- The application window identifier.flags
- The flags determine what changes are inhibited.reason
- User-visible reason for the inhibition.
Signal emitted when the session state changes.
Acknowledges that the caller received the “state_changed” signal.
This method should be called within one second after receiving a
state_changed
signal with the SessionState::QueryEnd
state.
Arguments
session
- ASessionProxy
.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for InhibitProxy<'a>
impl<'a> Send for InhibitProxy<'a>
impl<'a> Sync for InhibitProxy<'a>
impl<'a> Unpin for InhibitProxy<'a>
impl<'a> !UnwindSafe for InhibitProxy<'a>