Making DALi public API typesafe using guaranteed types; uint8_t, uint32_t
[platform/core/uifw/dali-core.git] / dali / public-api / events / tap-gesture-detector.cpp
1 /*
2  * Copyright (c) 2018 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/tap-gesture-detector.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/internal/event/events/tap-gesture-detector-impl.h>
23
24 namespace Dali
25 {
26 TapGestureDetector::TapGestureDetector(Internal::TapGestureDetector* internal)
27 : GestureDetector(internal)
28 {
29 }
30
31 TapGestureDetector::TapGestureDetector()
32 {
33 }
34
35 TapGestureDetector TapGestureDetector::New()
36 {
37   Internal::TapGestureDetectorPtr internal = Internal::TapGestureDetector::New();
38
39   return TapGestureDetector(internal.Get());
40 }
41
42 TapGestureDetector TapGestureDetector::New(uint32_t tapsRequired )
43 {
44   Internal::TapGestureDetectorPtr internal = Internal::TapGestureDetector::New( tapsRequired );
45
46   return TapGestureDetector(internal.Get());
47 }
48
49 TapGestureDetector TapGestureDetector::DownCast( BaseHandle handle )
50 {
51   return TapGestureDetector( dynamic_cast<Dali::Internal::TapGestureDetector*>(handle.GetObjectPtr()) );
52 }
53
54 TapGestureDetector::~TapGestureDetector()
55 {
56 }
57
58 TapGestureDetector::TapGestureDetector(const TapGestureDetector& handle)
59 : GestureDetector(handle)
60 {
61 }
62
63 TapGestureDetector& TapGestureDetector::operator=(const TapGestureDetector& rhs)
64 {
65   BaseHandle::operator=(rhs);
66   return *this;
67 }
68
69 void TapGestureDetector::SetMinimumTapsRequired(uint32_t taps)
70 {
71   GetImplementation(*this).SetMinimumTapsRequired(taps);
72 }
73
74 void TapGestureDetector::SetMaximumTapsRequired(uint32_t taps)
75 {
76   GetImplementation(*this).SetMaximumTapsRequired(taps);
77 }
78
79 uint32_t TapGestureDetector::GetMinimumTapsRequired() const
80 {
81   return GetImplementation(*this).GetMinimumTapsRequired();
82 }
83
84 uint32_t TapGestureDetector::GetMaximumTapsRequired() const
85 {
86   return GetImplementation(*this).GetMaximumTapsRequired();
87 }
88
89 TapGestureDetector::DetectedSignalType& TapGestureDetector::DetectedSignal()
90 {
91   return GetImplementation(*this).DetectedSignal();
92 }
93
94 } // namespace Dali