Struct smithay_client_toolkit::seat::SeatState
source · pub struct SeatState { /* private fields */ }
Implementations§
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 !RefUnwindSafe for SeatState
impl Send for SeatState
impl Sync for SeatState
impl Unpin 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.