Struct wayland_protocols::ext::session_lock::v1::server::ext_session_lock_v1::ExtSessionLockV1
source · [−]pub struct ExtSessionLockV1 { /* private fields */ }
staging
and server
only.Expand description
manage lock state and create lock surfaces
On creation of this object either the locked or finished event will immediately be sent.
The locked event indicates that the session is locked. This means that the compositor should stop rendering and providing input to normal clients. Instead the compositor should blank all outputs with an opaque color such that their normal content is fully hidden.
The only surfaces that should be rendered while the session is locked are the lock surfaces created through this interface and optionally, at the compositor’s discretion, special privileged surfaces such as input methods or portions of desktop shell UIs.
If the client dies while the session is locked, the compositor should not unlock the session in response. It is acceptable for the session to be permanently locked if this happens. The compositor may choose to continue to display the lock surfaces the client had mapped before it died or alternatively fall back to a solid color, this is compositor policy.
Compositors may also allow a secure way to recover the session, the details of this are compositor policy. Compositors may allow a new client to create a ext_session_lock_v1 object and take responsibility for unlocking the session, they may even start a new lock client instance automatically.
See also the Request enum for this interface.
Implementations
sourceimpl ExtSessionLockV1
impl ExtSessionLockV1
sourcepub fn locked(&self)
pub fn locked(&self)
session successfully locked
This client is now responsible for displaying graphics while the session is locked and deciding when to unlock the session.
Either this event or the finished event will be sent immediately on creation of this object.
If this event is sent, making the destroy request is a protocol error, the lock object may only be destroyed using the unlock_and_destroy request.
sourcepub fn finished(&self)
pub fn finished(&self)
the session lock object should be destroyed
The compositor has decided that the session lock should be destroyed. Exactly when this event is sent is compositor policy, but it will never be sent more than once for a given session lock object.
This might be sent because there is already another ext_session_lock_v1 object held by a client, or the compositor has decided to deny the request to lock the session for some other reason. This might also be sent because the compositor implements some alternative, secure way to authenticate and unlock the session.
Either this event or the locked event will be sent exactly once on creation of this object. If the locked event is sent on creation of this object, the finished event may still be sent at some later time in this object’s lifetime, this is compositor policy.
Upon receiving this event, the client should make either the destroy request or the unlock_and_destroy request, depending on whether or not the locked event was received on this object.
Trait Implementations
sourceimpl Clone for ExtSessionLockV1
impl Clone for ExtSessionLockV1
sourcefn clone(&self) -> ExtSessionLockV1
fn clone(&self) -> ExtSessionLockV1
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ExtSessionLockV1
impl Debug for ExtSessionLockV1
sourceimpl PartialEq<ExtSessionLockV1> for ExtSessionLockV1
impl PartialEq<ExtSessionLockV1> for ExtSessionLockV1
sourceimpl Resource for ExtSessionLockV1
impl Resource for ExtSessionLockV1
type Request = Request
type Event = Event
fn interface() -> &'static Interface
fn id(&self) -> ObjectId
fn version(&self) -> u32
fn data<U: 'static>(&self) -> Option<&U>
fn object_data(&self) -> Option<&Arc<dyn Any + Send + Sync>>
fn handle(&self) -> &WeakHandle
fn from_id(conn: &DisplayHandle, id: ObjectId) -> Result<Self, InvalidId>
fn send_event(&self, evt: Self::Event) -> Result<(), InvalidId>
fn parse_request(
conn: &DisplayHandle,
msg: Message<ObjectId>
) -> Result<(Self, Self::Request), DispatchError>
fn write_event(
&self,
conn: &DisplayHandle,
msg: Self::Event
) -> Result<Message<ObjectId>, InvalidId>
fn client_id(&self) -> Option<ClientId>
fn post_error(&self, code: impl Into<u32>, error: impl Into<String>)
impl Eq for ExtSessionLockV1
Auto Trait Implementations
impl !RefUnwindSafe for ExtSessionLockV1
impl Send for ExtSessionLockV1
impl Sync for ExtSessionLockV1
impl Unpin for ExtSessionLockV1
impl !UnwindSafe for ExtSessionLockV1
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more