AppState

Struct AppState 

Source
pub struct AppState { /* private fields */ }

Implementations§

Source§

impl AppState

Source

pub fn new( pointer: ManagedWlPointer, keyboard: ManagedWlKeyboard, shared_serial: Rc<SharedPointerSerial>, ) -> Self

Source

pub fn set_global_context(&mut self, context: Rc<GlobalContext>)

Source

pub fn set_slint_platform(&mut self, platform: Rc<CustomSlintPlatform>)

Source

pub fn set_compilation_result( &mut self, compilation_result: Rc<CompilationResult>, )

Source

pub fn set_queue_handle(&mut self, queue_handle: QueueHandle<AppState>)

Source

pub fn lock_manager(&self) -> Option<&SessionLockManager>

Source

pub fn lock_manager_mut(&mut self) -> Option<&mut SessionLockManager>

Source

pub fn clear_lock_manager(&mut self)

Source

pub fn is_session_lock_available(&self) -> bool

Source

pub fn current_lock_state(&self) -> Option<LockState>

Source

pub fn register_session_lock_callback( &mut self, callback_name: impl Into<String>, handler: Rc<dyn Fn(&[Value]) -> Value>, )

Source

pub fn register_session_lock_callback_with_filter( &mut self, callback_name: impl Into<String>, handler: Rc<dyn Fn(&[Value]) -> Value>, filter: OutputFilter, )

Source

pub fn register_session_lock_property_operation( &mut self, property_operation: LockPropertyOperation, )

Source

pub fn activate_session_lock( &mut self, component_name: &str, config: LockConfig, ) -> Result<()>

Source

pub fn deactivate_session_lock(&mut self) -> Result<()>

Source

pub fn session_lock_component_name(&self) -> Option<String>

Source

pub fn iter_lock_surfaces( &self, f: &mut dyn FnMut(OutputHandle, &ComponentInstance), )

Source

pub fn count_lock_surfaces(&self) -> usize

Source

pub fn handle_output_added_for_lock( &mut self, output: &WlOutput, queue_handle: &QueueHandle<AppState>, ) -> Result<()>

Source

pub fn handle_output_removed_for_lock(&mut self, output_id: &ObjectId)

Source

pub fn set_output_manager(&mut self, manager: Rc<RefCell<OutputManager>>)

Source

pub fn output_manager(&self) -> Option<Rc<RefCell<OutputManager>>>

Source

pub fn register_registry_name(&mut self, name: u32, output_id: ObjectId)

Source

pub fn find_output_id_by_registry_name(&self, name: u32) -> Option<ObjectId>

Source

pub fn unregister_registry_name(&mut self, name: u32) -> Option<ObjectId>

Source

pub fn add_shell_surface( &mut self, output_id: &ObjectId, surface_handle: SurfaceHandle, surface_name: &str, main_surface_id: ObjectId, surface_state: SurfaceState, )

Source

pub fn add_output( &mut self, output_id: &ObjectId, surface_handle: SurfaceHandle, surface_name: &str, main_surface_id: ObjectId, surface_state: SurfaceState, )

Source

pub fn remove_output(&mut self, handle: OutputHandle) -> Vec<SurfaceState>

Source

pub fn get_surface_by_key(&self, key: &ShellSurfaceKey) -> Option<&SurfaceState>

Source

pub fn get_surface_by_key_mut( &mut self, key: &ShellSurfaceKey, ) -> Option<&mut SurfaceState>

Source

pub fn get_surface_by_instance( &self, surface_handle: SurfaceHandle, output_handle: OutputHandle, ) -> Option<&SurfaceState>

Source

pub fn get_surface_by_instance_mut( &mut self, surface_handle: SurfaceHandle, output_handle: OutputHandle, ) -> Option<&mut SurfaceState>

Source

pub fn get_output_by_output_id( &self, output_id: &ObjectId, ) -> Option<&SurfaceState>

Source

pub fn get_output_by_output_id_mut( &mut self, output_id: &ObjectId, ) -> Option<&mut SurfaceState>

Source

pub fn get_output_by_surface( &self, surface_id: &ObjectId, ) -> Option<&SurfaceState>

Source

pub fn get_output_by_surface_mut( &mut self, surface_id: &ObjectId, ) -> Option<&mut SurfaceState>

Source

pub fn get_output_by_layer_surface_mut( &mut self, layer_surface_id: &ObjectId, ) -> Option<&mut SurfaceState>

Source

pub fn get_surface_name(&self, surface_handle: SurfaceHandle) -> Option<&str>

Source

pub fn get_key_by_surface( &self, surface_id: &ObjectId, ) -> Option<&ShellSurfaceKey>

Source

pub fn get_handle_by_surface( &self, surface_id: &ObjectId, ) -> Option<OutputHandle>

Source

pub fn get_handle_by_output_id( &self, output_id: &ObjectId, ) -> Option<OutputHandle>

Source

pub fn ensure_output_registered(&mut self, output_id: &ObjectId) -> OutputHandle

Source

pub fn set_active_output_handle(&mut self, handle: Option<OutputHandle>)

Source

pub fn active_output_handle(&self) -> Option<OutputHandle>

Source

pub fn set_active_surface_key(&mut self, key: Option<ShellSurfaceKey>)

Source

pub fn active_surface_key(&self) -> Option<&ShellSurfaceKey>

Source

pub fn active_surface_mut(&mut self) -> Option<&mut SurfaceState>

Source

pub fn primary_output(&self) -> Option<&SurfaceState>

Source

pub fn primary_output_handle(&self) -> Option<OutputHandle>

Source

pub fn active_output(&self) -> Option<&SurfaceState>

Source

pub fn all_outputs(&self) -> impl Iterator<Item = &SurfaceState>

Source

pub fn all_outputs_mut(&mut self) -> impl Iterator<Item = &mut SurfaceState>

Source

pub fn surfaces_for_output( &self, handle: OutputHandle, ) -> impl Iterator<Item = (&str, &SurfaceState)> + '_

Source

pub fn surfaces_with_keys( &self, ) -> impl Iterator<Item = (&ShellSurfaceKey, &SurfaceState)>

Source

pub const fn shared_pointer_serial(&self) -> &Rc<SharedPointerSerial>

Source

pub fn handle_keymap(&mut self, fd: BorrowedFd<'_>, size: u32)

Source

pub fn handle_keyboard_enter( &mut self, _serial: u32, surface: &WlSurface, _keys: &[u8], )

Source

pub fn handle_keyboard_leave(&mut self, _serial: u32, surface: &WlSurface)

Source

pub fn handle_key( &mut self, _serial: u32, _time: u32, key: u32, state: KeyState, )

Source

pub fn handle_modifiers( &mut self, _serial: u32, mods_depressed: u32, mods_latched: u32, mods_locked: u32, group: u32, )

Source

pub fn handle_repeat_info(&mut self, rate: i32, delay: i32)

Source

pub fn find_output_by_popup( &self, popup_surface_id: &ObjectId, ) -> Option<&SurfaceState>

Source

pub fn find_output_by_popup_mut( &mut self, popup_surface_id: &ObjectId, ) -> Option<&mut SurfaceState>

Source

pub fn get_key_by_popup( &self, popup_surface_id: &ObjectId, ) -> Option<&ShellSurfaceKey>

Source

pub fn get_handle_by_popup( &self, popup_surface_id: &ObjectId, ) -> Option<OutputHandle>

Source

pub fn get_output_by_handle_mut( &mut self, handle: OutputHandle, ) -> Option<&mut SurfaceState>

Source

pub fn get_output_info(&self, handle: OutputHandle) -> Option<&OutputInfo>

Source

pub fn get_output_info_mut( &mut self, handle: OutputHandle, ) -> Option<&mut OutputInfo>

Source

pub fn all_output_info(&self) -> impl Iterator<Item = &OutputInfo>

Source

pub const fn output_registry(&self) -> &OutputRegistry

Source

pub fn shell_surface_names(&self) -> Vec<&str>

Source

pub fn surfaces_by_name(&self, surface_name: &str) -> Vec<&SurfaceState>

Source

pub fn surfaces_by_name_mut( &mut self, surface_name: &str, ) -> Vec<&mut SurfaceState>

Source

pub fn surfaces_by_handle(&self, handle: SurfaceHandle) -> Vec<&SurfaceState>

Source

pub fn surfaces_by_handle_mut( &mut self, handle: SurfaceHandle, ) -> Vec<&mut SurfaceState>

Source

pub fn surfaces_by_name_and_output( &self, name: &str, output: OutputHandle, ) -> Vec<&SurfaceState>

Source

pub fn surfaces_by_name_and_output_mut( &mut self, name: &str, output: OutputHandle, ) -> Vec<&mut SurfaceState>

Source

pub fn get_output_by_handle( &self, handle: OutputHandle, ) -> Option<&SurfaceState>

Source

pub fn outputs_with_handles( &self, ) -> impl Iterator<Item = (OutputHandle, &SurfaceState)>

Source

pub fn outputs_with_info( &self, ) -> impl Iterator<Item = (&OutputInfo, &SurfaceState)>

Source

pub fn all_surfaces_for_output_mut( &mut self, output_id: &ObjectId, ) -> Vec<&mut SurfaceState>

Source

pub fn remove_surfaces_by_name( &mut self, surface_name: &str, ) -> Vec<SurfaceState>

Trait Implementations§

Source§

impl Dispatch<ExtSessionLockManagerV1, ()> for AppState

Source§

fn event( _state: &mut Self, _proxy: &ExtSessionLockManagerV1, _event: <ExtSessionLockManagerV1 as Proxy>::Event, _data: &(), _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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<ExtSessionLockSurfaceV1, ()> for AppState

Source§

fn event( state: &mut Self, lock_surface: &ExtSessionLockSurfaceV1, event: Event, _data: &(), _conn: &Connection, _queue_handle: &QueueHandle<Self>, )

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

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

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

impl Dispatch<ExtSessionLockV1, ()> for AppState

Source§

fn event( state: &mut Self, _proxy: &ExtSessionLockV1, event: Event, _data: &(), _conn: &Connection, _queue_handle: &QueueHandle<Self>, )

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

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

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

impl Dispatch<WlCompositor, ()> for AppState

Source§

fn event( _state: &mut Self, _proxy: &WlCompositor, _event: <WlCompositor as Proxy>::Event, _data: &(), _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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<WlKeyboard, ()> for AppState

Source§

fn event( state: &mut Self, _proxy: &WlKeyboard, event: <WlKeyboard as Proxy>::Event, _data: &(), _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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<WlOutput, ()> for AppState

Source§

fn event( state: &mut Self, proxy: &WlOutput, event: <WlOutput as Proxy>::Event, _data: &(), _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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<WlPointer, ()> for AppState

Source§

fn event( state: &mut Self, _proxy: &WlPointer, event: <WlPointer as Proxy>::Event, _data: &(), _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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<WlRegistry, GlobalListContents> for AppState

Source§

fn event( state: &mut Self, registry: &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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<WlSeat, ()> for AppState

Source§

fn event( _state: &mut Self, _proxy: &WlSeat, _event: <WlSeat as Proxy>::Event, _data: &(), _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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<WlSurface, ()> for AppState

Source§

fn event( _state: &mut Self, _proxy: &WlSurface, _event: <WlSurface as Proxy>::Event, _data: &(), _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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<WpFractionalScaleManagerV1, ()> for AppState

Source§

fn event( _state: &mut Self, _proxy: &WpFractionalScaleManagerV1, _event: <WpFractionalScaleManagerV1 as Proxy>::Event, _data: &(), _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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<WpFractionalScaleV1, ()> for AppState

Source§

fn event( state: &mut Self, proxy: &WpFractionalScaleV1, event: Event, _data: &(), _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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<WpViewport, ()> for AppState

Source§

fn event( _state: &mut Self, _proxy: &WpViewport, _event: <WpViewport as Proxy>::Event, _data: &(), _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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<WpViewporter, ()> for AppState

Source§

fn event( _state: &mut Self, _proxy: &WpViewporter, _event: <WpViewporter as Proxy>::Event, _data: &(), _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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<XdgPopup, ()> for AppState

Source§

fn event( state: &mut Self, xdg_popup: &XdgPopup, event: Event, _data: &(), _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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<XdgPositioner, ()> for AppState

Source§

fn event( _state: &mut Self, _proxy: &XdgPositioner, _event: <XdgPositioner as Proxy>::Event, _data: &(), _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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<XdgSurface, ()> for AppState

Source§

fn event( state: &mut Self, xdg_surface: &XdgSurface, event: Event, _data: &(), _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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<XdgWmBase, ()> for AppState

Source§

fn event( _state: &mut Self, xdg_wm_base: &XdgWmBase, event: Event, _data: &(), _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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<ZwlrLayerShellV1, ()> for AppState

Source§

fn event( _state: &mut Self, _proxy: &ZwlrLayerShellV1, _event: <ZwlrLayerShellV1 as Proxy>::Event, _data: &(), _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<State>, ) -> Arc<dyn ObjectData>

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

impl Dispatch<ZwlrLayerSurfaceV1, ()> for AppState

Source§

fn event( state: &mut Self, layer_surface: &ZwlrLayerSurfaceV1, event: Event, _data: &(), _conn: &Connection, _queue_handle: &QueueHandle<Self>, )

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

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

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

Auto Trait Implementations§

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

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

Source§

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

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

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

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.

Source§

impl<T> Instrument for T

Source§

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

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

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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