/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
case Event::Hover:
{
- typedef Integration::HoverEvent DerivedType;
+ using DerivedType = Integration::HoverEvent;
// Reserve some memory inside the message queue
uint32_t* slot = mCurrentEventQueue->ReserveMessageSlot( sizeof( DerivedType ) );
case Event::Key:
{
- typedef Integration::KeyEvent DerivedType;
+ using DerivedType = Integration::KeyEvent;
// Reserve some memory inside the message queue
uint32_t* slot = mCurrentEventQueue->ReserveMessageSlot( sizeof( DerivedType ) );
case Event::Wheel:
{
- typedef Integration::WheelEvent DerivedType;
+ using DerivedType = Integration::WheelEvent;
// Reserve some memory inside the message queue
uint32_t* slot = mCurrentEventQueue->ReserveMessageSlot( sizeof( DerivedType ) );
{
case Event::Touch:
{
- mTouchEventProcessor.ProcessTouchEvent( static_cast<const Integration::TouchEvent&>(*event) );
- mGestureEventProcessor.ProcessTouchEvent(mScene, static_cast<const Integration::TouchEvent&>(*event));
+ Integration::TouchEvent& touchEvent = static_cast<Integration::TouchEvent&>(*event);
+ const bool consumed = mTouchEventProcessor.ProcessTouchEvent( touchEvent );
+
+ // If touch is consumed, then gestures should be cancelled
+ // Do this by sending an interrupted event to the GestureEventProcessor
+ if( consumed )
+ {
+ Integration::Point& point = touchEvent.GetPoint(0);
+ point.SetState( PointState::INTERRUPTED );
+ }
+
+ mGestureEventProcessor.ProcessTouchEvent(mScene, touchEvent);
break;
}