xwayland: review documentation
This commit is contained in:
parent
811df39214
commit
7b3585ad36
|
@ -3,8 +3,8 @@
|
|||
//! This module contains helpers to manage XWayland from your compositor, in order
|
||||
//! to support running X11 apps.
|
||||
//!
|
||||
//! The starting point is the [`XWayland`](struct.XWayland.html) struct, which represents the
|
||||
//! running `XWayland` instance. Dropping it will shutdown XWayland.
|
||||
//! The starting point is the [`XWayland`] struct, which represents the
|
||||
//! running XWayland instance. Dropping it will shutdown XWayland.
|
||||
//!
|
||||
//! You need to provide an implementation of a X11 Window Manager for XWayland to
|
||||
//! function properly. You'll need to treat XWayland (and all its X11 apps) as one
|
||||
|
@ -15,4 +15,4 @@
|
|||
mod x11_sockets;
|
||||
mod xserver;
|
||||
|
||||
pub use self::xserver::{XWayland, XWaylandEvent};
|
||||
pub use self::xserver::{XWayland, XWaylandEvent, XWaylandSource};
|
||||
|
|
|
@ -96,6 +96,9 @@ pub enum XWaylandEvent {
|
|||
|
||||
impl<Data: Any + 'static> XWayland<Data> {
|
||||
/// Create a new XWayland manager
|
||||
///
|
||||
/// This function returns both the [`XWayland`] handle and an [`XWaylandSource`] that needs to be inserted
|
||||
/// into the [`calloop`] event loop, producing the Xwayland startup and shutdown events.
|
||||
pub fn new<L>(
|
||||
handle: LoopHandle<'static, Data>,
|
||||
display: Rc<RefCell<Display>>,
|
||||
|
@ -230,6 +233,11 @@ fn launch<Data: Any>(inner: &Rc<RefCell<Inner<Data>>>) -> std::io::Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// An event source for monitoring XWayland status
|
||||
///
|
||||
/// You need to insert it in a [`calloop`] event loop to handle the events it produces,
|
||||
/// of type [`XWaylandEvent`], which notify you about startup and shutdown of the Xwayland
|
||||
/// instance.
|
||||
#[derive(Debug)]
|
||||
pub struct XWaylandSource {
|
||||
channel: Channel<XWaylandEvent>,
|
||||
|
|
Loading…
Reference in New Issue