stmGesture::MGestureEngineIf Class Reference

class stmGesture::MGestureEngineIf
MGestureEngineIf defines the methods for the gesture recognisers to be added to the gesture engine. TODO: add rule based settings to position the gesture recognisers to the list. The gesture recogniser order rules would be defined how?
  • defining the order inside the application

  • defining the order in some configuration file (maybe not)

This requires:
  • the gesture recognisers need to have an ID

  • a type can also be defined if the rules can be set based on types.

The gesture recognisers are arranged in a list so that the correct gesture recogniser gets the opportunity to detect the gesture in time. An axample of a set of gesture recognisers could be e.g.

|---------------------------------------------| | scrolling stop by tap -gesture recogniser | A is enabled only when needed, when enabled must precede all others | | (note that locking partly can be used to achieve the same) |---------------------------------------------| | location specific: zoom + button tap gesture| B these must detect the location first |---------------------------------------------| | location specific: zoom - button tap gesture| B these must detect the location first |---------------------------------------------| | location specific: edge scroll gesture | B these must detect the location first |---------------------------------------------| | pinch zoom gesture | standard gesture, but application wide (spans windows) | | C another requirement: disable all but me/restore state | | so that other gestures will not meddle in while pinching |---------------------------------------------| | hover gesture | C standard gesture, needs to detect the EMove speed |---------------------------------------------| | pan gesture | C standard gesture, but must be after hover |---------------------------------------------| | tap/doubletap gesture | C standard gesture, order not that important, since | | needs just to see certain events in history: touch/release |---------------------------------------------|

The order of gesture recognisers determine how the system behaves, so there must be an easy way to define the order. The order could be defined either by specifying the IDs or just their types, if then the order is not that important. TODO to study whether it would be a good idea to implement this so that there are separate lists for the three different classes of gesture recognisers A, B and C; this might make the implementation simpler.

Member Functions Documentation

activeStreamCount()

intactiveStreamCount()const [pure virtual]

get the number of non-empty event streams. Event streams correspond UI events generated by one touch pointer (=finger). The low level state machine handles the necessary filtering etc. so that it is safe to remove the event stream after UI Release event has been processed.

addGesture(const MGestureRecogniserIf *)

booladdGesture(const MGestureRecogniserIf *aNewGesture)[pure virtual]

add gesture to the end of the list of gestures

Parameters

const MGestureRecogniserIf * aNewGesture

enableLogging(bool)

voidenableLogging(boolaLoggingEnabled)[pure virtual]

Enable/disable logging

Parameters

bool aLoggingEnabled

getUiEvents(int)

const stmUiEventEngine::MUiEvent *getUiEvents(intindexOfActiveStream)const [pure virtual]

get the UI events of stream X

Parameters

int indexOfActiveStreamdefines which active stream is used. Note that MUiEvent contains all the events from down up to the current event. Assumption: the UI events contain the target "window handle", i.e. the gesture recognition needs to be aware of all possible windows of the application.

insertGesture(const MGestureRecogniserIf *)

boolinsertGesture(const MGestureRecogniserIf *aNewGesture)[pure virtual]

inset a gesture to the beginning of the list of gestures

Parameters

const MGestureRecogniserIf * aNewGesture

insertGestureAt(const MGestureRecogniserIf *, int)

boolinsertGestureAt(const MGestureRecogniserIf *aNewGesture,
intposition
)[pure virtual]

inset a gesture to specific position

Parameters

const MGestureRecogniserIf * aNewGesture
int position

removeGesture(const MGestureRecogniserIf *)

boolremoveGesture(const MGestureRecogniserIf *aOldGesture)[pure virtual]

remove a gesture from the list

Parameters

const MGestureRecogniserIf * aOldGesture