X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Fevents%2Ftouch-event.cpp;h=a222e9fb1c2875e2263e5bd8e2a520af44686646;hb=c4750afbf79f15bf71e2aa8ef54f84750463aae2;hp=90685074f5ea076e6f50226692deceb4be7e59a4;hpb=7c6f8ed43521c52d6cc46a7e3e3e40069514f818;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/events/touch-event.cpp b/dali/public-api/events/touch-event.cpp index 9068507..a222e9f 100644 --- a/dali/public-api/events/touch-event.cpp +++ b/dali/public-api/events/touch-event.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 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. @@ -19,34 +19,98 @@ #include // INTERNAL INCLUDES -#include +#include +#include + +#include namespace Dali { +TouchEvent::TouchEvent() = default; + +TouchEvent::TouchEvent(const TouchEvent& other) = default; + +TouchEvent::TouchEvent(TouchEvent&& other) noexcept = default; + +TouchEvent::~TouchEvent() = default; + +TouchEvent& TouchEvent::operator=(const TouchEvent& other) = default; + +TouchEvent& TouchEvent::operator=(TouchEvent&& other) noexcept = 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); +} -TouchEvent::TouchEvent() -: time(0) +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); } -unsigned int TouchEvent::GetPointCount() const +MouseButton::Type TouchEvent::GetMouseButton(std::size_t point) const { - return points.size(); + return GetImplementation(*this).GetMouseButton(point); } -const TouchPoint& TouchEvent::GetPoint(unsigned int point) const +TouchEvent::TouchEvent(Internal::TouchEvent* internal) +: BaseHandle(internal) { - DALI_ASSERT_ALWAYS( point < points.size() && "No point at index" ); - return points[point]; } } // namespace Dali