Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Determining whether a display is touch-enabled

If your application needs to handle touchscreen and non-touchscreen devices, the application will need to determine whether the device is touch-enabled at runtime.

An application can determine whether the device is touch-enabled by calling ISettings_Get() to retrieve the /BREW/Display//IsTouchCapable setting, where the ClassID is the ClassID of the display for which the setting is being retrieved. If the value of the setting is 1, the device is touch-enabled. If it is 0, it is not touch-enabled.

Currently, four values are supported for the display ClassID:

AEECLSID_DISPLAY1 010127d4

AEECLSID_DISPLAY2 010127d5

AEECLSID_DISPLAY3 010127d6

AEECLSID_DISPLAY4 010127d7

To find out if the first display on the device (typically the primary display) is touch capable, call ISettings_Get() as follows:

char retval;

result = ISettings_Get(pMe->piSettings, "/BREW/Display/010127d4/IsTouchCapable",
            &retval, sizeof(retval), NULL);

For more information on ISettings_Get(), see the http://developer.brewmp.com/reference/api-all.