[][src]Trait kernel::hil::touch::MultiTouch

pub trait MultiTouch<'a> {
    fn enable(&self) -> ReturnCode;
fn disable(&self) -> ReturnCode;
fn get_num_touches(&self) -> usize;
fn get_touch(&self, index: usize) -> Option<TouchEvent>;
fn set_client(&self, multi_touch_client: &'a dyn MultiTouchClient); }

Multi-touch panels should implement this

Required methods

fn enable(&self) -> ReturnCode

Enable the touche panel

returns SUCCESS even if device is already enabled

fn disable(&self) -> ReturnCode

Disable the touch panel

returns SUCCESS even if device is already disabled

fn get_num_touches(&self) -> usize

Returns the number of maximum concurently supported touches.

fn get_touch(&self, index: usize) -> Option<TouchEvent>

Returns the touch event at index or None.

This function must be called in the same interrupt as the event, otherwise data might not be available.

fn set_client(&self, multi_touch_client: &'a dyn MultiTouchClient)

Set the multi-touch client

Loading content...

Implementors

Loading content...