API for Touch Inputs¶
Part of the Object based program API.
- class TouchInputApi¶
API to create touch input actions
Returned by
-
CreateHold(posX=
'0', posY='0', duration='1.0', prompt=None)¶ Create a new hold input action object.
To set parameters in different units, first create the action and then call the setter methods on the
Holdobject.
-
CreateHoldAndSwipe(startX=
'0', startY='0', endX='0', endY='0', holdDuration='1.0', swipeDuration='1.0', prompt=None)¶ Create a new hold-and-swipe input action object.
To set parameters in different units, first create the action and then call the setter methods on the
HoldAndSwipeobject.- Parameters:
- startX : str¶
Starting pixel position of first coordinate
- startY : str¶
Starting pixel position of second coordinate
- endX : str¶
Final pixel position of first coordinate
- endY : str¶
Final pixel position of second coordinate
- holdDuration : str¶
Duration of initial hold in seconds
- swipeDuration : str¶
Duration of swipe gesture in seconds
- prompt : str¶
Prompt text to use instead of coordinates
- Returns:
A new hold-and-swipe object
- Return type:
-
CreateMultiSwipe(startX=
'0', startY='0', endX='0', endY='0', duration='1.0', fingerCount='2', distance='10', prompt=None)¶ Create a new multiswipe input action object.
To set parameters in different units, first create the action and then call the setter methods on the
MultiSwipeobject.- Parameters:
- startX : str¶
Starting pixel position of first coordinate
- startY : str¶
Starting pixel position of second coordinate
- endX : str¶
Final pixel position of first coordinate
- endY : str¶
Final pixel position of second coordinate
- duration : str¶
Duration of gesture in seconds
- fingerCount : str¶
Number of fingers performing the swipe
- distance : str¶
Mean Euclidean pixel distance between fingers
- prompt : str¶
Prompt text to use instead of coordinates
- Returns:
A new multiswipe object
- Return type:
-
CreateMultiTap(posX=
'0', posY='0', count='2', interval='1.0', prompt=None)¶ Create a new multitap input action object.
To set parameters in different units, first create the action and then call the setter methods on the
MultiTapobject.- Parameters:
- Returns:
A new multitap object
- Return type:
-
CreatePinch(pos1X=
'0', pos1Y='0', pos2X='0', pos2Y='0', duration='1.0', scale='1.5', prompt=None)¶ Create a new pinch input action object.
To set parameters in different units, first create the action and then call the setter methods on the
Pinchobject.- Parameters:
- pos1X : str¶
x-coordinate of first finger’s pixel position
- pos1Y : str¶
y-coordinate of first finger’s pixel position
- pos2X : str¶
x-coordinate of second finger’s pixel position
- pos2Y : str¶
y-coordinate of second finger’s pixel position
- duration : str¶
Duration of gesture in seconds
- scale : str¶
Scaling factor of gesture
- prompt : str¶
Prompt text to use instead of coordinates
- Returns:
A new pinch object
- Return type:
-
CreateRotate(pos1X=
'0', pos1Y='0', pos2X='0', pos2Y='0', duration='1.0', angle='90', prompt=None)¶ Create a new rotate input action object.
To set parameters in different units, first create the action and then call the setter methods on the
Rotateobject.- Parameters:
- pos1X : str¶
x-coordinate of first finger’s pixel position
- pos1Y : str¶
y-coordinate of first finger’s pixel position
- pos2X : str¶
x-coordinate of second finger’s pixel position
- pos2Y : str¶
y-coordinate of second finger’s pixel position
- duration : str¶
Duration of gesture in seconds
- angle : str¶
Rotation angle in degree
- prompt : str¶
Prompt text to use instead of coordinates
- Returns:
A new rotate object
- Return type:
-
CreateSwipe(startX=
'0', startY='0', endX='10', endY='10', duration='1.0', prompt=None)¶ Create a new swipe input action object.
To set parameters in different units, first create the action and then call the setter methods on the
Swipeobject.- Parameters:
- startX : str¶
Starting pixel position of first coordinate
- startY : str¶
Starting pixel position of second coordinate
- endX : str¶
Final pixel position of first coordinate
- endY : str¶
Final pixel position of second coordinate
- duration : str¶
Duration of gesture in seconds
- prompt : str¶
Prompt text to use instead of coordinates
- Returns:
A new swipe object
- Return type:
-
CreateHold(posX=