跳转到主要内容

TouchController

platform/driver/touch/TouchController.hpp

Basic Touch Controller interface.

Inherited by: I2CTouchController, NoTouchController, SDL2TouchController, SDLTouchController

Public Functions

virtual voidinit() =0
Initializes touch controller.
virtual boolsampleTouch(int32_t & x, int32_t & y) =0
Checks whether the touch screen is being touched, and if so, what coordinates.
virtual ~TouchController()
Finalizes an instance of the TouchController class.

Public Functions Documentation

init

sampleTouch

virtual bool sampleTouch(int32_t &x ,=0
int32_t &y=0
)=0

Checks whether the touch screen is being touched, and if so, what coordinates.

Parameters:
xThe x position of the touch.
yThe y position of the touch.
Returns:

True if a touch has been detected, otherwise false.

Reimplemented by: touchgfx::NoTouchController::sampleTouch, touchgfx::SDL2TouchController::sampleTouch, touchgfx::SDLTouchController::sampleTouch, touchgfx::I2CTouchController::sampleTouch

~TouchController

virtual ~TouchController()

Finalizes an instance of the TouchController class.