class stmGesture::MGestureEngineIf |
defining the order inside the application
defining the order in some configuration file (maybe not)
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.
Public Member Functions | |
---|---|
int | activeStreamCount () |
bool | addGesture (const MGestureRecogniserIf *) |
void | enableLogging (bool) |
const stmUiEventEngine::MUiEvent * | getUiEvents (int) |
bool | insertGesture (const MGestureRecogniserIf *) |
bool | insertGestureAt (const MGestureRecogniserIf *, int) |
bool | removeGesture (const MGestureRecogniserIf *) |
int | activeStreamCount | ( | ) | 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.
bool | addGesture | ( | const MGestureRecogniserIf * | aNewGesture | ) | [pure virtual] |
add gesture to the end of the list of gestures
const MGestureRecogniserIf * aNewGesture |
void | enableLogging | ( | bool | aLoggingEnabled | ) | [pure virtual] |
Enable/disable logging
bool aLoggingEnabled |
const stmUiEventEngine::MUiEvent * | getUiEvents | ( | int | indexOfActiveStream | ) | const [pure virtual] |
get the UI events of stream X
int indexOfActiveStream | defines 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. |
bool | insertGesture | ( | const MGestureRecogniserIf * | aNewGesture | ) | [pure virtual] |
inset a gesture to the beginning of the list of gestures
const MGestureRecogniserIf * aNewGesture |
bool | insertGestureAt | ( | const MGestureRecogniserIf * | aNewGesture, |
int | position | |||
) | [pure virtual] |
inset a gesture to specific position
const MGestureRecogniserIf * aNewGesture | |
int position |
bool | removeGesture | ( | const MGestureRecogniserIf * | aOldGesture | ) | [pure virtual] |
remove a gesture from the list
const MGestureRecogniserIf * aOldGesture |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.