App

Struct App 

Source
pub struct App { /* private fields */ }
Expand description

Main application - thin wrapper around state machine

Implementations§

Source§

impl App

Source

pub fn run( config: Config, hints: Vec<WindowHint>, previous_window_id: Option<String>, launcher_mode: bool, ipc_server: Option<IpcServer>, ) -> Result<Option<(usize, String)>>

Create and run the application

Trait Implementations§

Source§

impl CompositorHandler for App

Source§

fn scale_factor_changed( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _surface: &WlSurface, new_factor: i32, )

The surface has either been moved into or out of an output and the output has a different scale factor.
Source§

fn transform_changed( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _surface: &WlSurface, _new_transform: Transform, )

The surface has either been moved into or out of an output and the output has different transform.
Source§

fn frame( &mut self, _conn: &Connection, qh: &QueueHandle<Self>, _surface: &WlSurface, _time: u32, )

A frame callback has been completed. Read more
Source§

fn surface_enter( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _surface: &WlSurface, _output: &WlOutput, )

The surface has entered an output.
Source§

fn surface_leave( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _surface: &WlSurface, _output: &WlOutput, )

The surface has left an output.
Source§

impl Dispatch<WlCallback, WlSurface> for App

Source§

fn event( state: &mut Self, proxy: &WlCallback, event: <WlCallback as Proxy>::Event, data: &WlSurface, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WlCompositor, GlobalData> for App

Source§

fn event( state: &mut Self, proxy: &WlCompositor, event: <WlCompositor as Proxy>::Event, data: &GlobalData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WlKeyboard, KeyboardData<App>> for App

Source§

fn event( state: &mut Self, proxy: &WlKeyboard, event: <WlKeyboard as Proxy>::Event, data: &KeyboardData<App>, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WlOutput, OutputData> for App

Source§

fn event( state: &mut Self, proxy: &WlOutput, event: <WlOutput as Proxy>::Event, data: &OutputData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WlRegistry, GlobalListContents> for App

Source§

fn event( state: &mut Self, proxy: &WlRegistry, event: <WlRegistry as Proxy>::Event, data: &GlobalListContents, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WlSeat, SeatData> for App

Source§

fn event( state: &mut Self, proxy: &WlSeat, event: <WlSeat as Proxy>::Event, data: &SeatData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WlShm, GlobalData> for App

Source§

fn event( state: &mut Self, proxy: &WlShm, event: <WlShm as Proxy>::Event, data: &GlobalData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<WlSurface, SurfaceData> for App

Source§

fn event( state: &mut Self, proxy: &WlSurface, event: <WlSurface as Proxy>::Event, data: &SurfaceData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<ZwlrLayerShellV1, GlobalData> for App

Source§

fn event( state: &mut Self, proxy: &ZwlrLayerShellV1, event: <ZwlrLayerShellV1 as Proxy>::Event, data: &GlobalData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<ZwlrLayerSurfaceV1, LayerSurfaceData> for App

Source§

fn event( state: &mut Self, proxy: &ZwlrLayerSurfaceV1, event: <ZwlrLayerSurfaceV1 as Proxy>::Event, data: &LayerSurfaceData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<ZxdgOutputManagerV1, GlobalData> for App

Source§

fn event( state: &mut Self, proxy: &ZxdgOutputManagerV1, event: <ZxdgOutputManagerV1 as Proxy>::Event, data: &GlobalData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl Dispatch<ZxdgOutputV1, OutputData> for App

Source§

fn event( state: &mut Self, proxy: &ZxdgOutputV1, event: <ZxdgOutputV1 as Proxy>::Event, data: &OutputData, conn: &Connection, qhandle: &QueueHandle<Self>, )

Called when an event from the server is processed Read more
Source§

fn event_created_child( opcode: u16, qhandle: &QueueHandle<Self>, ) -> Arc<dyn ObjectData>

Method used to initialize the user-data of objects created by events Read more
Source§

impl KeyboardHandler for App

Source§

fn enter( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _keyboard: &WlKeyboard, _surface: &WlSurface, _serial: u32, raw: &[u32], keysyms: &[Keysym], )

The keyboard has entered a surface. Read more
Source§

fn leave( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _keyboard: &WlKeyboard, _surface: &WlSurface, _serial: u32, )

The keyboard has left a surface. Read more
Source§

fn press_key( &mut self, _conn: &Connection, qh: &QueueHandle<Self>, _keyboard: &WlKeyboard, _serial: u32, event: KeyEvent, )

A key has been pressed on the keyboard. Read more
Source§

fn release_key( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _keyboard: &WlKeyboard, _serial: u32, _event: KeyEvent, )

A key has been released. Read more
Source§

fn repeat_key( &mut self, _conn: &Connection, qh: &QueueHandle<Self>, _keyboard: &WlKeyboard, _serial: u32, event: KeyEvent, )

A key has been previously pressed and is now repeating. Read more
Source§

fn update_modifiers( &mut self, _conn: &Connection, qh: &QueueHandle<Self>, _keyboard: &WlKeyboard, _serial: u32, modifiers: Modifiers, _raw_modifiers: RawModifiers, _layout: u32, )

Keyboard modifiers have been updated. Read more
§

fn update_repeat_info( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _keyboard: &WlKeyboard, _info: RepeatInfo, )

The keyboard has updated the rate and delay between repeating key inputs. Read more
§

fn update_keymap( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _keyboard: &WlKeyboard, _keymap: Keymap<'_>, )

Keyboard keymap has been updated. Read more
Source§

impl LayerShellHandler for App

Source§

fn closed( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _layer: &LayerSurface, )

The layer surface has been closed. Read more
Source§

fn configure( &mut self, _conn: &Connection, qh: &QueueHandle<Self>, layer: &LayerSurface, configure: LayerSurfaceConfigure, _serial: u32, )

Apply a suggested surface change. Read more
Source§

impl OutputHandler for App

Source§

fn output_state(&mut self) -> &mut OutputState

Source§

fn new_output( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _output: WlOutput, )

A new output has been advertised.
Source§

fn update_output( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _output: WlOutput, )

An existing output has changed.
Source§

fn output_destroyed( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _output: WlOutput, )

An output is no longer advertised. Read more
Source§

impl ProvidesRegistryState for App

Source§

fn registry(&mut self) -> &mut RegistryState

Returns a mutable reference to the registry state.
Source§

fn runtime_add_global( &mut self, conn: &Connection, qh: &QueueHandle<Self>, name: u32, interface: &str, version: u32, )

Called when a new global has been advertised by the compositor. Read more
Source§

fn runtime_remove_global( &mut self, conn: &Connection, qh: &QueueHandle<Self>, name: u32, interface: &str, )

Called when a global has been destroyed by the compositor.
Source§

impl SeatHandler for App

Source§

fn seat_state(&mut self) -> &mut SeatState

Source§

fn new_seat( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _seat: WlSeat, )

A new seat has been created. Read more
Source§

fn new_capability( &mut self, _conn: &Connection, qh: &QueueHandle<Self>, seat: WlSeat, capability: Capability, )

A new capability is available on the seat. Read more
Source§

fn remove_capability( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _seat: WlSeat, _capability: Capability, )

A capability has been removed from the seat. Read more
Source§

fn remove_seat( &mut self, _conn: &Connection, _qh: &QueueHandle<Self>, _seat: WlSeat, )

A seat has been removed. Read more
Source§

impl ShmHandler for App

Source§

fn shm_state(&mut self) -> &mut Shm

Auto Trait Implementations§

§

impl Freeze for App

§

impl !RefUnwindSafe for App

§

impl Send for App

§

impl !Sync for App

§

impl Unpin for App

§

impl !UnwindSafe for App

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

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.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

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.
§

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.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more