API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2
GenericTC is an implementation of IController that can be used by any widget to handle pointer events.
Applications can create this controller and use this to receive basic gesture notifications like single tap, double tap, tap and hold.
GenericTC handles BREW MP pointer events for any type of widget and responds by:
- Sending Double Tap notification on EVT_POINTER_DOWN, if a double tap is detected.

- Sending Single Tap notification on EVT_POINTER_UP, if a tap is detected.

- Sending Tap and Hold notification, if a tap and hold gesture is detected.


Event                   Description
----------              ----------------------------------------------------------------------------
EVT_POINTER_DOWN        Enables capture mode (tracks moves that go outside the extent of the widget).
			Queries touch observer for double tap detection.

EVT_POINTER_UP          Resets capture mode.
                        Queries touch observer for single tap detection.

EVT_WDG_SETPROPERTY     The Generic Touch Controller handler responds to this event by attempting to
                        set the property identified by the 'wParam' parameter.  The following properties
                        may be set by the GenericTC Event Handler.


Property                      Description
--------                      ------------------------------------------------------------
PROP_VIEWMODEL                Property to set the view model associated with the Generic Touch

PROP_EX                       Property used to specify an extended property.

Using GenericTC from your application:

To set GenericTC on a widget, application would do the following: 1. Do a CreateInstance of AEECLSID_GenericTC 2. Attach AEECLSID_GenericTC to a widget using IWidget_SetTouchController()
Application can just add listener to the widget's ViewModel and listen for EVT_MDL_WIDGETELEM_TAP to know when a widget was tapped/double-tapped/tapped and held.

Early capture release based on timeout and radius threshold release criteria:

This feature is used in tandem with other decorators or containers that support release criteria. It allows the widgets to tentatively take capture and if it does not understand the gesture that the user is performing (such as panning or flick), it will release the capture in the belief that the gesture was meant for one of its ancestor widgets. Early capture release is disabled by default in GenericTC. An application can enable early capture release using IController_SetRadiusThresholdReleaseCriteria().
GenericTC also supports early capture release based on timeout release criteria. An application can disable or enable early capture release using IController_SetTimeoutReleaseCriteria(). When timeout release criteria is enabled, GenericTC will release capture if button does not receive EVT_POINTER_UP within the timeout period specified by the timeout release criteria.

APIs supported: IController_SetRadiusThresholdReleaseCriteria IController_GetRadiusThresholdReleaseCriteria IController_SetTimeoutReleaseCriteria IController_GetTimeoutReleaseCriteria
To create a Generic Touch Controller object, pass AEECLSID_GenericTC into ISHELL_CreateInstance.
The Generic Container Touch Controller is a reference-counted object. When you are done with a reference, Release() it. Once the reference count reaches 0, any specific cleanup will be performed.
Default Interface Name