pub struct XdgSessionManagerV1 { /* private fields */ }Expand description
manage sessions for applications
The xdg_session_manager_v1 interface defines base requests for creating and managing a session for an application. Sessions persist across application and compositor restarts unless explicitly destroyed. A session is created for the purpose of maintaining an application’s xdg_toplevel surfaces across compositor or application restarts. The compositor should remember as many states as possible for surfaces in a given session, but there is no requirement for which states must be remembered.
Policies such as cache eviction are declared an implementation detail of the compositor. Clients should account for no longer existing sessions.
This interface has no events.
Implementations§
Source§impl XdgSessionManagerV1
impl XdgSessionManagerV1
Sourcepub fn destroy(&self)
pub fn destroy(&self)
Destroy this object
Destroy the manager object. The existing session objects will be unaffected.
Sourcepub fn get_session<U, D: 'static>(
&self,
reason: Reason,
session_id: Option<String>,
qh: &QueueHandle<D>,
udata: U,
) -> XdgSessionV1
pub fn get_session<U, D: 'static>( &self, reason: Reason, session_id: Option<String>, qh: &QueueHandle<D>, udata: U, ) -> XdgSessionV1
create or restore a session
Create a session object corresponding to either an existing session identified by the given session identifier string or a new session. While the session object exists, the session is considered to be “in use”.
If an identifier string represents a session that is currently actively in use by the the same client, an ‘in_use’ error is raised. If some other client is currently using the same session, the new session will replace managing the associated state.
If the reason is not a valid enum entry, the ‘invalid_reason’ protocol error is raised.
NULL is passed to initiate a new session. If a session_id is passed which does not represent a valid session, the compositor treats it as if NULL had been passed.
The session id string must be UTF-8 encoded. It is also limited by the maximum length of wayland messages (around 4KB). The ‘invalid_session_id’ protocol error will be raised if an invalid string is provided.
A client is allowed to have any number of in use sessions at the same time.
Trait Implementations§
Source§impl Borrow<ObjectId> for XdgSessionManagerV1
impl Borrow<ObjectId> for XdgSessionManagerV1
Source§impl Clone for XdgSessionManagerV1
impl Clone for XdgSessionManagerV1
Source§fn clone(&self) -> XdgSessionManagerV1
fn clone(&self) -> XdgSessionManagerV1
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more