namespace Adaptor
{
+#if defined(DEBUG_ENABLED)
+namespace
+{
+ Integration::Log::Filter* gTouchEventLogFilter = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_TOUCH");
+} // unnamed namespace
+#endif
+
struct EventHandler::Impl : public WindowEventInterface
{
// Construction & Destruction
{
}
// @todo Consider allowing the EventHandler class to inherit from WindowEventInterface directly
- virtual void TouchEvent( Dali::TouchPoint& point, unsigned long timeStamp )
+ virtual void TouchEvent( Dali::Integration::Point& point, unsigned long timeStamp )
{
mHandler->SendEvent( point, timeStamp );
}
- virtual void KeyEvent( Dali::KeyEvent& keyEvent )
+ virtual void KeyEvent( Integration::KeyEvent& keyEvent )
{
mHandler->SendEvent( keyEvent );
}
mDragAndDropDetector( dndDetector ),
mClipboardEventNotifier( ClipboardEventNotifier::Get() ),
mClipboard( Dali::Clipboard::Get()),
- mImpl( NULL )
+ mImpl( NULL ),
+ mPaused( false )
{
mGestureManager.Stop();
}
-void EventHandler::SendEvent(TouchPoint& point, unsigned long timeStamp)
+void EventHandler::SendEvent(Integration::Point& point, unsigned long timeStamp)
{
Integration::TouchEvent touchEvent;
Integration::TouchEventCombiner::EventDispatchType type = mCombiner.GetNextTouchEvent(point, timeStamp, touchEvent, hoverEvent);
if(type != Integration::TouchEventCombiner::DispatchNone )
{
- DALI_LOG_INFO(gTouchEventLogFilter, Debug::General, "%d: Device %d: Button state %d (%.2f, %.2f)\n", timeStamp, point.deviceId, point.state, point.local.x, point.local.y);
+ DALI_LOG_INFO(gTouchEventLogFilter, Debug::General, "%d: Device %d: Button state %d (%.2f, %.2f)\n", timeStamp, point.GetDeviceId(), point.GetState(), point.GetLocalPosition().x, point.GetLocalPosition().y);
// First the touch and/or hover event & related gesture events are queued
if(type == Integration::TouchEventCombiner::DispatchTouch || type == Integration::TouchEventCombiner::DispatchBoth)
}
}
-void EventHandler::SendEvent(KeyEvent& keyEvent)
+void EventHandler::SendEvent(Integration::KeyEvent& keyEvent)
{
Dali::PhysicalKeyboard physicalKeyboard = PhysicalKeyboard::Get();
if ( physicalKeyboard )
{
- if ( ! KeyLookup::IsDeviceButton( keyEvent.keyPressedName.c_str() ) )
+ if ( ! KeyLookup::IsDeviceButton( keyEvent.keyName.c_str() ) )
{
GetImplementation( physicalKeyboard ).KeyReceived( keyEvent.time > 1 );
}
}
- // Create KeyEvent and send to Core.
- Integration::KeyEvent event(keyEvent.keyPressedName, keyEvent.keyPressed, keyEvent.keyCode,
- keyEvent.keyModifier, keyEvent.time, static_cast<Integration::KeyEvent::State>(keyEvent.state));
- mCoreEventInterface.QueueCoreEvent( event );
+ // Create send KeyEvent to Core.
+ mCoreEventInterface.QueueCoreEvent( keyEvent );
mCoreEventInterface.ProcessCoreEvents();
}
void EventHandler::FeedTouchPoint( TouchPoint& point, int timeStamp)
{
- SendEvent(point, timeStamp);
+ Integration::Point convertedPoint( point );
+ SendEvent(convertedPoint, timeStamp);
}
void EventHandler::FeedWheelEvent( WheelEvent& wheelEvent )
void EventHandler::FeedKeyEvent( KeyEvent& event )
{
- SendEvent( event );
+ Integration::KeyEvent convertedEvent( event );
+ SendEvent( convertedEvent );
}
void EventHandler::FeedEvent( Integration::Event& event )
// Any touch listeners should be told of the interruption.
Integration::TouchEvent event;
- TouchPoint point(0, TouchPoint::Interrupted, 0, 0);
+ Integration::Point point;
+ point.SetState( PointState::INTERRUPTED );
event.AddPoint( point );
// First the touch event & related gesture events are queued