ITouchSystem

class mono::ITouchSystem

Interface for the Touch sub-system

Subclassed by mono::MonoTouchSystem

Public Functions

virtual void init() = 0

Initialize the touch system controller.

NOTE: This method is called by the current IApplicationContext automatically upon reset. You should call this manually.

virtual void processTouchInput() = 0

Sample the touch inputs and dispatch events if needed.

This AppRunLoop calls this method automatically on each cycle. If you wish to limit the sample frequency, your subclass must manually abort some calls to this method.

Note: Inactive touch systems must ignores calls to this method.

virtual int ToScreenCoordsX(int touchPos, uint16_t screenWidth) = 0

Sub-classes must convert corrdinates to screen pixels (X axis)

virtual int ToScreenCoordsY(int touchPos, uint16_t screenHeight) = 0

Sub-classes must convert corrdinates to screen pixels (Y axis)

virtual TouchCalibration CurrentCalibration() = 0

Get the touch systems current calibration config.

virtual void setCalibration(TouchCalibration &cal) = 0

Set a new calibration config on the touch system.

virtual void activate()

Activate (enables) the touch system.

virtual void deactivate()

Deactivates (disables) the touch system.

virtual bool isActive() const

Retuern true if touch system is active.

Protected Functions

void runTouchBegin(geo::Point &pos)

Run the system system handlers of the begin touch event.

NOTE: You should not call this method manually. It is used by the sub- class of this interface.

Parameters
  • pos: The begin event position on the screen

void runTouchMove(geo::Point &pos)

Run the system system handlers of the move touch event.

NOTE: You should not call this method manually. It is used by the sub- class of this interface.

Parameters
  • pos: The move event position on the screen

void runTouchEnd(geo::Point &pos)

Run the system system handlers of the end touch event.

NOTE: You should not call this method manually. It is used by the sub- class of this interface.

Parameters
  • pos: The end event position on the screen