2 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali/public-api/events/tap-gesture-detector.h>
22 #include <dali/internal/event/events/tap-gesture/tap-gesture-detector-impl.h>
26 TapGestureDetector::TapGestureDetector(Internal::TapGestureDetector* internal)
27 : GestureDetector(internal)
31 TapGestureDetector::TapGestureDetector() = default;
33 TapGestureDetector TapGestureDetector::New()
35 Internal::TapGestureDetectorPtr internal = Internal::TapGestureDetector::New();
37 return TapGestureDetector(internal.Get());
40 TapGestureDetector TapGestureDetector::New(uint32_t tapsRequired)
42 Internal::TapGestureDetectorPtr internal = Internal::TapGestureDetector::New(tapsRequired);
44 return TapGestureDetector(internal.Get());
47 TapGestureDetector TapGestureDetector::DownCast(BaseHandle handle)
49 return TapGestureDetector(dynamic_cast<Dali::Internal::TapGestureDetector*>(handle.GetObjectPtr()));
52 TapGestureDetector::~TapGestureDetector() = default;
54 TapGestureDetector::TapGestureDetector(const TapGestureDetector& handle) = default;
56 TapGestureDetector& TapGestureDetector::operator=(const TapGestureDetector& rhs) = default;
58 TapGestureDetector::TapGestureDetector(TapGestureDetector&& handle) noexcept = default;
60 TapGestureDetector& TapGestureDetector::operator=(TapGestureDetector&& rhs) noexcept = default;
62 void TapGestureDetector::SetMinimumTapsRequired(uint32_t taps)
64 GetImplementation(*this).SetMinimumTapsRequired(taps);
67 void TapGestureDetector::SetMaximumTapsRequired(uint32_t taps)
69 GetImplementation(*this).SetMaximumTapsRequired(taps);
72 uint32_t TapGestureDetector::GetMinimumTapsRequired() const
74 return GetImplementation(*this).GetMinimumTapsRequired();
77 uint32_t TapGestureDetector::GetMaximumTapsRequired() const
79 return GetImplementation(*this).GetMaximumTapsRequired();
82 void TapGestureDetector::ReceiveAllTapEvents(bool receive)
84 return GetImplementation(*this).ReceiveAllTapEvents(receive);
87 TapGestureDetector::DetectedSignalType& TapGestureDetector::DetectedSignal()
89 return GetImplementation(*this).DetectedSignal();