pub struct AgentSeat { /* private fields */ }Expand description
Private Wayland proxy that owns its socket, worker threads, and bridges.
Implementations§
Source§impl AgentSeat
impl AgentSeat
Sourcepub fn create() -> Result<Arc<Self>, SeatError>
pub fn create() -> Result<Arc<Self>, SeatError>
Create and start an independently owned agent seat.
Sourcepub fn socket_name(&self) -> String
pub fn socket_name(&self) -> String
The WAYLAND_DISPLAY value agent-launched apps must use.
Sourcepub fn configure_command<'a>(&self, command: &'a mut Command) -> &'a mut Command
pub fn configure_command<'a>(&self, command: &'a mut Command) -> &'a mut Command
Configure a process to connect through this private Wayland seat.
Sourcepub fn close(&self)
pub fn close(&self)
Stop this seat, close every proxied connection, and reap bridge threads. Calling this more than once is safe.
Sourcepub fn start_xwayland_bridge(
&self,
width: u16,
height: u16,
) -> Result<XwaylandBridge, SeatError>
pub fn start_xwayland_bridge( &self, width: u16, height: u16, ) -> Result<XwaylandBridge, SeatError>
Start an owner-authenticated XWayland server whose single root window
is itself a client of this seat. -shm makes its pixels readable by the
window-scoped capture path, while the Xauthority cookie prevents other
local users from connecting to the temporary X socket.
Sourcepub fn adopt_xwayland_bridge(
&self,
bridge: XwaylandBridge,
) -> Result<(), SeatError>
pub fn adopt_xwayland_bridge( &self, bridge: XwaylandBridge, ) -> Result<(), SeatError>
Transfer a successful bridge to the seat. Closing the seat connection makes XWayland exit; the owned reaper then removes only this bridge’s credential directory.
Sourcepub fn app(&self, pid: u32) -> Option<Arc<SeatApp>>
pub fn app(&self, pid: u32) -> Option<Arc<SeatApp>>
The proxied app with the given pid, when connected.
Sourcepub fn bind_app(&self, app: &Arc<SeatApp>)
pub fn bind_app(&self, app: &Arc<SeatApp>)
Pin subsequent lookups for the app’s pid to this exact connection.
Sourcepub fn bind_app_for_pid(&self, application_pid: u32, app: &Arc<SeatApp>)
pub fn bind_app_for_pid(&self, application_pid: u32, app: &Arc<SeatApp>)
Bind an application pid to the seat connection that transports its pixels and input. Normally both pids are identical; an XWayland bridge deliberately transports an X11 client’s window on its behalf.
Sourcepub fn most_recent_app(&self) -> Option<Arc<SeatApp>>
pub fn most_recent_app(&self) -> Option<Arc<SeatApp>>
The most recently connected proxied app. Used as a fallback when the bound target’s pid does not match the connected peer’s pid (apps that re-exec or connect from a child process).
Sourcepub fn connected_pids(&self) -> HashSet<u32>
pub fn connected_pids(&self) -> HashSet<u32>
The set of currently connected app pids.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AgentSeat
impl RefUnwindSafe for AgentSeat
impl Send for AgentSeat
impl Sync for AgentSeat
impl Unpin for AgentSeat
impl UnsafeUnpin for AgentSeat
impl UnwindSafe for AgentSeat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.