VTIL_Touch, VTIL_PointingEventMsg
Valid for: CANoe DE • CANoe4SW DEFunction Syntax
long VTIL_Touch(dword x, dword y, dword duration); // form 1long VTIL_Touch(dbNode vt, dword x, dword y, dword duration); // form 2long VTIL_PointingEventMsg(dword x, dword y, byte touchState); // form 3long VTIL_PointingEventMsg(dbNode vt, dword x, dword y, byte touchState); // form 4long VTIL_PointingEventMsg(dword x, dword y, byte touchState, dword parentMaskId); // form 5long VTIL_PointingEventMsg(dbNode vt, dword x, dword y, byte touchState, dword parentMaskId); // form 6
Description
Touches into the Data Mask. The VTIL_Touch methods simulate a touch into the Data Mask and a release of the touch event after the duration. As a result, the Pointing Event Message is sent immediately with the touch state = pressed, then every 200 ms with the touch state = Held and after the duration with the touch state = Released. If there is a button or input object at the specified position, the button or object is selected and pressed. The VTIL_PointingEventMsg methods only send the Pointing Event Message (without influencing any button or input object and without triggering any event in the Virtual Terminal). You can use it to implement dragging operation.Parameters
- vt: VT simulation node to apply the function
- x: X Position in pixels relative to top left corner of Data Mask area
- y: Y Position in pixels relative to top left corner of Data Mask area
- duration: Time while the Data Mask is pressed [ms]. If duration is 0 then only the command Pressed is sent. Else the commands Held and Released are sent too.
- touchState:
- 0: Released
- 1: Pressed
- 2: Held
- 255: Used by VTs of version 3 or prior
- parentMaskId: Current Parent Mask Object ID (used by VTs of version 6 and later)
Return Values
- 0: Blocking of all messages has been stopped successfully
- < 0: An error has occurred, see IL Error Code.