touchgfx::Gestures is only used within TouchGFX.
 
Symbols
loading...
Files
loading...

touchgfx::Gestures class

@class Gestures Gestures.hpp touchgfx/hal/Gestures.hpp This class implements the detection of gestures. This class implements the detection of gestures.

Syntax

class Gestures {     static const uint8_t MAX_TICKS_BETWEEN_MOVES_FOR_SWIPE = 7;     static const uint8_t MIN_VELOCITY_AT_RELEASE_BEFORE_SWIPE = 3;     struct DragState     {         DragState() : startX(0),             startY(0),             downX(0),             downY(0),             tickCount(0),             velocityX(0),             velocityY(0),             inProgress(false)         {         }         uint16_t startX;              uint16_t startY;              uint16_t downX;               uint16_t downY;               uint16_t tickCount;           int16_t  velocityX;           int16_t  velocityY;           bool     inProgress;      }; public:     Gestures() : listener(0), dragThresholdValue(0) { }     void registerEventListener(UIEventListener& l);     void tick();     bool registerDragEvent(uint16_t oldX, uint16_t oldY, uint16_t newX, uint16_t newY);     void registerClickEvent(ClickEvent::ClickEventType evt, uint16_t x, uint16_t y);     void setDragThreshold(uint16_t val)     {         dragThresholdValue = val;     } private:     DragState        drag;     UIEventListener* listener;     uint16_t         dragThresholdValue; };

Fields

MAX_TICKS_BETWEEN_MOVES_FOR_SWIPE

No summary provided. Read more...

MIN_VELOCITY_AT_RELEASE_BEFORE_SWIPE

No summary provided. Read more...

drag

No summary provided. Read more...

listener

No summary provided. Read more...

dragThresholdValue

No summary provided. Read more...

Methods

registerEventListener()

@fn void Gestures::registerEventListener(UIEventListener& l); Register the event listener. Register the event listener. Read more...

tick()

@fn void Gestures::tick(); Has to be called during the timer tick. Has to be called during the timer tick. Read more...

registerDragEvent()

@fn bool Gestures::registerDragEvent(uint16_t oldX, uint16_t oldY, uint16_t newX, uint16_t newY); Register a drag event. Register a drag event. Read more...

registerClickEvent()

@fn void Gestures::registerClickEvent(ClickEvent::ClickEventType evt, uint16_t x, uint16_t y); Register a click event and figure out if this is a drag event, too. Register a click event and figure out if this is a drag event, too. Read more...

setDragThreshold()

@fn void Gestures::setDragThreshold(uint16_t val) Configure the threshold for reporting drag events. Configure the threshold for reporting drag events. A touch input movement must exceed this value in either axis in order to report a drag. Default value is 0. Read more...

References

LocationReferrerScopeText
Gestures.hpp:34
class Gestures
HAL.hpp:1234touchgfx::HAL::gesturestouchgfx::HAL
Gestures gestures; ///< Class for low-level interpretation of touch events.

Type Use

Variables of touchgfx::Gestures type
all items filtered out
touchgfx::Gestures