Revert "HoverEvent class pimpling"
[platform/core/uifw/dali-core.git] / dali / public-api / events / hover-event.cpp
index d8a241e..69f02e1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
 #include <dali/public-api/events/hover-event.h>
 
 // INTERNAL INCLUDES
-#include <dali/public-api/actors/actor.h>
-#include <dali/internal/event/events/hover-event-impl.h>
+#include <dali/public-api/common/dali-common.h>
 
 namespace Dali
 {
 
 HoverEvent::HoverEvent()
-: BaseHandle()
+: time(0)
 {
 }
 
-HoverEvent::HoverEvent( const HoverEvent& rhs ) = default;
-
-HoverEvent::HoverEvent( HoverEvent&& rhs ) = default;
-
-HoverEvent::~HoverEvent()
-{
-}
-
-HoverEvent& HoverEvent::operator=( const HoverEvent& rhs ) = default;
-
-HoverEvent& HoverEvent::operator=( HoverEvent&& rhs ) = default;
-
-unsigned long HoverEvent::GetTime() const
-{
-  return GetImplementation( *this ).GetTime();
-}
-
-std::size_t HoverEvent::GetPointCount() const
+HoverEvent::HoverEvent(unsigned long time)
+: time(time)
 {
-  return GetImplementation( *this ).GetPointCount();
 }
 
-int32_t HoverEvent::GetDeviceId( std::size_t point ) const
-{
-  return GetImplementation( *this ).GetDeviceId( point );
-}
-
-PointState::Type HoverEvent::GetState( std::size_t point ) const
-{
-  return GetImplementation( *this ).GetState( point );
-}
-
-Actor HoverEvent::GetHitActor( std::size_t point ) const
-{
-  return GetImplementation( *this ).GetHitActor( point );
-}
-
-const Vector2& HoverEvent::GetLocalPosition( std::size_t point ) const
+HoverEvent::~HoverEvent()
 {
-  return GetImplementation( *this ).GetLocalPosition( point );
 }
 
-const Vector2& HoverEvent::GetScreenPosition( std::size_t point ) const
+uint32_t HoverEvent::GetPointCount() const
 {
-  return GetImplementation( *this ).GetScreenPosition( point );
+  return static_cast<uint32_t>( points.size() );
 }
 
-HoverEvent::HoverEvent( Internal::HoverEvent* internal )
-: BaseHandle( internal )
+const TouchPoint& HoverEvent::GetPoint( uint32_t point ) const
 {
+  DALI_ASSERT_ALWAYS( point < points.size() && "No point at index" );
+  return points[point];
 }
 
 } // namespace Dali