} // unnamed namespace
RotationGestureRecognizer::RotationGestureRecognizer( Observer& observer, uint32_t minimumTouchEvents, uint32_t minimumTouchEventsAfterStart )
-: GestureRecognizer( Gesture::Rotation ),
+: GestureRecognizer( Dali::Gesture::Rotation ),
mObserver( observer ),
mState( Clear ),
mTouchEvents(),
mStartingAngle = GetAngle( mTouchEvents.begin()->points[0], mTouchEvents.begin()->points[1] );
// Send rotation started
- SendRotation( Gesture::Started, event );
+ SendRotation( Dali::Gesture::Started, event );
mState = Started;
}
{
// System interruption occurred, rotation should be cancelled
mTouchEvents.clear();
- SendRotation(Gesture::Cancelled, event);
+ SendRotation(Dali::Gesture::Cancelled, event);
mState = Clear;
mTouchEvents.clear();
}
else if( pointCount != 2 )
{
// Send rotation finished event
- SendRotation( Gesture::Finished, event );
+ SendRotation( Dali::Gesture::Finished, event );
mState = Clear;
mTouchEvents.clear();
{
mTouchEvents.push_back( event );
// Send rotation finished event
- SendRotation( Gesture::Finished, event );
+ SendRotation( Dali::Gesture::Finished, event );
mState = Clear;
mTouchEvents.clear();
if( mTouchEvents.size() >= mMinimumTouchEventsAfterStart )
{
// Send rotation continuing
- SendRotation( Gesture::Continuing, event );
+ SendRotation( Dali::Gesture::Continuing, event );
mTouchEvents.clear();
}
void RotationGestureRecognizer::SendRotation( Gesture::State state, const Integration::TouchEvent& currentEvent )
{
RotationGestureEvent gesture( state );
-
if( !mTouchEvents.empty() )
{
// Assert if we have been holding TouchEvents that do not have 2 points
else
{
// Something has gone wrong, just cancel the gesture.
- gesture.state = Gesture::Cancelled;
+ gesture.state = Dali::Gesture::Cancelled;
}
gesture.time = currentEvent.time;