[−][src]Struct wayland_protocols::unstable::pointer_constraints::v1::client::zwp_pointer_constraints_v1::ZwpPointerConstraintsV1
Implementations
impl ZwpPointerConstraintsV1
[src]
pub fn destroy(&self)
[src]
destroy the pointer constraints manager object
Used by the client to notify the server that it will no longer use this pointer constraints object.
This is a destructor, you cannot send requests to this object any longer once this method is called.
pub fn lock_pointer<F>(
&self,
surface: &WlSurface,
pointer: &WlPointer,
region: Option<&WlRegion>,
lifetime: u32,
implementor: F
) -> Result<ZwpLockedPointerV1, ()> where
F: FnOnce(NewProxy<ZwpLockedPointerV1>) -> ZwpLockedPointerV1,
[src]
&self,
surface: &WlSurface,
pointer: &WlPointer,
region: Option<&WlRegion>,
lifetime: u32,
implementor: F
) -> Result<ZwpLockedPointerV1, ()> where
F: FnOnce(NewProxy<ZwpLockedPointerV1>) -> ZwpLockedPointerV1,
lock pointer to a position
The lock_pointer request lets the client request to disable movements of the virtual pointer (i.e. the cursor), effectively locking the pointer to a position. This request may not take effect immediately; in the future, when the compositor deems implementation-specific constraints are satisfied, the pointer lock will be activated and the compositor sends a locked event.
The protocol provides no guarantee that the constraints are ever satisfied, and does not require the compositor to send an error if the constraints cannot ever be satisfied. It is thus possible to request a lock that will never activate.
There may not be another pointer constraint of any kind requested or active on the surface for any of the wl_pointer objects of the seat of the passed pointer when requesting a lock. If there is, an error will be raised. See general pointer lock documentation for more details.
The intersection of the region passed with this request and the input region of the surface is used to determine where the pointer must be in order for the lock to activate. It is up to the compositor whether to warp the pointer or require some kind of user interaction for the lock to activate. If the region is null the surface input region is used.
A surface may receive pointer focus without the lock being activated.
The request creates a new object wp_locked_pointer which is used to interact with the lock as well as receive updates about its state. See the the description of wp_locked_pointer for further information.
Note that while a pointer is locked, the wl_pointer objects of the corresponding seat will not emit any wl_pointer.motion events, but relative motion events will still be emitted via wp_relative_pointer objects of the same seat. wl_pointer.axis and wl_pointer.button events are unaffected.
pub fn confine_pointer<F>(
&self,
surface: &WlSurface,
pointer: &WlPointer,
region: Option<&WlRegion>,
lifetime: u32,
implementor: F
) -> Result<ZwpConfinedPointerV1, ()> where
F: FnOnce(NewProxy<ZwpConfinedPointerV1>) -> ZwpConfinedPointerV1,
[src]
&self,
surface: &WlSurface,
pointer: &WlPointer,
region: Option<&WlRegion>,
lifetime: u32,
implementor: F
) -> Result<ZwpConfinedPointerV1, ()> where
F: FnOnce(NewProxy<ZwpConfinedPointerV1>) -> ZwpConfinedPointerV1,
confine pointer to a region
The confine_pointer request lets the client request to confine the pointer cursor to a given region. This request may not take effect immediately; in the future, when the compositor deems implementation- specific constraints are satisfied, the pointer confinement will be activated and the compositor sends a confined event.
The intersection of the region passed with this request and the input region of the surface is used to determine where the pointer must be in order for the confinement to activate. It is up to the compositor whether to warp the pointer or require some kind of user interaction for the confinement to activate. If the region is null the surface input region is used.
The request will create a new object wp_confined_pointer which is used to interact with the confinement as well as receive updates about its state. See the the description of wp_confined_pointer for further information.
Trait Implementations
impl AsRef<Proxy<ZwpPointerConstraintsV1>> for ZwpPointerConstraintsV1
[src]
impl Clone for ZwpPointerConstraintsV1
[src]
fn clone(&self) -> ZwpPointerConstraintsV1
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Eq for ZwpPointerConstraintsV1
[src]
impl From<Proxy<ZwpPointerConstraintsV1>> for ZwpPointerConstraintsV1
[src]
impl From<ZwpPointerConstraintsV1> for Proxy<ZwpPointerConstraintsV1>
[src]
fn from(value: ZwpPointerConstraintsV1) -> Self
[src]
impl<T: EventHandler> HandledBy<T> for ZwpPointerConstraintsV1
[src]
impl Interface for ZwpPointerConstraintsV1
[src]
type Request = Request
Set of requests associated to this interface Read more
type Event = Event
Set of events associated to this interface Read more
const NAME: &'static str
[src]
const VERSION: u32
[src]
fn c_interface() -> *const wl_interface
[src]
impl PartialEq<ZwpPointerConstraintsV1> for ZwpPointerConstraintsV1
[src]
fn eq(&self, other: &ZwpPointerConstraintsV1) -> bool
[src]
fn ne(&self, other: &ZwpPointerConstraintsV1) -> bool
[src]
impl StructuralEq for ZwpPointerConstraintsV1
[src]
impl StructuralPartialEq for ZwpPointerConstraintsV1
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ZwpPointerConstraintsV1
impl Send for ZwpPointerConstraintsV1
impl Sync for ZwpPointerConstraintsV1
impl Unpin for ZwpPointerConstraintsV1
impl !UnwindSafe for ZwpPointerConstraintsV1
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<M, I> HandledBy<Sink<M>> for I where
I: Interface,
M: From<(<I as Interface>::Event, I)>,
[src]
I: Interface,
M: From<(<I as Interface>::Event, I)>,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,