/*
- * Copyright (c) 2018 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.
// CLASS HEADER
#include <dali/public-api/events/touch-event.h>
-// EXTERNAL INCLUDES
-#include <dali/integration-api/debug.h>
-
// INTERNAL INCLUDES
-#include <dali/public-api/common/dali-common.h>
+#include <dali/public-api/actors/actor.h>
+#include <dali/internal/event/events/touch-event-impl.h>
+
+#include <cstdio>
namespace Dali
{
-TouchEvent::TouchEvent()
-: time(0)
+TouchEvent::TouchEvent() = default;
+
+TouchEvent::TouchEvent( const TouchEvent& other ) = default;
+
+TouchEvent::TouchEvent( TouchEvent&& other ) = default;
+
+TouchEvent::~TouchEvent() = default;
+
+TouchEvent& TouchEvent::operator=( const TouchEvent& other ) = default;
+
+TouchEvent& TouchEvent::operator=( TouchEvent&& other ) = default;
+
+unsigned long TouchEvent::GetTime() const
+{
+ return GetImplementation( *this ).GetTime();
+}
+
+std::size_t TouchEvent::GetPointCount() const
+{
+ return GetImplementation( *this ).GetPointCount();
+}
+
+int32_t TouchEvent::GetDeviceId( std::size_t point ) const
+{
+ return GetImplementation( *this ).GetDeviceId( point );
+}
+
+PointState::Type TouchEvent::GetState( std::size_t point ) const
+{
+ return GetImplementation( *this ).GetState( point );
+}
+
+Actor TouchEvent::GetHitActor( std::size_t point ) const
+{
+ return GetImplementation( *this ).GetHitActor( point );
+}
+
+const Vector2& TouchEvent::GetLocalPosition( std::size_t point ) const
+{
+ return GetImplementation( *this ).GetLocalPosition( point );
+}
+
+const Vector2& TouchEvent::GetScreenPosition( std::size_t point ) const
+{
+ return GetImplementation( *this ).GetScreenPosition( point );
+}
+
+float TouchEvent::GetRadius( std::size_t point ) const
+{
+ return GetImplementation( *this ).GetRadius( point );
+}
+
+const Vector2& TouchEvent::GetEllipseRadius( std::size_t point ) const
+{
+ return GetImplementation( *this ).GetEllipseRadius( point );
+}
+
+float TouchEvent::GetPressure( std::size_t point ) const
+{
+ return GetImplementation( *this ).GetPressure( point );
+}
+
+Degree TouchEvent::GetAngle( std::size_t point ) const
{
+ return GetImplementation( *this ).GetAngle( point );
}
-TouchEvent::TouchEvent(unsigned long time)
-: time(time)
+Device::Class::Type TouchEvent::GetDeviceClass( std::size_t point ) const
{
+ return GetImplementation( *this ).GetDeviceClass( point );
}
-TouchEvent::~TouchEvent()
+Device::Subclass::Type TouchEvent::GetDeviceSubclass( std::size_t point ) const
{
+ return GetImplementation( *this ).GetDeviceSubclass( point );
}
-uint32_t TouchEvent::GetPointCount() const
+MouseButton::Type TouchEvent::GetMouseButton( std::size_t point ) const
{
- return static_cast<uint32_t>( points.size() );
+ return GetImplementation( *this ).GetMouseButton( point );
}
-const TouchPoint& TouchEvent::GetPoint( uint32_t point ) const
+TouchEvent::TouchEvent( Internal::TouchEvent* internal )
+: BaseHandle( internal )
{
- DALI_ASSERT_ALWAYS( point < points.size() && "No point at index" );
- return points[point];
}
} // namespace Dali