Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ITouchActionHandler Class Reference

Interface defining all supported touch action events. More...

#include <ITouchActionHandler.h>

Inheritance diagram for ITouchActionHandler:
CGenericTouchActionHandler ITouchInputHandling IGenericTouchGestureDetector ITouchInputHandler CGenericTouchPinchDetector CGenericTouchRotateDetector CGenericTouchSwipeDetector CGenericTouchInputHandler

Public Member Functions

virtual ~ITouchActionHandler ()=default
 
virtual void OnTouchAbort ()
 A touch action has been aborted.
 
virtual bool OnSingleTouchStart (float x, float y)
 A single touch has started.
 
virtual bool OnSingleTouchHold (float x, float y)
 A single touch has been held down for a certain amount of time.
 
virtual bool OnSingleTouchMove (float x, float y, float offsetX, float offsetY, float velocityX, float velocityY)
 A single touch has moved.
 
virtual bool OnSingleTouchEnd (float x, float y)
 A single touch has been lifted.
 
virtual bool OnMultiTouchDown (float x, float y, int32_t pointer)
 An additional touch has been performed.
 
virtual bool OnMultiTouchHold (float x, float y, int32_t pointers=2)
 Multiple simultaneous touches have been held down for a certain amount of time.
 
virtual bool OnMultiTouchMove (float x, float y, float offsetX, float offsetY, float velocityX, float velocityY, int32_t pointer)
 A touch has moved.
 
virtual bool OnMultiTouchUp (float x, float y, int32_t pointer)
 A touch has been lifted (but there are still active touches)
 
virtual bool OnTouchGestureStart (float x, float y)
 A pan gesture with a single touch has been started.
 
virtual bool OnTouchGesturePan (float x, float y, float offsetX, float offsetY, float velocityX, float velocityY)
 A pan gesture with a single touch is in progress.
 
virtual bool OnTouchGestureEnd (float x, float y, float offsetX, float offsetY, float velocityX, float velocityY)
 A pan gesture with a single touch has ended.
 
virtual void OnTap (float x, float y, int32_t pointers=1)
 A tap with a one or more touches has been performed.
 
virtual void OnLongPress (float x, float y, int32_t pointers=1)
 One or more touches have been held down for a certain amount of time.
 
virtual void OnSwipe (TouchMoveDirection direction, float xDown, float yDown, float xUp, float yUp, float velocityX, float velocityY, int32_t pointers=1)
 One or more touches has been moved quickly in a single direction in a short time.
 
virtual void OnZoomPinch (float centerX, float centerY, float zoomFactor)
 Two simultaneous touches have been held down and moved to perform a zooming/pinching gesture.
 
virtual void OnRotate (float centerX, float centerY, float angle)
 Two simultaneous touches have been held down and moved to perform a rotating gesture.
 

Detailed Description

Interface defining all supported touch action events.

Constructor & Destructor Documentation

◆ ~ITouchActionHandler()

virtual ITouchActionHandler::~ITouchActionHandler ( )
virtualdefault

Member Function Documentation

◆ OnLongPress()

virtual void ITouchActionHandler::OnLongPress ( float x,
float y,
int32_t pointers = 1 )
inlinevirtual

One or more touches have been held down for a certain amount of time.

Parameters
xThe x coordinate (with sub-pixel) of the touch
yThe y coordinate (with sub-pixel) of the touch
pointersThe number of pointers involved (default 1)
Returns
True if the event was handled otherwise false
See also
OnSingleTouchHold

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.

◆ OnMultiTouchDown()

virtual bool ITouchActionHandler::OnMultiTouchDown ( float x,
float y,
int32_t pointer )
inlinevirtual

An additional touch has been performed.

Parameters
xThe x coordinate (with sub-pixel) of the touch
yThe y coordinate (with sub-pixel) of the touch
pointerThe pointer that has performed the touch
Returns
True if the event was handled otherwise false

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.

◆ OnMultiTouchHold()

virtual bool ITouchActionHandler::OnMultiTouchHold ( float x,
float y,
int32_t pointers = 2 )
inlinevirtual

Multiple simultaneous touches have been held down for a certain amount of time.

Parameters
xThe x coordinate (with sub-pixel) of the touch
yThe y coordinate (with sub-pixel) of the touch
pointersThe number of pointers involved (default 2)
Returns
True if the event was handled otherwise false

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.

◆ OnMultiTouchMove()

virtual bool ITouchActionHandler::OnMultiTouchMove ( float x,
float y,
float offsetX,
float offsetY,
float velocityX,
float velocityY,
int32_t pointer )
inlinevirtual

A touch has moved.

Parameters
xThe x coordinate (with sub-pixel) of the current touch
yThe y coordinate (with sub-pixel) of the current touch
offsetXThe covered distance on the x axis (with sub-pixel)
offsetXThe covered distance on the y axis (with sub-pixel)
velocityXThe velocity of the gesture in x direction (pixels/second)
velocityXThe velocity of the gesture in y direction (pixels/second)
pointerThe pointer that has performed the touch
Returns
True if the event was handled otherwise false

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.

◆ OnMultiTouchUp()

virtual bool ITouchActionHandler::OnMultiTouchUp ( float x,
float y,
int32_t pointer )
inlinevirtual

A touch has been lifted (but there are still active touches)

Parameters
xThe x coordinate (with sub-pixel) of the touch
yThe y coordinate (with sub-pixel) of the touch
pointerThe pointer that has performed the touch
Returns
True if the event was handled otherwise false

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.

◆ OnRotate()

virtual void ITouchActionHandler::OnRotate ( float centerX,
float centerY,
float angle )
inlinevirtual

Two simultaneous touches have been held down and moved to perform a rotating gesture.

Parameters
centerXThe x coordinate (with sub-pixel) of the center of the two touches
centerYThe y coordinate (with sub-pixel) of the center of the two touches
angleThe clockwise angle in degrees of the rotation
Returns
True if the event was handled otherwise false

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.

◆ OnSingleTouchEnd()

virtual bool ITouchActionHandler::OnSingleTouchEnd ( float x,
float y )
inlinevirtual

A single touch has been lifted.

Parameters
xThe x coordinate (with sub-pixel) of the touch
yThe y coordinate (with sub-pixel) of the touch
Returns
True if the event was handled otherwise false
See also
OnSingleTap

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.

◆ OnSingleTouchHold()

virtual bool ITouchActionHandler::OnSingleTouchHold ( float x,
float y )
inlinevirtual

A single touch has been held down for a certain amount of time.

Parameters
xThe x coordinate (with sub-pixel) of the touch
yThe y coordinate (with sub-pixel) of the touch
Returns
True if the event was handled otherwise false
See also
OnSingleLongPress

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.

◆ OnSingleTouchMove()

virtual bool ITouchActionHandler::OnSingleTouchMove ( float x,
float y,
float offsetX,
float offsetY,
float velocityX,
float velocityY )
inlinevirtual

A single touch has moved.

Parameters
xThe x coordinate (with sub-pixel) of the current touch
yThe y coordinate (with sub-pixel) of the current touch
offsetXThe covered distance on the x axis (with sub-pixel)
offsetXThe covered distance on the y axis (with sub-pixel)
velocityXThe velocity of the gesture in x direction (pixels/second)
velocityXThe velocity of the gesture in y direction (pixels/second)
Returns
True if the event was handled otherwise false
See also
OnTouchGesturePan

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.

◆ OnSingleTouchStart()

virtual bool ITouchActionHandler::OnSingleTouchStart ( float x,
float y )
inlinevirtual

A single touch has started.

Parameters
xThe x coordinate (with sub-pixel) of the touch
yThe y coordinate (with sub-pixel) of the touch
Returns
True if the event was handled otherwise false
See also
OnSingleTap

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.

◆ OnSwipe()

virtual void ITouchActionHandler::OnSwipe ( TouchMoveDirection direction,
float xDown,
float yDown,
float xUp,
float yUp,
float velocityX,
float velocityY,
int32_t pointers = 1 )
inlinevirtual

One or more touches has been moved quickly in a single direction in a short time.

Parameters
directionThe direction (left, right, up, down) of the swipe gesture
xDownThe x coordinate (with sub-pixel) of the first touch
yDownThe y coordinate (with sub-pixel) of the first touch
xUpThe x coordinate (with sub-pixel) of the last touch
yUpThe y coordinate (with sub-pixel) of the last touch
velocityXThe velocity of the gesture in x direction (pixels/second)
velocityXThe velocity of the gesture in y direction (pixels/second)
pointersThe number of pointers involved (default 1)
Returns
True if the event was handled otherwise false

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.

◆ OnTap()

virtual void ITouchActionHandler::OnTap ( float x,
float y,
int32_t pointers = 1 )
inlinevirtual

A tap with a one or more touches has been performed.

Parameters
xThe x coordinate (with sub-pixel) of the touch
yThe y coordinate (with sub-pixel) of the touch
pointersThe number of pointers involved (default 1)
Returns
True if the event was handled otherwise false

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.

◆ OnTouchAbort()

virtual void ITouchActionHandler::OnTouchAbort ( )
inlinevirtual

A touch action has been aborted.

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.

◆ OnTouchGestureEnd()

virtual bool ITouchActionHandler::OnTouchGestureEnd ( float x,
float y,
float offsetX,
float offsetY,
float velocityX,
float velocityY )
inlinevirtual

A pan gesture with a single touch has ended.

Parameters
xThe x coordinate (with sub-pixel) of the current touch
yThe y coordinate (with sub-pixel) of the current touch
offsetXThe covered distance on the x axis (with sub-pixel)
offsetXThe covered distance on the y axis (with sub-pixel)
velocityXThe velocity of the gesture in x direction (pixels/second)
velocityXThe velocity of the gesture in y direction (pixels/second)
Returns
True if the event was handled otherwise false

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.

◆ OnTouchGesturePan()

virtual bool ITouchActionHandler::OnTouchGesturePan ( float x,
float y,
float offsetX,
float offsetY,
float velocityX,
float velocityY )
inlinevirtual

A pan gesture with a single touch is in progress.

Parameters
xThe x coordinate (with sub-pixel) of the current touch
yThe y coordinate (with sub-pixel) of the current touch
offsetXThe covered distance on the x axis (with sub-pixel)
offsetXThe covered distance on the y axis (with sub-pixel)
velocityXThe velocity of the gesture in x direction (pixels/second)
velocityXThe velocity of the gesture in y direction (pixels/second)
Returns
True if the event was handled otherwise false

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.

◆ OnTouchGestureStart()

virtual bool ITouchActionHandler::OnTouchGestureStart ( float x,
float y )
inlinevirtual

A pan gesture with a single touch has been started.

Parameters
xThe x coordinate (with sub-pixel) of the initial touch
yThe y coordinate (with sub-pixel) of the initial touch
Returns
True if the event was handled otherwise false

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.

◆ OnZoomPinch()

virtual void ITouchActionHandler::OnZoomPinch ( float centerX,
float centerY,
float zoomFactor )
inlinevirtual

Two simultaneous touches have been held down and moved to perform a zooming/pinching gesture.

Parameters
centerXThe x coordinate (with sub-pixel) of the center of the two touches
centerYThe y coordinate (with sub-pixel) of the center of the two touches
zoomFactorThe zoom (> 1.0) or pinch (< 1.0) factor of the two touches
Returns
True if the event was handled otherwise false

Reimplemented in CGenericTouchActionHandler, and ITouchInputHandling.


The documentation for this class was generated from the following file: