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_TouchPinchGestureDetectorImpl.cpp
19 * @brief This is the implementation file for %_TouchPinchGestureDetectorImpl class
22 * This file contains the implementation of %_TouchPinchGestureDetectorImpl class.
26 #include <FUiTouchPinchGestureDetector.h>
27 #include "FUi_TouchPinchGestureDetectorImpl.h"
28 #include "FUi_TouchPinchGestureDetector.h"
30 using namespace Tizen::Graphics;
32 namespace Tizen { namespace Ui
35 _TouchPinchGestureDetectorImpl::_TouchPinchGestureDetectorImpl(TouchPinchGestureDetector* pPublic, _TouchPinchGestureDetector* pCore)
36 : _TouchGestureDetectorImpl(pPublic, pCore)
40 _TouchPinchGestureDetectorImpl::~_TouchPinchGestureDetectorImpl(void)
44 _TouchPinchGestureDetectorImpl*
45 _TouchPinchGestureDetectorImpl::CreateInstanceN(TouchPinchGestureDetector* pPublic)
49 _TouchPinchGestureDetector* pCore = null;
50 pCore = new (std::nothrow) _TouchPinchGestureDetector;
51 SysTryReturn(NID_UI, pCore, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
53 _TouchPinchGestureDetectorImpl* pImpl = new (std::nothrow) _TouchPinchGestureDetectorImpl(pPublic, pCore);
54 SysTryCatch(NID_UI, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
64 const _TouchPinchGestureDetector&
65 _TouchPinchGestureDetectorImpl::GetCore(void) const
67 return static_cast<const _TouchPinchGestureDetector&>(_TouchGestureDetectorImpl::GetCore());
70 _TouchPinchGestureDetector&
71 _TouchPinchGestureDetectorImpl::GetCore(void)
73 return static_cast<_TouchPinchGestureDetector&>(_TouchGestureDetectorImpl::GetCore());
76 _TouchPinchGestureDetectorImpl*
77 _TouchPinchGestureDetectorImpl::GetInstance(TouchPinchGestureDetector& gestureDetector)
79 return static_cast<_TouchPinchGestureDetectorImpl*> (gestureDetector.__pTouchGestureDetectorImpl);
82 const _TouchPinchGestureDetectorImpl*
83 _TouchPinchGestureDetectorImpl::GetInstance(const TouchPinchGestureDetector& gestureDetector)
85 return static_cast<const _TouchPinchGestureDetectorImpl*> (gestureDetector.__pTouchGestureDetectorImpl);
89 _TouchPinchGestureDetectorImpl::GetCenterPoint(void) const
93 return GetCore().GetCenterPoint();
97 _TouchPinchGestureDetectorImpl::GetCenterPointF(void) const
101 return GetCore().GetCenterPointF();
105 _TouchPinchGestureDetectorImpl::GetScale(void) const
109 return GetCore().GetScale();
113 _TouchPinchGestureDetectorImpl::GetScaleF(void) const
117 return GetCore().GetScaleF();