Skip to main content
Version: 4.16

GestureEvent

A gesture event. The only gesture events currently supported is SWIPE_HORIZONTAL and SWIPE_VERTICAL, which will be issued every time the input system detects a swipe.

See: Event

Inherits from: Event

Public Types#

enumGestureEventType { SWIPE_HORIZONTAL, SWIPE_VERTICAL }
Values that represent gesture types.

Public Functions#

GestureEvent(GestureEventType type, int16_t velocity, int16_t x, int16_t y)
Constructor.
virtual Event::EventTypegetEventType()
Gets event type.
GestureEventTypegetType() const
Gets the type of this gesture event.
int16_tgetVelocity() const
Gets the velocity of this gesture event.
int16_tgetX() const
Gets the x coordinate of this gesture event.
int16_tgetY() const
Gets the y coordinate of this gesture event.

Additional inherited members#

Public Types inherited from Event#

enumEventType { EVENT_CLICK, EVENT_DRAG, EVENT_GESTURE }
The event types.

Public Functions inherited from Event#

virtual ~Event()
Finalizes an instance of the Event class.

Public Types Documentation#

GestureEventType#

Values that represent gesture types.

SWIPE_HORIZONTALAn enum constant representing a horizontal swipe.
SWIPE_VERTICALAn enum constant representing a vertical swipe.

Public Functions Documentation#

GestureEvent#

GestureEvent(GestureEventTypetype ,
int16_tvelocity ,
int16_tx ,
int16_ty
)

Constructor.

Create a gesture event of the specified type with the specified coordinates.

Parameters:
typeThe type of the gesture event.
velocityThe velocity of this gesture (swipe)
xThe x coordinate of the gesture.
yThe y coordinate of the gesture.

getEventType#

virtual Event::EventType getEventType()

Gets event type.

Returns:

The type of this event.

Reimplements: touchgfx::Event::getEventType

getType#

GestureEventType getType()const

Gets the type of this gesture event.

Returns:

The type of this gesture event.

getVelocity#

int16_t getVelocity()const

Gets the velocity of this gesture event.

Returns:

The velocity of this gesture event.

getX#

int16_t getX()const

Gets the x coordinate of this gesture event.

Returns:

The x coordinate of this gesture event.

getY#

int16_t getY()const

Gets the y coordinate of this gesture event.

Returns:

The y coordinate of this gesture event.