Skip to content

tommy-gilligan/touchscreen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Touchscreen

touchscreen on crates.io touchscreen on docs.rs

A touchscreen is just a screen that you can touch. Central to this crate is the Touchscreen trait:

pub trait Touchscreen:
    embedded_graphics_core::prelude::DrawTarget +
    embedded_graphics_core::prelude::OriginDimensions {
        type TouchError;

        fn get_touch_event(&mut self) -> Result<Option<TouchEvent>, Self::TouchError>;
    }

It is overly simple right now, it is more of a tentative starting point. There are 2 implementations, which can be selected by feature flags:

  • xpt2046-screen: A screen that combines XPT2046 (touch) with arbitrary embedded-graphics DrawTarget.
  • web-screen: A screen that marries WebSimulatorDisplay with mouse event handlers bound to a container element.
  • sdl-screen: SimulatorDisplay adapted to Touchscreen. Unfinished

Todo

  • Support touchscreens that can signal touch with interrupt
  • Finish SDL touchscreen
  • Clean up web_screen, propagate mouse handling errors

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages