pub struct SeatState { /* private fields */ }Implementations§
Source§impl SeatState
impl SeatState
Sourcepub fn get_keyboard_with_repeat<D>(
&mut self,
qh: &QueueHandle<D>,
seat: &WlSeat,
rmlvo: Option<RMLVO>,
loop_handle: LoopHandle<'static, D>,
callback: RepeatCallback<D>,
) -> Result<WlKeyboard, KeyboardError>
pub fn get_keyboard_with_repeat<D>( &mut self, qh: &QueueHandle<D>, seat: &WlSeat, rmlvo: Option<RMLVO>, loop_handle: LoopHandle<'static, D>, callback: RepeatCallback<D>, ) -> Result<WlKeyboard, KeyboardError>
Creates a keyboard from a seat.
This function returns an EventSource that indicates when a key press is going to repeat.
This keyboard implementation uses libxkbcommon for the keymap.
Typically the compositor will provide a keymap, but you may specify your own keymap using the rmlvo
field.
§Errors
This will return SeatError::UnsupportedCapability if the seat does not support a keyboard.
Sourcepub fn get_keyboard_with_repeat_with_data<D, U>(
&mut self,
qh: &QueueHandle<D>,
seat: &WlSeat,
udata: U,
loop_handle: LoopHandle<'static, D>,
callback: RepeatCallback<D>,
) -> Result<WlKeyboard, KeyboardError>where
D: Dispatch<WlKeyboard, KeyboardData<D, U>> + KeyboardHandler + 'static,
U: Send + Sync + 'static,
pub fn get_keyboard_with_repeat_with_data<D, U>(
&mut self,
qh: &QueueHandle<D>,
seat: &WlSeat,
udata: U,
loop_handle: LoopHandle<'static, D>,
callback: RepeatCallback<D>,
) -> Result<WlKeyboard, KeyboardError>where
D: Dispatch<WlKeyboard, KeyboardData<D, U>> + KeyboardHandler + 'static,
U: Send + Sync + 'static,
Creates a keyboard from a seat.
This function returns an EventSource that indicates when a key press is going to repeat.
This keyboard implementation uses libxkbcommon for the keymap.
Typically the compositor will provide a keymap, but you may specify your own keymap using the rmlvo
field.
§Errors
This will return SeatError::UnsupportedCapability if the seat does not support a keyboard.
Source§impl SeatState
impl SeatState
Sourcepub fn get_keyboard<D>(
&mut self,
qh: &QueueHandle<D>,
seat: &WlSeat,
rmlvo: Option<RMLVO>,
) -> Result<WlKeyboard, KeyboardError>
pub fn get_keyboard<D>( &mut self, qh: &QueueHandle<D>, seat: &WlSeat, rmlvo: Option<RMLVO>, ) -> Result<WlKeyboard, KeyboardError>
Creates a keyboard from a seat.
This keyboard implementation uses libxkbcommon for the keymap.
Typically the compositor will provide a keymap, but you may specify your own keymap using the rmlvo
field.
This keyboard only sends key repeats if they are issued by the compositor. See wl_keyboard version 10.
§Errors
This will return SeatError::UnsupportedCapability if the seat does not support a keyboard.
Sourcepub fn get_keyboard_with_data<D, U>(
&mut self,
qh: &QueueHandle<D>,
seat: &WlSeat,
udata: U,
) -> Result<WlKeyboard, KeyboardError>where
D: Dispatch<WlKeyboard, KeyboardData<D, U>> + SeatHandler + KeyboardHandler + 'static,
U: Send + Sync + 'static,
pub fn get_keyboard_with_data<D, U>(
&mut self,
qh: &QueueHandle<D>,
seat: &WlSeat,
udata: U,
) -> Result<WlKeyboard, KeyboardError>where
D: Dispatch<WlKeyboard, KeyboardData<D, U>> + SeatHandler + KeyboardHandler + 'static,
U: Send + Sync + 'static,
Creates a keyboard from a seat.
This keyboard implementation uses libxkbcommon for the keymap.
Typically the compositor will provide a keymap, but you may specify your own keymap using the rmlvo
field.
§Errors
This will return SeatError::UnsupportedCapability if the seat does not support a keyboard.
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<()>, SeatError>where
D: Dispatch<WlPointer, PointerData<()>> + Dispatch<WlSurface, SurfaceData<S>> + Dispatch<WpCursorShapeManagerV1, GlobalData> + Dispatch<WpCursorShapeDeviceV1, GlobalData> + PointerHandler + 'static,
pub fn get_pointer_with_theme<D, S>(
&mut self,
qh: &QueueHandle<D>,
seat: &WlSeat,
shm: &WlShm,
surface: WlSurface,
theme: ThemeSpec<'_>,
) -> Result<ThemedPointer<()>, SeatError>where
D: Dispatch<WlPointer, PointerData<()>> + Dispatch<WlSurface, SurfaceData<S>> + Dispatch<WpCursorShapeManagerV1, GlobalData> + Dispatch<WpCursorShapeDeviceV1, GlobalData> + PointerHandler + '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, 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, PointerData<U>> + Dispatch<WpCursorShapeManagerV1, GlobalData> + Dispatch<WpCursorShapeDeviceV1, GlobalData> + PointerHandler + 'static,
U: Send + Sync + 'static,
pub fn get_pointer_with_theme_and_data<D, 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, PointerData<U>> + Dispatch<WpCursorShapeManagerV1, GlobalData> + Dispatch<WpCursorShapeDeviceV1, GlobalData> + PointerHandler + 'static,
U: Send + Sync + '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§
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.