/*************************************************************/ /** TouchLib - touch library for fx-9860G **/ /** TouchLib is free software **/ /** **/ /** @author Louis Gatin (Dark-Storm) **/ /** @contact l.gatin@neuf.fr **/ /** **/ /** @file TouchLib.h **/ /** Include header for TouchLib **/ /** **/ /** @date 12-22-2012 **/ /*************************************************************/ #ifndef _TOUCHLIB #define _TOUCHLIB #include "fxlib.h" #define TL_GET_TOUCH_ROUND 4 // number of keys used for position's rounding. More it is smaller, is fast. Must be > 0 typedef struct TL_Point TL_Point; struct TL_Point { int x; int y; }; void TL_getTouchXY(TL_Point *p); // returns values between 0 and 20 for x and y. -1 if there is any touch. void TL_waitTouchXY(int Xmin, int Xmax, int Ymin, int Ymax); // Waits a touch in an area of the "screen". void TL_getGesture(int *originX, int *originY, int *displacementX, int *displacementY, int speed); // returns origin and relative movement of a gesture. //TL_Point *TL_getSeveralTouchs(int points); // Returns pointer on a 2*points table void TL_waitGesture(int originX_min, int originX_max, int originY_min, int originY_max, int displacementX_min, int displacementX_max, int displacementY_min, int displacementY_max, int speed); // Waits a gesture defined by its origin and his direction. int TL_average(int *tableau, int taille); // using for most of the functions. #endif