[−][src]Struct wlroots::seat::Seat
Methods
impl Seat
[src]
impl Seat
pub fn create(
compositor: &mut Compositor,
name: String,
handler: Box<dyn Handler>
) -> Handle
[src]
pub fn create(
compositor: &mut Compositor,
name: String,
handler: Box<dyn Handler>
) -> Handle
Allocates a new wlr_seat
and adds a wl_seat global to the display.
pub fn weak_reference(&self) -> Handle
[src]
pub fn weak_reference(&self) -> Handle
Get a weak reference to this seat.
pub fn name(&self) -> Option<String>
[src]
pub fn name(&self) -> Option<String>
Get the name of the seat.
pub fn set_name(&mut self, name: String)
[src]
pub fn set_name(&mut self, name: String)
Updates the name of this seat. Will automatically send it to all clients.
pub fn capabilities(&self) -> Capability
[src]
pub fn capabilities(&self) -> Capability
Gets the capabilities of this seat.
pub fn set_capabilities(&mut self, capabilities: Capability)
[src]
pub fn set_capabilities(&mut self, capabilities: Capability)
Updates the capabilities available on this seat. Will automatically send it to all clients.
pub fn pointer_surface_has_focus(&self, surface: &mut Surface) -> bool
[src]
pub fn pointer_surface_has_focus(&self, surface: &mut Surface) -> bool
Determines if the surface has pointer focus.
pub fn pointer_enter(&self, surface: &mut Surface, sx: f64, sy: f64)
[src]
pub fn pointer_enter(&self, surface: &mut Surface, sx: f64, sy: f64)
pub fn pointer_clear_focus(&self)
[src]
pub fn pointer_clear_focus(&self)
Clears the focused surface for the pointer and leaves all entered surfaces.
pub fn send_motion(&self, time: Duration, sx: f64, sy: f64)
[src]
pub fn send_motion(&self, time: Duration, sx: f64, sy: f64)
Sends a motion event to the surface with pointer focus.
Coordinates for the motion event are surface-local.
Compositors should use Seat::notify_motion
to
send motion events to the respect pointer grabs.
Send a button event to the surface with pointer focus.
Coordinates for the button event are surface-local.
Returns the serial.
Compositors should use Seat::notify_button
to
send button events to respect pointer grabs.
pub fn send_axis(
&self,
time: Duration,
orientation: wlr_axis_orientation,
value: f64,
value_discrete: i32,
source: wlr_axis_source
)
[src]
pub fn send_axis(
&self,
time: Duration,
orientation: wlr_axis_orientation,
value: f64,
value_discrete: i32,
source: wlr_axis_source
)
Send an axis event to the surface with pointer focus.
Compositors should use Seat::notify_axis
to
send axis events to respect pointer grabs.
pub fn pointer_start_grab(&self, grab: Pointer)
[src]
pub fn pointer_start_grab(&self, grab: Pointer)
Start a grab of the pointer of this seat. The grabber is responsible for handling all pointer events until the grab ends.
pub fn pointer_end_grab(&self)
[src]
pub fn pointer_end_grab(&self)
End the grab of the pointer of this seat. This reverts the grab back to the default grab for the pointer.
pub fn pointer_has_grab(&self) -> bool
[src]
pub fn pointer_has_grab(&self) -> bool
Whether or not the pointer has a grab other than the default grab.
pub fn pointer_notify_enter(&self, surface: &mut Surface, sx: f64, sy: f64)
[src]
pub fn pointer_notify_enter(&self, surface: &mut Surface, sx: f64, sy: f64)
Notify the seat of a pointer enter event to the given surface and request it to be the focused surface for the pointer.
Pass surface-local coordinates where the enter occurred.
pub fn pointer_notify_motion(&self, time: Duration, sx: f64, sy: f64)
[src]
pub fn pointer_notify_motion(&self, time: Duration, sx: f64, sy: f64)
Notify the seat of motion over the given surface.
Pass surface-local coordinates where the pointer motion occurred.
Notify the seat that a button has been pressed.
Returns the serial of the button press or zero if no button press was sent.
pub fn pointer_notify_axis(
&self,
time: Duration,
orientation: wlr_axis_orientation,
value: f64,
value_discrete: i32,
source: wlr_axis_source
)
[src]
pub fn pointer_notify_axis(
&self,
time: Duration,
orientation: wlr_axis_orientation,
value: f64,
value_discrete: i32,
source: wlr_axis_source
)
Notify the seat of an axis event.
pub fn set_keyboard(&mut self, dev: &Device)
[src]
pub fn set_keyboard(&mut self, dev: &Device)
Set this keyboard as the active keyboard for the seat.
pub fn keyboard_send_key(&self, time: Duration, key: u32, state: u32)
[src]
pub fn keyboard_send_key(&self, time: Duration, key: u32, state: u32)
Send the keyboard key to focused keyboard resources.
Compositors should use wlr_seat_notify_key()
to respect keyboard grabs.
pub fn keyboard_send_modifiers(&self, modifiers: &mut Modifiers)
[src]
pub fn keyboard_send_modifiers(&self, modifiers: &mut Modifiers)
Send the modifier state to focused keyboard resources.
Compositors should use Seat::keyboard_notify_modifiers()
to respect any keyboard grabs.
pub fn get_keyboard(&self) -> Option<Handle>
[src]
pub fn get_keyboard(&self) -> Option<Handle>
Get the keyboard associated with this Seat, if there is one.
pub fn keyboard_notify_enter(
&self,
surface: &mut Surface,
keycodes: &mut [Keycode],
modifiers: &mut Modifiers
)
[src]
pub fn keyboard_notify_enter(
&self,
surface: &mut Surface,
keycodes: &mut [Keycode],
modifiers: &mut Modifiers
)
Notify the seat that the keyboard focus has changed and request it to be the focused surface for this keyboard.
Defers to any current grab of the seat's keyboard.
pub fn keyboard_enter(
&self,
surface: &mut Surface,
keycodes: &mut [Keycode],
modifiers: &mut Modifiers
)
[src]
pub fn keyboard_enter(
&self,
surface: &mut Surface,
keycodes: &mut [Keycode],
modifiers: &mut Modifiers
)
Send a keyboard enter event to the given surface and consider it to be the focused surface for the keyboard.
This will send a leave event to the last surface that was entered.
Compositors should use Seat::keyboard_notify_enter()
to
change keyboard focus to respect keyboard grabs.
pub fn keyboard_start_grab(&self, grab: Keyboard)
[src]
pub fn keyboard_start_grab(&self, grab: Keyboard)
Start a grab of the keyboard of this seat. The grabber is responsible for handling all keyboard events until the grab ends.
pub fn keyboard_end_grab(&self)
[src]
pub fn keyboard_end_grab(&self)
End the grab of the keyboard of this seat. This reverts the grab back to the default grab for the keyboard.
pub fn keyboard_has_grab(&self) -> bool
[src]
pub fn keyboard_has_grab(&self) -> bool
Whether or not the keyboard has a grab other than the default grab
pub fn keyboard_clear_focus(&self)
[src]
pub fn keyboard_clear_focus(&self)
Clear the focused surface for the keyboard and leave all entered surfaces.
pub fn keyboard_notify_modifiers(&self, modifiers: &mut Modifiers)
[src]
pub fn keyboard_notify_modifiers(&self, modifiers: &mut Modifiers)
Notify the seat that the modifiers for the keyboard have changed.
Defers to any keyboard grabs.
pub fn keyboard_notify_key(&self, time: Duration, key: u32, state: u32)
[src]
pub fn keyboard_notify_key(&self, time: Duration, key: u32, state: u32)
Notify the seat that a key has been pressed on the keyboard.
Defers to any keyboard grabs.
pub fn touch_num_points(&self) -> i32
[src]
pub fn touch_num_points(&self) -> i32
How many touch ponits are currently down for the seat.
pub fn touch_start_grab(&self, grab: Touch)
[src]
pub fn touch_start_grab(&self, grab: Touch)
Start a grab of the touch device of this seat. The grabber is responsible for handling all touch events until the grab ends.
pub fn touch_end_grab(&self)
[src]
pub fn touch_end_grab(&self)
End the grab of the touch device of this seat. This reverts the grab back to the default grab for the touch device.
pub fn touch_has_grab(&self) -> bool
[src]
pub fn touch_has_grab(&self) -> bool
Whether or not the seat has a touch grab other than the default grab.
pub fn get_touch_point(&self, touch_id: TouchId) -> Option<TouchPoint>
[src]
pub fn get_touch_point(&self, touch_id: TouchId) -> Option<TouchPoint>
pub fn touch_point_focus(
&self,
surface: &mut Surface,
time: Duration,
touch_id: TouchId,
sx: f64,
sy: f64
)
[src]
pub fn touch_point_focus(
&self,
surface: &mut Surface,
time: Duration,
touch_id: TouchId,
sx: f64,
sy: f64
)
Notify the seat that the touch point given by touch_id
has entered a new
surface.
The surface is required. To clear focus, use Seat::touch_point_clear_focus()
.
pub fn touch_point_clear_focus(&self, time: Duration, touch_id: TouchId)
[src]
pub fn touch_point_clear_focus(&self, time: Duration, touch_id: TouchId)
pub fn touch_send_down(
&self,
surface: &mut Surface,
time: Duration,
touch_id: TouchId,
sx: f64,
sy: f64
) -> u32
[src]
pub fn touch_send_down(
&self,
surface: &mut Surface,
time: Duration,
touch_id: TouchId,
sx: f64,
sy: f64
) -> u32
Send a touch down event to the client of the given surface.
All future touch events for this point will go to this surface.
If the touch down is valid, this will add a new touch point with the given touch_id
.
The touch down may not be valid if the surface seat client does not accept touch input.
Coordinates are surface-local.
Compositors should use Seat::touch_notify_down()
to
respect any grabs of the touch device.
pub fn touch_send_up(&self, time: Duration, touch_id: TouchId)
[src]
pub fn touch_send_up(&self, time: Duration, touch_id: TouchId)
Send a touch up event for the touch point given by the touch_id
.
The event will go to the client for the surface given in the cooresponding touch down event.
This will remove the touch point.
Compositors should use Seat::touch_notify_up()
to
respect any grabs of the touch device.
pub fn touch_send_motion(
&self,
time: Duration,
touch_id: TouchId,
sx: f64,
sy: f64
)
[src]
pub fn touch_send_motion(
&self,
time: Duration,
touch_id: TouchId,
sx: f64,
sy: f64
)
Send a touch motion event for the touch point given by the touch_id
.
The event will go to the client for the surface given in the corresponding touch down event.
Compositors should use Seat::touch_notify_motion()
to
respect any grabs of the touch device.
pub fn touch_notify_down(
&self,
surface: &mut Surface,
time: Duration,
touch_id: TouchId,
sx: f64,
sy: f64
) -> u32
[src]
pub fn touch_notify_down(
&self,
surface: &mut Surface,
time: Duration,
touch_id: TouchId,
sx: f64,
sy: f64
) -> u32
Notify the seat of a touch down on the given surface. Defers to any grab of the touch device.
pub fn touch_notify_up(&self, time: Duration, touch_id: TouchId)
[src]
pub fn touch_notify_up(&self, time: Duration, touch_id: TouchId)
Notify the seat that the touch point given by touch_id
is up. Defers to any
grab of the touch device.
pub fn touch_notify_motion(
&self,
time: Duration,
touch_id: TouchId,
sx: f64,
sy: f64
)
[src]
pub fn touch_notify_motion(
&self,
time: Duration,
touch_id: TouchId,
sx: f64,
sy: f64
)
Notify the seat that the touch point given by touch_id
has moved.
Defers to any grab of the touch device.
The seat should be notified of touch motion even if the surface is not the owner of the touch point for processing by grabs.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more