int TouchGetxy(int tc, int &x, int &y);

 

Get the x and y coordinates of a touch area.

 

Return Value

 

Return value not used.

 

Parameters

 

tc

Touch handle returned from TouchAdd().

 

Remarks

 

The TouchGetxy() function gets the x, y coordinates of the touch and returns them by way of the reference x, y parameters passed to the function.

 

Availability

 

Available in DragonFireSDK 1.0 and later.

 

Example

 

Description: This example will get the x, y coordinate of the Ball's location.

 

#include "DragonFireSDK.h"

 

int OnTouchArea(int id, int event, int x, int y);     //event: 1=down, 2=move, 3=up

 

void AppMain()

{

  int tc;

  int x;

  int y;

 

  tc = TouchAdd(0, 0, 100, 200, OnTouchArea, 0);

  TouchGetxy(tc, x, y);

}

 

int OnTouchArea(int id, int event, int x, int y)     //event: 1=down, 2=move, 3=up

{

  // Handle the touch event.

}

 

void AppExit()

{

 

}

 

void OnTimer()

{

 

}