CCAux  2.20.0.0
CCAux API reference
Functions
TouchScreen functions

Functions

EXTERN_C CCAUXDLL_API TOUCHSCREENHANDLE CCAUXDLL_CALLING_CONV GetTouchScreen (void)
 
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV TouchScreen_release (TOUCHSCREENHANDLE)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV TouchScreen_getMode (TOUCHSCREENHANDLE, TouchScreenModeSettings *config)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV TouchScreen_getMouseRightClickTime (TOUCHSCREENHANDLE, uint16_t *time)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV TouchScreen_setMode (TOUCHSCREENHANDLE, TouchScreenModeSettings config)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV TouchScreen_setMouseRightClickTime (TOUCHSCREENHANDLE, uint16_t time)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV TouchScreen_setAdvancedSetting (TOUCHSCREENHANDLE, TSAdvancedSettingsParameter param, uint16_t data)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV TouchScreen_getAdvancedSetting (TOUCHSCREENHANDLE, TSAdvancedSettingsParameter param, uint16_t *data)
 

Detailed Description

Functions in the TouchScreen class

Function Documentation

◆ GetTouchScreen()

EXTERN_C CCAUXDLL_API TOUCHSCREENHANDLE CCAUXDLL_CALLING_CONV CrossControl::GetTouchScreen ( void  )

Factory function that creates instances of the TouchScreen object.

Supported Platform(s): XL, XM, XS, XA

Returns
TOUCHSCREENHANDLE to an allocated TouchScreen object. The returned handle needs to be deallocated using the TouchScreen_release(TOUCHSCREENHANDLE) method when it's no longer needed. Returns NULL if it fails to allocate memory.

Example Usage:

assert(pTouchScreen);
touchscreen_example(pTouchScreen);
TouchScreen_release(pTouchScreen);
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV TouchScreen_release(TOUCHSCREENHANDLE)
EXTERN_C CCAUXDLL_API TOUCHSCREENHANDLE CCAUXDLL_CALLING_CONV GetTouchScreen(void)
void * TOUCHSCREENHANDLE
Definition: TouchScreen.h:34

◆ TouchScreen_getAdvancedSetting()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::TouchScreen_getAdvancedSetting ( TOUCHSCREENHANDLE  ,
TSAdvancedSettingsParameter  param,
uint16_t data 
)

Get advanced touch screen settings. See the description of TSAdvancedSettingsParameter for a description of the parameters.

Supported Platform(s): XL, XM, XS, XA

Parameters
paramThe setting to get.
dataThe current data for the setting.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

Example Usage:

err = TouchScreen_getAdvancedSetting(pTouchScreen, TS_DEBOUNCE_TIME, &debouncetime);
if (err == ERR_SUCCESS)
{
cout << "Touchscreen debounce time is set to: " << (int)debouncetime << " ms" << endl;
}
else
{
cout << "Error(" << err << ") in function getAdvancedSetting: " << GetErrorStringA(err) << endl;
}
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV TouchScreen_getAdvancedSetting(TOUCHSCREENHANDLE, TSAdvancedSettingsParameter param, uint16_t *data)
EXTERN_C CCAUXDLL_API char_t const *CCAUXDLL_CALLING_CONV GetErrorStringA(eErr errCode)
@ TS_DEBOUNCE_TIME
Definition: TouchScreen.h:76
@ ERR_SUCCESS
Definition: CCAuxTypes.h:163

◆ TouchScreen_getMode()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::TouchScreen_getMode ( TOUCHSCREENHANDLE  ,
TouchScreenModeSettings config 
)

Get Touch Screen mode. Gets the current mode of the USB profile.

Supported Platform(s): XL, XM, XS, XA

Parameters
configThe current mode.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

Example Usage:

err = TouchScreen_getMode(pTouchScreen, &ts_mode);
if (err == ERR_SUCCESS)
{
switch (ts_mode)
{
cout << "USB profile is set to Mouse profile (active next boot)" << endl;
break;
cout << "USB profile is set to Touch profile (active next boot)" << endl;
break;
case MOUSE_NOW:
cout << "USB profile is set to Mouse profile" << endl;
break;
case TOUCH_NOW:
cout << "USB profile is set to Touch profile" << endl;
break;
default:
cout << "Error: invalid setting returned from getMode" << endl;
break;
}
}
else if (err == ERR_NOT_SUPPORTED)
{
cout << "Function TouchScreen_getMode() is not supported on this platform" << endl;
}
else
{
cout << "Error(" << err << ") in function getMode: " << GetErrorStringA(err) << endl;
}
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV TouchScreen_getMode(TOUCHSCREENHANDLE, TouchScreenModeSettings *config)
@ TOUCH_NEXT_BOOT
Definition: TouchScreen.h:40
@ TOUCH_NOW
Definition: TouchScreen.h:42
@ MOUSE_NOW
Definition: TouchScreen.h:41
@ MOUSE_NEXT_BOOT
Definition: TouchScreen.h:39
@ ERR_NOT_SUPPORTED
Definition: CCAuxTypes.h:165

◆ TouchScreen_getMouseRightClickTime()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::TouchScreen_getMouseRightClickTime ( TOUCHSCREENHANDLE  ,
uint16_t time 
)

Get mouse right click time. Applies only to the mouse profile. Use the OS settings for the touch profile.

Supported Platform(s): XL, XM, XS, XA

Parameters
timeThe right click time, in milliseconds.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

Example Usage:

err = TouchScreen_getMouseRightClickTime(pTouchScreen, &rightclicktime);
if (err == ERR_SUCCESS)
{
cout << "Right click time is set to: " << (int)rightclicktime << " ms" << endl;
}
else
{
cout << "Error(" << err << ") in function getMouseRightClickTime: " << GetErrorStringA(err) << endl;
}
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV TouchScreen_getMouseRightClickTime(TOUCHSCREENHANDLE, uint16_t *time)

◆ TouchScreen_release()

EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV CrossControl::TouchScreen_release ( TOUCHSCREENHANDLE  )

Delete the TouchScreen object.

Supported Platform(s): XL, XM, XS, XA

Returns
-

Example Usage:

assert(pTouchScreen);
touchscreen_example(pTouchScreen);
TouchScreen_release(pTouchScreen);

◆ TouchScreen_setAdvancedSetting()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::TouchScreen_setAdvancedSetting ( TOUCHSCREENHANDLE  ,
TSAdvancedSettingsParameter  param,
uint16_t  data 
)

Set advanced touch screen settings. See the description of TSAdvancedSettingsParameter for a description of the parameters.

Supported Platform(s): XL, XM, XS, XA

Parameters
paramThe setting to set.
dataThe data value to set.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

◆ TouchScreen_setMode()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::TouchScreen_setMode ( TOUCHSCREENHANDLE  ,
TouchScreenModeSettings  config 
)

Set Touch Screen mode. Sets the mode of the USB profile.

Supported Platform(s): XL, XM, XS, XA

Parameters
configThe mode to set.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

◆ TouchScreen_setMouseRightClickTime()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::TouchScreen_setMouseRightClickTime ( TOUCHSCREENHANDLE  ,
uint16_t  time 
)

Set mouse right click time. Applies only to the mouse profile. Use the OS settings for the touch profile.

Supported Platform(s): XL, XM, XS, XA

Parameters
timeThe right click time, in milliseconds.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.