stmUiEventEngine::MStateMachine Class Reference

class stmUiEventEngine::MStateMachine

The state machine interface.

To be OS agnostic TPointerEvent, TRect etc. should be replaced with something else.

Member Functions Documentation

addUiEventObserver(MUiEventObserver *)

bool addUiEventObserver ( MUiEventObserver * observer ) [pure virtual]

add UI event observer. The generated UI events will be sent to the observers.

Parameters

MUiEventObserver * observer

enableCapacitiveUp(bool)

void enableCapacitiveUp ( bool enable ) [pure virtual]

enable capacitive UP message. If it is enabled, UP suppression is not used but the UP event causes immediate Release UI event.

Parameters

bool enable

enableLogging(bool)

void enableLogging ( bool aEnable ) [pure virtual]

enable or disable debug logging of the state machine

Parameters

bool aEnable : logging enabled

enableYadjustment(bool)

void enableYadjustment ( bool aEnable ) [pure virtual]

add "window handles" to the list of targets which should be included in the gesture recognition. This way it is possible to drop the messges which are not of interest from the gesture recognition point of view. This is used when only the gesture recognition is used so that the UI events are not passed to the application.

Setting the Y adjustment useful in capacitive touch Note that there are problems with the adjustment if done at this level, the most proper place would be the window server.

Parameters

bool aEnable

getHoldArea(TInt)

TRect getHoldArea ( TInt aPointerNumber = 0 ) [pure virtual]

Parameters

TInt aPointerNumber = 0

getHoldAreaShape()

TAreaShape getHoldAreaShape ( ) [pure virtual]

get the hold area shape, either rectangle, circle or ellipse

getHoldTimeout()

unsigned int getHoldTimeout ( ) [pure virtual]

get the hold timeout. The timeout defines how long the touch coordinates need to stay inside hold area before Hold UI event is generated.

getMoveSuppressTimeout()

unsigned int getMoveSuppressTimeout ( ) [pure virtual]

get the move suppress timeout. This timeout is used after Move UI event has been generated to filter accidental UP/DOWN events. Using light touch it is possible to cause accidental UP/DOWN events with the timespan can be over 120 ms when the direction of movement changes.

getNumberOfPointers()

int getNumberOfPointers ( ) [pure virtual]

getTouchArea(TInt)

TRect getTouchArea ( TInt aPointerNumber = 0 ) [pure virtual]

Parameters

TInt aPointerNumber = 0

getTouchAreaShape()

TAreaShape getTouchAreaShape ( ) [pure virtual]

get the touch area shape, either rectangle, circle or ellipse

getTouchSuppressTimeout()

unsigned int getTouchSuppressTimeout ( ) [pure virtual]

get the touch suppress timeout. This timeout defines how long it will take to generate the Release UI event after UP event during the touch timeout. This timeout is rather short but will cause the filtering of accidental UP/DOWN events during if they are close together.

getTouchTimeout()

unsigned int getTouchTimeout ( ) [pure virtual]

get the touch timeout. Touch timeout is the time after the first down event until the Touch UI event is generated. Touch timeout makes it possible to calculate an average of the first few points detected before generating the Touch UI event.

removeUiEventObserver(MUiEventObserver *)

bool removeUiEventObserver ( MUiEventObserver * observer ) [pure virtual]

remove the UI event observer.

Parameters

MUiEventObserver * observer

setHoldArea(long)

void setHoldArea ( long fingersize_mm ) [pure virtual]

Parameters

long fingersize_mm defines the width of the rectangle or the diameter of the circle/ellipse used for the hold area. Hold area defines an area so that if the touch coordinates stay inside that area for the duration of hold timeout the Hold UI event is generated.

setHoldAreaShape(const TAreaShape)

void setHoldAreaShape ( const TAreaShape shape ) [pure virtual]

set the hold area shape, either rectangle, circle or ellipse

Parameters

const TAreaShape shape

setHoldTimeout(unsigned int)

void setHoldTimeout ( unsigned int a ) [pure virtual]

Set the hold timeout.

Parameters

unsigned int a

setMoveSuppressTimeout(unsigned int)

void setMoveSuppressTimeout ( unsigned int a ) [pure virtual]

set the move suppress timeout.

Parameters

unsigned int a

setTouchArea(long)

void setTouchArea ( long fingersize_mm ) [pure virtual]

Parameters

long fingersize_mm defines the width of the rectangle or the diameter of the circle/ellipse used for the touch area.

setTouchAreaShape(const TAreaShape)

void setTouchAreaShape ( const TAreaShape shape ) [pure virtual]

set the touch area shape, either rectangle, circle or ellipse. This is the same for both of the touch areas.

Parameters

const TAreaShape shape

setTouchSuppressTimeout(unsigned int)

void setTouchSuppressTimeout ( unsigned int a ) [pure virtual]

Set the touch suppress timeout.

Parameters

unsigned int a

setTouchTimeArea(long)

void setTouchTimeArea ( long fingersize_mm ) [pure virtual]

Parameters

long fingersize_mm defines the width of the rectangle or the diameter of the circle/ellipse used for the touch area during touch timer running. If the initial touch is a "sloppy" one, there is very easily an extra move event detected during touch time. On the other hand after touch has been detected, the touch area should not be too big, just something suitable to filter minor movements out. The proposed solution is to define two touch areas: one to be used while touch timer is running, and another used after touch has been detected. The TouchTimeArea can be a bit larger to allow sloppy touch, then the TouchArea can be smaller to filter minor movements out.

setTouchTimeout(unsigned)

void setTouchTimeout ( unsigned int ) [pure virtual]

Set the touch timeout.

Parameters

unsigned int

wasLastMessageFiltered(TInt)

bool wasLastMessageFiltered ( TInt aPointerNumber = 0 ) [pure virtual]

Parameters

TInt aPointerNumber = 0