[][src]Struct crosvm::TouchDeviceOption

pub struct TouchDeviceOption {
    path: PathBuf,
    width: Option<u32>,
    height: Option<u32>,
    default_width: u32,
    default_height: u32,
}

Fields

path: PathBufwidth: Option<u32>height: Option<u32>default_width: u32default_height: u32

Implementations

impl TouchDeviceOption[src]

pub fn new(path: PathBuf) -> TouchDeviceOption[src]

pub fn get_path(&self) -> &Path[src]

Getter for the path to the input event streams.

pub fn set_default_size(&mut self, width: u32, height: u32)[src]

When a user specifies the parameters for a touch device, width and height are optional. If the width and height are missing, default values are used. Default values can be set dynamically, for example from the display sizes specified by the gpu argument.

pub fn set_width(&mut self, width: u32)[src]

Setter for the width specified by the user.

pub fn set_height(&mut self, height: u32)[src]

Setter for the height specified by the user.

pub fn get_size(&self) -> (u32, u32)[src]

If the user specifies the size, use it. Otherwise, use the default values.

Auto Trait Implementations

impl RefUnwindSafe for TouchDeviceOption

impl Send for TouchDeviceOption

impl Sync for TouchDeviceOption

impl Unpin for TouchDeviceOption

impl UnwindSafe for TouchDeviceOption

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.