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/long-press-gesture-detector.h>
22 #include <dali/internal/event/events/long-press-gesture/long-press-gesture-detector-impl.h>
26 LongPressGestureDetector::LongPressGestureDetector(Internal::LongPressGestureDetector* internal)
27 : GestureDetector(internal)
31 LongPressGestureDetector::LongPressGestureDetector() = default;
33 LongPressGestureDetector LongPressGestureDetector::New()
35 Internal::LongPressGestureDetectorPtr internal = Internal::LongPressGestureDetector::New();
37 return LongPressGestureDetector(internal.Get());
40 LongPressGestureDetector LongPressGestureDetector::New(uint32_t touchesRequired)
42 Internal::LongPressGestureDetectorPtr internal = Internal::LongPressGestureDetector::New(touchesRequired);
44 return LongPressGestureDetector(internal.Get());
47 LongPressGestureDetector LongPressGestureDetector::New(uint32_t minTouches, uint32_t maxTouches)
49 Internal::LongPressGestureDetectorPtr internal = Internal::LongPressGestureDetector::New(minTouches, maxTouches);
51 return LongPressGestureDetector(internal.Get());
54 LongPressGestureDetector LongPressGestureDetector::DownCast(BaseHandle handle)
56 return LongPressGestureDetector(dynamic_cast<Dali::Internal::LongPressGestureDetector*>(handle.GetObjectPtr()));
59 LongPressGestureDetector::~LongPressGestureDetector() = default;
61 LongPressGestureDetector::LongPressGestureDetector(const LongPressGestureDetector& handle) = default;
63 LongPressGestureDetector& LongPressGestureDetector::operator=(const LongPressGestureDetector& rhs) = default;
65 LongPressGestureDetector::LongPressGestureDetector(LongPressGestureDetector&& handle) = default;
67 LongPressGestureDetector& LongPressGestureDetector::operator=(LongPressGestureDetector&& rhs) = default;
69 void LongPressGestureDetector::SetTouchesRequired(uint32_t touches)
71 GetImplementation(*this).SetTouchesRequired(touches);
74 void LongPressGestureDetector::SetTouchesRequired(uint32_t minTouches, uint32_t maxTouches)
76 GetImplementation(*this).SetTouchesRequired(minTouches, maxTouches);
79 uint32_t LongPressGestureDetector::GetMinimumTouchesRequired() const
81 return GetImplementation(*this).GetMinimumTouchesRequired();
84 uint32_t LongPressGestureDetector::GetMaximumTouchesRequired() const
86 return GetImplementation(*this).GetMaximumTouchesRequired();
89 LongPressGestureDetector::DetectedSignalType& LongPressGestureDetector::DetectedSignal()
91 return GetImplementation(*this).DetectedSignal();