215bafa921ec93f6e143cef722e733427345cd14
[platform/core/uifw/dali-core.git] / dali / public-api / events / touch-event.cpp
1 /*
2  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/public-api/events/touch-event.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/internal/event/events/touch-event-impl.h>
23 #include <dali/public-api/actors/actor.h>
24
25 #include <cstdio>
26
27 namespace Dali
28 {
29 TouchEvent::TouchEvent() = default;
30
31 TouchEvent::TouchEvent(const TouchEvent& other) = default;
32
33 TouchEvent::TouchEvent(TouchEvent&& other) = default;
34
35 TouchEvent::~TouchEvent() = default;
36
37 TouchEvent& TouchEvent::operator=(const TouchEvent& other) = default;
38
39 TouchEvent& TouchEvent::operator=(TouchEvent&& other) = default;
40
41 unsigned long TouchEvent::GetTime() const
42 {
43   return GetImplementation(*this).GetTime();
44 }
45
46 std::size_t TouchEvent::GetPointCount() const
47 {
48   return GetImplementation(*this).GetPointCount();
49 }
50
51 int32_t TouchEvent::GetDeviceId(std::size_t point) const
52 {
53   return GetImplementation(*this).GetDeviceId(point);
54 }
55
56 PointState::Type TouchEvent::GetState(std::size_t point) const
57 {
58   return GetImplementation(*this).GetState(point);
59 }
60
61 Actor TouchEvent::GetHitActor(std::size_t point) const
62 {
63   return GetImplementation(*this).GetHitActor(point);
64 }
65
66 const Vector2& TouchEvent::GetLocalPosition(std::size_t point) const
67 {
68   return GetImplementation(*this).GetLocalPosition(point);
69 }
70
71 const Vector2& TouchEvent::GetScreenPosition(std::size_t point) const
72 {
73   return GetImplementation(*this).GetScreenPosition(point);
74 }
75
76 float TouchEvent::GetRadius(std::size_t point) const
77 {
78   return GetImplementation(*this).GetRadius(point);
79 }
80
81 const Vector2& TouchEvent::GetEllipseRadius(std::size_t point) const
82 {
83   return GetImplementation(*this).GetEllipseRadius(point);
84 }
85
86 float TouchEvent::GetPressure(std::size_t point) const
87 {
88   return GetImplementation(*this).GetPressure(point);
89 }
90
91 Degree TouchEvent::GetAngle(std::size_t point) const
92 {
93   return GetImplementation(*this).GetAngle(point);
94 }
95
96 Device::Class::Type TouchEvent::GetDeviceClass(std::size_t point) const
97 {
98   return GetImplementation(*this).GetDeviceClass(point);
99 }
100
101 Device::Subclass::Type TouchEvent::GetDeviceSubclass(std::size_t point) const
102 {
103   return GetImplementation(*this).GetDeviceSubclass(point);
104 }
105
106 MouseButton::Type TouchEvent::GetMouseButton(std::size_t point) const
107 {
108   return GetImplementation(*this).GetMouseButton(point);
109 }
110
111 TouchEvent::TouchEvent(Internal::TouchEvent* internal)
112 : BaseHandle(internal)
113 {
114 }
115
116 } // namespace Dali