2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an ”AS IS” BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file FUi_TouchLongPressGestureDetectorImpl.cpp
19 * @brief This is the implementation file for %_TouchLongPressGestureDetectorImpl class
22 * This file contains the implementation of %_TouchLongPressGestureDetectorImpl class.
26 #include <FUiTouchLongPressGestureDetector.h>
27 #include "FUi_TouchLongPressGestureDetectorImpl.h"
28 #include "FUi_TouchLongPressGestureDetector.h"
30 namespace Tizen { namespace Ui
33 _TouchLongPressGestureDetectorImpl::_TouchLongPressGestureDetectorImpl(TouchLongPressGestureDetector* pPublic, _TouchLongPressGestureDetector* pCore)
34 : _TouchGestureDetectorImpl(pPublic, pCore)
38 _TouchLongPressGestureDetectorImpl::~_TouchLongPressGestureDetectorImpl(void)
42 _TouchLongPressGestureDetectorImpl*
43 _TouchLongPressGestureDetectorImpl::CreateInstanceN(TouchLongPressGestureDetector* pPublic)
47 _TouchLongPressGestureDetector* pCore = null;
48 pCore = new (std::nothrow) _TouchLongPressGestureDetector;
49 SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
51 _TouchLongPressGestureDetectorImpl* pImpl = new (std::nothrow) _TouchLongPressGestureDetectorImpl(pPublic, pCore);
52 SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
62 const _TouchLongPressGestureDetector&
63 _TouchLongPressGestureDetectorImpl::GetCore(void) const
65 return static_cast<const _TouchLongPressGestureDetector&>(_TouchGestureDetectorImpl::GetCore());
68 _TouchLongPressGestureDetector&
69 _TouchLongPressGestureDetectorImpl::GetCore(void)
71 return static_cast<_TouchLongPressGestureDetector&>(_TouchGestureDetectorImpl::GetCore());
74 _TouchLongPressGestureDetectorImpl*
75 _TouchLongPressGestureDetectorImpl::GetInstance(TouchLongPressGestureDetector& gestureDetector)
77 return static_cast<_TouchLongPressGestureDetectorImpl*> (gestureDetector.__pTouchGestureDetectorImpl);
80 const _TouchLongPressGestureDetectorImpl*
81 _TouchLongPressGestureDetectorImpl::GetInstance(const TouchLongPressGestureDetector& gestureDetector)
83 return static_cast<const _TouchLongPressGestureDetectorImpl*> (gestureDetector.__pTouchGestureDetectorImpl);
87 _TouchLongPressGestureDetectorImpl::SetDuration(int duration)
89 return GetCore().SetDuration(duration);
93 _TouchLongPressGestureDetectorImpl::GetDuration(void) const
97 return GetCore().GetDuration();
101 _TouchLongPressGestureDetectorImpl::SetMoveAllowance(int allowance)
103 return GetCore().SetMoveAllowance(allowance);
107 _TouchLongPressGestureDetectorImpl::GetMoveAllowance(void) const
111 return GetCore().GetMoveAllowance();
115 _TouchLongPressGestureDetectorImpl::SetMoveAllowance(float allowance)
117 return GetCore().SetMoveAllowance(allowance);
121 _TouchLongPressGestureDetectorImpl::GetMoveAllowanceF(void) const
125 return GetCore().GetMoveAllowanceF();
129 _TouchLongPressGestureDetectorImpl::SetTouchCount(int count)
131 return GetCore().SetTouchCount(count);
135 _TouchLongPressGestureDetectorImpl::GetTouchCount(void) const
139 return GetCore().GetTouchCount();