touch screen handler for the microchip AR1020

Embed: (wiki syntax)

« Back to documentation index

AreaTouchHandler Class Reference

AreaTouchHandler Class Reference

this class registers itself with a touch screen controller, and listens for touch events. More...

#include <AreaTouchHandler.h>

Public Member Functions

 AreaTouchHandler (TouchPanel *panel)
 creates the handler, and attaches it to the given touch panel pane the touch panel to listen to
void attach (uint32_t(*function)(uint32_t))
 set the callback method function the callback function
void addArea (int top, int bottom, int left, int right, int commandCode)
 defines the command for a specific region top the top of the region (y) bottom the bottom of the region (y) the left side of the region (x) the right side of the region (x) the command code for this region

Detailed Description

this class registers itself with a touch screen controller, and listens for touch events.

If an event matches a prefined region, the callback function is called with the corresponding command code.

Definition at line 38 of file AreaTouchHandler.h.


Constructor & Destructor Documentation

AreaTouchHandler ( TouchPanel *  panel )

creates the handler, and attaches it to the given touch panel pane the touch panel to listen to

Definition at line 43 of file AreaTouchHandler.cpp.


Member Function Documentation

void addArea ( int  top,
int  bottom,
int  left,
int  right,
int  commandCode 
)

defines the command for a specific region top the top of the region (y) bottom the bottom of the region (y) the left side of the region (x) the right side of the region (x) the command code for this region

Definition at line 50 of file AreaTouchHandler.cpp.

void attach ( uint32_t(*)(uint32_t)  function )

set the callback method function the callback function

Definition at line 58 of file AreaTouchHandler.h.