[−][src]Enum kas::event::PressSource
Source of EventChild::Press
Variants
Mouse(MouseButton, u32)
A mouse click
Arguments: button, repeats
.
The repeats
argument is used for double-clicks and similar. For a
single-click, repeats == 1
; for a double-click it is 2, for a
triple-click it is 3, and so on (without upper limit).
For PressMove
and PressEnd
events delivered with a mouse-grab,
both arguments are copied from the initiating PressStart
event.
For a PressMove
delivered without a grab (only possible with pop-ups)
a fake button
value is used and repeats == 0
.
Touch(u64)
A touch event (with given id
)
Implementations
impl PressSource
[src]
pub fn is_primary(self) -> bool
[src]
Returns true if this represents the left mouse button or a touch event
pub fn is_touch(self) -> bool
[src]
Returns true if this represents a touch event
pub fn repetitions(self) -> u32
[src]
The repetitions
value
This is 1 for a single-click and all touch events, 2 for a double-click,
3 for a triple-click, etc. For PressMove
without a grab this is 0.
Trait Implementations
impl Clone for PressSource
[src]
pub fn clone(&self) -> PressSource
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for PressSource
[src]
impl Debug for PressSource
[src]
impl Eq for PressSource
[src]
impl Hash for PressSource
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<PressSource> for PressSource
[src]
pub fn eq(&self, other: &PressSource) -> bool
[src]
pub fn ne(&self, other: &PressSource) -> bool
[src]
impl StructuralEq for PressSource
[src]
impl StructuralPartialEq for PressSource
[src]
Auto Trait Implementations
impl RefUnwindSafe for PressSource
impl Send for PressSource
impl Sync for PressSource
impl Unpin for PressSource
impl UnwindSafe for PressSource
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,