10#ifndef TouchScreenAdapter_h
11#define TouchScreenAdapter_h
A lightweight abstract Abstract class for touch screen panels.
Definition: TouchScreenAdapter.h:19
virtual TouchScreenAdapter::TouchPoint getTouchPointRaw(void)=0
Get a TouchPoint struct containing raw values from the underlying library.
void setRotation(uint8_t r)
Set the rotation touch screen.
Definition: TouchScreenAdapter.h:134
uint16_t displayHeight
The (optionally rotated) height of the display in pixels.
Definition: TouchScreenAdapter.h:162
virtual bool begin(void)=0
For compatibility with the Arduino library convention.
uint16_t displayWidth
The (optionally rotated) width of the display in pixels.
Definition: TouchScreenAdapter.h:161
uint8_t rotation
The current rotation of the touch panel. Default is 0 (native orientation).
Definition: TouchScreenAdapter.h:156
uint16_t DISPLAY_HEIGHT
The non-rotated height of the display in pixels.
Definition: TouchScreenAdapter.h:159
void setDisplayHeight(uint16_t heightPx)
Set the native (non-rotated) display height (Y) in pixels.
Definition: TouchScreenAdapter.h:89
void setDisplayWidth(uint16_t widthPx)
Set the native (non-rotated) display width (X) in pixels.
Definition: TouchScreenAdapter.h:76
virtual TouchScreenAdapter::TouchPoint getTouchPoint(void)=0
Get the TouchPoint object.
uint16_t DISPLAY_WIDTH
The non-rotated width of the display in pixels.
Definition: TouchScreenAdapter.h:158
A consistent struct containing points X & Y plus Z as pressure.
Definition: TouchScreenAdapter.h:27
TouchPoint(void)
Construct a new Touch Point object.
Definition: TouchScreenAdapter.h:33
uint16_t x
Mapped 0 to screen width -1.
Definition: TouchScreenAdapter.h:47
uint16_t y
Mapped 0 to screen height -1.
Definition: TouchScreenAdapter.h:48
uint16_t z
Mapped 0-255 representing pressure (0 = not touched). is uint16_t because raw is odten > 255.
Definition: TouchScreenAdapter.h:49
TouchPoint & operator=(const TouchPoint &tp)
Assignment operator.
Definition: TouchScreenAdapter.h:57
TouchPoint(int16_t _x, int16_t _y, int16_t _z)
Construct a new Touch Point object.
Definition: TouchScreenAdapter.h:42