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 Hold object.

Parameters:
posX : str

Pixel position of first coordinate

posY : str

Pixel position of second coordinate

duration : str

Hold duration in seconds

prompt : str

Prompt text to use instead of coordinates

Returns:

A new hold object

Return type:

Hold

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 HoldAndSwipe object.

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:

HoldAndSwipe

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 MultiSwipe object.

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:

MultiSwipe

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 MultiTap object.

Parameters:
posX : str

Pixel position of first coordinate

posY : str

Pixel position of second coordinate

count : str

Number of successive taps

interval : str

Time interval between successive taps in seconds

prompt : str

Prompt text to use instead of coordinates

Returns:

A new multitap object

Return type:

MultiTap

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 Pinch object.

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:

Pinch

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 Rotate object.

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:

Rotate

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 Swipe object.

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:

Swipe

CreateTap(posX='0', posY='0', prompt=None)

Create a new tap input action object.

To set parameters in different units, first create the action and then call the setter methods on the Tap object.

Parameters:
posX : str

Pixel position of first coordinate

posY : str

Pixel position of second coordinate

prompt : str

Prompt text to use instead of coordinates

Returns:

A new tap object

Return type:

Tap