Add ReceiveAllTapEvents(bool)
[platform/core/uifw/dali-core.git] / dali / public-api / events / tap-gesture-detector.cpp
1 /*
2  * Copyright (c) 2021 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/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() = default;
32
33 TapGestureDetector TapGestureDetector::New()
34 {
35   Internal::TapGestureDetectorPtr internal = Internal::TapGestureDetector::New();
36
37   return TapGestureDetector(internal.Get());
38 }
39
40 TapGestureDetector TapGestureDetector::New(uint32_t tapsRequired)
41 {
42   Internal::TapGestureDetectorPtr internal = Internal::TapGestureDetector::New(tapsRequired);
43
44   return TapGestureDetector(internal.Get());
45 }
46
47 TapGestureDetector TapGestureDetector::DownCast(BaseHandle handle)
48 {
49   return TapGestureDetector(dynamic_cast<Dali::Internal::TapGestureDetector*>(handle.GetObjectPtr()));
50 }
51
52 TapGestureDetector::~TapGestureDetector() = default;
53
54 TapGestureDetector::TapGestureDetector(const TapGestureDetector& handle) = default;
55
56 TapGestureDetector& TapGestureDetector::operator=(const TapGestureDetector& rhs)
57 {
58   BaseHandle::operator=(rhs);
59   return *this;
60 }
61
62 void TapGestureDetector::SetMinimumTapsRequired(uint32_t taps)
63 {
64   GetImplementation(*this).SetMinimumTapsRequired(taps);
65 }
66
67 void TapGestureDetector::SetMaximumTapsRequired(uint32_t taps)
68 {
69   GetImplementation(*this).SetMaximumTapsRequired(taps);
70 }
71
72 uint32_t TapGestureDetector::GetMinimumTapsRequired() const
73 {
74   return GetImplementation(*this).GetMinimumTapsRequired();
75 }
76
77 uint32_t TapGestureDetector::GetMaximumTapsRequired() const
78 {
79   return GetImplementation(*this).GetMaximumTapsRequired();
80 }
81
82 void TapGestureDetector::ReceiveAllTapEvents(bool receive)
83 {
84   return GetImplementation(*this).ReceiveAllTapEvents(receive);
85 }
86
87 TapGestureDetector::DetectedSignalType& TapGestureDetector::DetectedSignal()
88 {
89   return GetImplementation(*this).DetectedSignal();
90 }
91
92 } // namespace Dali