GUIslice  0.16.0
Embedded GUI in C
Touchscreen Functions

Functions that configure and respond to a touch device. More...

Macros

#define TOUCH_ROTATION_DATA
 Additional definitions for Touch Handling These macros define the transforms used in remapping the touchscreen inputs on the basis of the GUI nRotation setting. More...
 
#define TOUCH_ROTATION_DATA
 Additional definitions for Touch Handling These macros define the transforms used in remapping the touchscreen inputs on the basis of the GUI nRotation setting. More...
 
#define TOUCH_ROTATION_SWAPXY(rotation)
 
#define TOUCH_ROTATION_SWAPXY(rotation)
 
#define TOUCH_ROTATION_FLIPX(rotation)
 
#define TOUCH_ROTATION_FLIPX(rotation)
 
#define TOUCH_ROTATION_FLIPY(rotation)
 
#define TOUCH_ROTATION_FLIPY(rotation)
 

Functions

bool gslc_InitTouch (gslc_tsGui *pGui, const char *acDev)
 Initialize the touchscreen device driver. More...
 
bool gslc_GetTouch (gslc_tsGui *pGui, int16_t *pnX, int16_t *pnY, uint16_t *pnPress, gslc_teInputRawEvent *peInputEvent, int16_t *pnInputVal)
 Initialize the touchscreen device driver. More...
 
void gslc_SetTouchRemapEn (gslc_tsGui *pGui, bool bEn)
 Configure touchscreen remapping. More...
 
void gslc_SetTouchRemapCal (gslc_tsGui *pGui, uint16_t nXMin, uint16_t nXMax, uint16_t nYMin, uint16_t nYMax)
 Configure touchscreen calibration remapping values. More...
 
void gslc_SetTouchPressCal (gslc_tsGui *pGui, uint16_t nPressMin, uint16_t nPressMax)
 Configure touchscreen calibration pressure values. More...
 
void gslc_SetTouchRemapYX (gslc_tsGui *pGui, bool bSwap)
 Configure touchscreen XY swap. More...
 

Detailed Description

Functions that configure and respond to a touch device.

Macro Definition Documentation

#define TOUCH_ROTATION_DATA

Additional definitions for Touch Handling These macros define the transforms used in remapping the touchscreen inputs on the basis of the GUI nRotation setting.

#define TOUCH_ROTATION_DATA

Additional definitions for Touch Handling These macros define the transforms used in remapping the touchscreen inputs on the basis of the GUI nRotation setting.

#define TOUCH_ROTATION_FLIPX (   rotation)
#define TOUCH_ROTATION_FLIPX (   rotation)
#define TOUCH_ROTATION_FLIPY (   rotation)
#define TOUCH_ROTATION_FLIPY (   rotation)
#define TOUCH_ROTATION_SWAPXY (   rotation)
#define TOUCH_ROTATION_SWAPXY (   rotation)

Function Documentation

bool gslc_GetTouch ( gslc_tsGui pGui,
int16_t *  pnX,
int16_t *  pnY,
uint16_t *  pnPress,
gslc_teInputRawEvent peInputEvent,
int16_t *  pnInputVal 
)

Initialize the touchscreen device driver.

Parameters
[in]pGuiPointer to GUI
[out]pnXPtr to int to contain latest touch X coordinate
[out]pnYPtr to int to contain latest touch Y coordinate
[out]pnPressPtr to int to contain latest touch pressure value
[out]peInputEventIndication of event type
[out]pnInputValAdditional data for event type
Returns
true if touch event, false otherwise
bool gslc_InitTouch ( gslc_tsGui pGui,
const char *  acDev 
)

Initialize the touchscreen device driver.

Parameters
[in]pGuiPointer to GUI
[in]acDevDevice path to touchscreen (or "" if not applicable)) eg. "/dev/input/touchscreen"
Returns
true if successful
void gslc_SetTouchPressCal ( gslc_tsGui pGui,
uint16_t  nPressMin,
uint16_t  nPressMax 
)

Configure touchscreen calibration pressure values.

  • Only used if calibration remapping has been enabled
Parameters
[in]pGuiPointer to GUI
[in]nPressMinResistive touchscreen pressure min value
[in]nPressMaxResistive touchscreen pressure max value
Returns
none
void gslc_SetTouchRemapCal ( gslc_tsGui pGui,
uint16_t  nXMin,
uint16_t  nXMax,
uint16_t  nYMin,
uint16_t  nYMax 
)

Configure touchscreen calibration remapping values.

  • Only used if calibration remapping has been enabled
Parameters
[in]pGuiPointer to GUI
[in]nXMinResistive touchscreen X_MIN calibration value
[in]nXMaxResistive touchscreen X_MAX calibration value
[in]nYMinResistive touchscreen Y_MIN calibration value
[in]nYMaxResistive touchscreen Y_MAX calibration value
Returns
none
void gslc_SetTouchRemapEn ( gslc_tsGui pGui,
bool  bEn 
)

Configure touchscreen remapping.

Parameters
[in]pGuiPointer to GUI
[in]bEnEnable touchscreen remapping?
Returns
none
void gslc_SetTouchRemapYX ( gslc_tsGui pGui,
bool  bSwap 
)

Configure touchscreen XY swap.

Parameters
[in]pGuiPointer to GUI
[in]bSwapEnable touchscreen XY swap
Returns
none