Struct wayland_client::core::seat::Touch [] [src]

pub struct Touch {
    // some fields omitted
}

Methods

impl Touch

fn get_id(&self) -> TouchId

Returns the unique \TouchId` associated with this touch device.

This struct can be tested for equality, and will be provided in event callbacks as a mean to identify the toch device associated with the events.

fn get_seat(&self) -> &Seat

Get access to the seat associated with this keyboard

fn release(self)

fn set_down_action<F>(&mut self, f: F) where F: Fn(TouchId, Serial, u32, SurfaceId, i32, f64, f64) + 'static + Send + Sync

Defines the action to be executed when a new touch point appears

Arguments are:

  • Id of the touch
  • serial number of the event
  • timestamp with miliseconds of the event
  • id of the surface of the event
  • unique id for this touch point (will be used to identify it when moving or when disappearing)
  • x coordinate of the touch point on the surface
  • y coordinate of the touch point on the surface

fn set_up_action<F>(&mut self, f: F) where F: Fn(TouchId, Serial, u32, i32) + 'static + Send + Sync

Defines the action to be executed when a touch point dissapears

Arguments are:

  • Id of the touch
  • serial number of the event
  • timestamp with miliseconds of the event
  • unique id for this touch point (this id is then released and can be used for new touch points)

fn set_motion_action<F>(&mut self, f: F) where F: Fn(TouchId, u32, i32, f64, f64) + 'static + Send + Sync

Defines the action to be executed a touch point moves

Arguments are:

  • Id of the touch
  • timestamp with miliseconds of the event
  • unique id for this touch point
  • new x coordinate of the touch point on the surface
  • new y coordinate of the touch point on the surface

fn set_frame_action<F>(&mut self, f: F) where F: Fn(TouchId) + 'static + Send + Sync

fn set_cancel_action<F>(&mut self, f: F) where F: Fn(TouchId) + 'static + Send + Sync

Defines the action to be executed when a touch sequence is cancelled.

This happens when the compositer recognises the sequence as a special sequence that it will interpret itself.

All current touch points are cancelled and their ids released (and thus can be used for new touch points).

Trait Implementations

impl Send for Touch

impl Sync for Touch

impl Drop for Touch

fn drop(&mut self)

impl FFI for Touch

type Ptr = wl_touch

fn ptr(&self) -> *const wl_touch

unsafe fn ptr_mut(&self) -> *mut wl_touch