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 *)

booladdUiEventObserver(MUiEventObserver *observer)[pure virtual]

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

Parameters

MUiEventObserver * observer

enableCapacitiveUp(bool)

voidenableCapacitiveUp(boolenable)[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)

voidenableLogging(boolaEnable)[pure virtual]

enable or disable debug logging of the state machine

Parameters

bool aEnable: logging enabled

enableYadjustment(bool)

voidenableYadjustment(boolaEnable)[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(TIntaPointerNumber = 0)[pure virtual]

Parameters

TInt aPointerNumber = 0

getHoldAreaShape()

TAreaShape getHoldAreaShape()[pure virtual]

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

getHoldTimeout()

unsigned intgetHoldTimeout()[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 intgetMoveSuppressTimeout()[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()

intgetNumberOfPointers()[pure virtual]

getTouchArea(TInt)

TRect getTouchArea(TIntaPointerNumber = 0)[pure virtual]

Parameters

TInt aPointerNumber = 0

getTouchAreaShape()

TAreaShape getTouchAreaShape()[pure virtual]

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

getTouchSuppressTimeout()

unsigned intgetTouchSuppressTimeout()[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 intgetTouchTimeout()[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 *)

boolremoveUiEventObserver(MUiEventObserver *observer)[pure virtual]

remove the UI event observer.

Parameters

MUiEventObserver * observer

setHoldArea(long)

voidsetHoldArea(longfingersize_mm)[pure virtual]

Parameters

long fingersize_mmdefines 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)

voidsetHoldAreaShape(const TAreaShapeshape)[pure virtual]

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

Parameters

const TAreaShape shape

setHoldTimeout(unsigned int)

voidsetHoldTimeout(unsigned inta)[pure virtual]

Set the hold timeout.

Parameters

unsigned int a

setMoveSuppressTimeout(unsigned int)

voidsetMoveSuppressTimeout(unsigned inta)[pure virtual]

set the move suppress timeout.

Parameters

unsigned int a

setTouchArea(long)

voidsetTouchArea(longfingersize_mm)[pure virtual]

Parameters

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

setTouchAreaShape(const TAreaShape)

voidsetTouchAreaShape(const TAreaShapeshape)[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)

voidsetTouchSuppressTimeout(unsigned inta)[pure virtual]

Set the touch suppress timeout.

Parameters

unsigned int a

setTouchTimeArea(long)

voidsetTouchTimeArea(longfingersize_mm)[pure virtual]

Parameters

long fingersize_mmdefines 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)

voidsetTouchTimeout(unsignedint)[pure virtual]

Set the touch timeout.

Parameters

unsigned int

wasLastMessageFiltered(TInt)

boolwasLastMessageFiltered(TIntaPointerNumber = 0)[pure virtual]

Parameters

TInt aPointerNumber = 0