pub struct SeatState {
seats: Vec<SeatInner>,
cursor_shape_manager_state: CursorShapeManagerState,
}Fields§
§seats: Vec<SeatInner>§cursor_shape_manager_state: CursorShapeManagerStateImplementations§
Source§impl SeatState
impl SeatState
pub fn new<D: Dispatch<WlSeat, SeatData> + 'static>( global_list: &GlobalList, qh: &QueueHandle<D>, ) -> SeatState
Sourcepub fn info(&self, seat: &WlSeat) -> Option<SeatInfo>
pub fn info(&self, seat: &WlSeat) -> Option<SeatInfo>
Returns information about a seat.
This will return None if the seat is dead.
Sourcepub fn get_pointer<D>(
&mut self,
qh: &QueueHandle<D>,
seat: &WlSeat,
) -> Result<WlPointer, SeatError>
pub fn get_pointer<D>( &mut self, qh: &QueueHandle<D>, seat: &WlSeat, ) -> Result<WlPointer, SeatError>
Creates a pointer from a seat.
§Errors
This will return SeatError::UnsupportedCapability if the seat does not support a pointer.
Sourcepub fn get_pointer_with_theme<D, S>(
&mut self,
qh: &QueueHandle<D>,
seat: &WlSeat,
shm: &WlShm,
surface: WlSurface,
theme: ThemeSpec<'_>,
) -> Result<ThemedPointer<PointerData>, SeatError>where
D: Dispatch<WlPointer, PointerData> + Dispatch<WlSurface, S> + Dispatch<WpCursorShapeManagerV1, GlobalData> + Dispatch<WpCursorShapeDeviceV1, GlobalData> + PointerHandler + 'static,
S: SurfaceDataExt + 'static,
pub fn get_pointer_with_theme<D, S>(
&mut self,
qh: &QueueHandle<D>,
seat: &WlSeat,
shm: &WlShm,
surface: WlSurface,
theme: ThemeSpec<'_>,
) -> Result<ThemedPointer<PointerData>, SeatError>where
D: Dispatch<WlPointer, PointerData> + Dispatch<WlSurface, S> + Dispatch<WpCursorShapeManagerV1, GlobalData> + Dispatch<WpCursorShapeDeviceV1, GlobalData> + PointerHandler + 'static,
S: SurfaceDataExt + 'static,
Creates a pointer from a seat with the provided theme.
This will use CursorShapeManager under the hood when it’s available.
§Errors
This will return SeatError::UnsupportedCapability if the seat does not support a pointer.
Sourcepub fn get_pointer_with_data<D, U>(
&mut self,
qh: &QueueHandle<D>,
seat: &WlSeat,
pointer_data: U,
) -> Result<WlPointer, SeatError>
pub fn get_pointer_with_data<D, U>( &mut self, qh: &QueueHandle<D>, seat: &WlSeat, pointer_data: U, ) -> Result<WlPointer, SeatError>
Creates a pointer from a seat.
§Errors
This will return SeatError::UnsupportedCapability if the seat does not support a pointer.
Sourcepub fn get_pointer_with_theme_and_data<D, S, U>(
&mut self,
qh: &QueueHandle<D>,
seat: &WlSeat,
shm: &WlShm,
surface: WlSurface,
theme: ThemeSpec<'_>,
pointer_data: U,
) -> Result<ThemedPointer<U>, SeatError>where
D: Dispatch<WlPointer, U> + Dispatch<WlSurface, S> + Dispatch<WpCursorShapeManagerV1, GlobalData> + Dispatch<WpCursorShapeDeviceV1, GlobalData> + PointerHandler + 'static,
S: SurfaceDataExt + 'static,
U: PointerDataExt + 'static,
pub fn get_pointer_with_theme_and_data<D, S, U>(
&mut self,
qh: &QueueHandle<D>,
seat: &WlSeat,
shm: &WlShm,
surface: WlSurface,
theme: ThemeSpec<'_>,
pointer_data: U,
) -> Result<ThemedPointer<U>, SeatError>where
D: Dispatch<WlPointer, U> + Dispatch<WlSurface, S> + Dispatch<WpCursorShapeManagerV1, GlobalData> + Dispatch<WpCursorShapeDeviceV1, GlobalData> + PointerHandler + 'static,
S: SurfaceDataExt + 'static,
U: PointerDataExt + 'static,
Creates a pointer from a seat with the provided theme and data.
§Errors
This will return SeatError::UnsupportedCapability if the seat does not support a pointer.
Sourcepub fn get_touch<D>(
&mut self,
qh: &QueueHandle<D>,
seat: &WlSeat,
) -> Result<WlTouch, SeatError>
pub fn get_touch<D>( &mut self, qh: &QueueHandle<D>, seat: &WlSeat, ) -> Result<WlTouch, SeatError>
Creates a touch handle from a seat.
§Errors
This will return SeatError::UnsupportedCapability if the seat does not support touch.
Sourcepub fn get_touch_with_data<D, U>(
&mut self,
qh: &QueueHandle<D>,
seat: &WlSeat,
udata: U,
) -> Result<WlTouch, SeatError>
pub fn get_touch_with_data<D, U>( &mut self, qh: &QueueHandle<D>, seat: &WlSeat, udata: U, ) -> Result<WlTouch, SeatError>
Creates a touch handle from a seat.
§Errors
This will return SeatError::UnsupportedCapability if the seat does not support touch.
Trait Implementations§
Source§impl<D, U> Dispatch<WlPointer, U, D> for SeatState
impl<D, U> Dispatch<WlPointer, U, D> for SeatState
Source§fn event(
data: &mut D,
pointer: &WlPointer,
event: Event,
udata: &U,
conn: &Connection,
qh: &QueueHandle<D>,
)
fn event( data: &mut D, pointer: &WlPointer, event: Event, udata: &U, conn: &Connection, qh: &QueueHandle<D>, )
Source§fn event_created_child(
opcode: u16,
_qhandle: &QueueHandle<State>,
) -> Arc<dyn ObjectData>
fn event_created_child( opcode: u16, _qhandle: &QueueHandle<State>, ) -> Arc<dyn ObjectData>
Source§impl<D> Dispatch<WlSeat, SeatData, D> for SeatState
impl<D> Dispatch<WlSeat, SeatData, D> for SeatState
Source§fn event(
state: &mut D,
seat: &WlSeat,
event: Event,
data: &SeatData,
conn: &Connection,
qh: &QueueHandle<D>,
)
fn event( state: &mut D, seat: &WlSeat, event: Event, data: &SeatData, conn: &Connection, qh: &QueueHandle<D>, )
Source§fn event_created_child(
opcode: u16,
_qhandle: &QueueHandle<State>,
) -> Arc<dyn ObjectData>
fn event_created_child( opcode: u16, _qhandle: &QueueHandle<State>, ) -> Arc<dyn ObjectData>
Source§impl<D, U> Dispatch<WlTouch, U, D> for SeatState
impl<D, U> Dispatch<WlTouch, U, D> for SeatState
Source§fn event(
data: &mut D,
touch: &WlTouch,
event: TouchEvent,
udata: &U,
conn: &Connection,
qh: &QueueHandle<D>,
)
fn event( data: &mut D, touch: &WlTouch, event: TouchEvent, udata: &U, conn: &Connection, qh: &QueueHandle<D>, )
Source§fn event_created_child(
opcode: u16,
_qhandle: &QueueHandle<State>,
) -> Arc<dyn ObjectData>
fn event_created_child( opcode: u16, _qhandle: &QueueHandle<State>, ) -> Arc<dyn ObjectData>
Source§impl<D> RegistryHandler<D> for SeatState
impl<D> RegistryHandler<D> for SeatState
Source§fn new_global(
state: &mut D,
conn: &Connection,
qh: &QueueHandle<D>,
name: u32,
interface: &str,
_: u32,
)
fn new_global( state: &mut D, conn: &Connection, qh: &QueueHandle<D>, name: u32, interface: &str, _: u32, )
Source§fn remove_global(
state: &mut D,
conn: &Connection,
qh: &QueueHandle<D>,
name: u32,
interface: &str,
)
fn remove_global( state: &mut D, conn: &Connection, qh: &QueueHandle<D>, name: u32, interface: &str, )
Auto Trait Implementations§
impl Freeze for SeatState
impl !RefUnwindSafe for SeatState
impl Send for SeatState
impl Sync for SeatState
impl Unpin for SeatState
impl UnsafeUnpin for SeatState
impl !UnwindSafe for SeatState
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.