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.
17 #include <FBaseSysLog.h>
18 #include "FUi_CoordinateSystemUtils.h"
19 #include "FUiCtrl_GalleryViewEventInfo.h"
21 using namespace Tizen::Graphics;
23 namespace Tizen { namespace Ui { namespace Controls {
25 _GalleryViewEventInfo::_GalleryViewEventInfo(void)
28 , __flickPosition(0, 0)
30 , __pinchCenterPosition(0, 0)
36 _GalleryViewEventInfo::_GalleryViewEventInfo(_TouchInfo& touchInfo)
37 : __pTouchInfo(&touchInfo)
39 , __flickPosition(0, 0)
41 , __pinchCenterPosition(0, 0)
47 _GalleryViewEventInfo::~_GalleryViewEventInfo(void)
52 Tizen::Graphics::FloatPoint
53 _GalleryViewEventInfo::GetCurrentPosition(void) const
55 if (__pTouchInfo == null)
57 return FloatPoint(0.0f, 0.0f);
61 return __pTouchInfo->GetCurrentPosition();
66 _GalleryViewEventInfo::SetFlicked(bool flicked)
72 _GalleryViewEventInfo::IsFlicked(void) const
78 _GalleryViewEventInfo::SetFlickPosition(Tizen::Graphics::Point flickPos)
80 __flickPosition = flickPos;
83 Tizen::Graphics::Point
84 _GalleryViewEventInfo::GetFlickPosition(void) const
86 return __flickPosition;
90 _GalleryViewEventInfo::SetFlickTime(int flickTime)
92 __flickTime = flickTime;
96 _GalleryViewEventInfo::GetFlickTime(void) const
102 _GalleryViewEventInfo::SetPinchCenterPosition(Tizen::Graphics::FloatPoint centerPos)
104 __pinchCenterPosition = centerPos;
107 Tizen::Graphics::FloatPoint
108 _GalleryViewEventInfo::GetPinchCenterPosition(void) const
110 return __pinchCenterPosition;
114 _GalleryViewEventInfo::SetPinchArea(int distance)
116 __PinchArea = distance;
120 _GalleryViewEventInfo::GetPinchArea(void) const
126 _GalleryViewEventInfo::GetPointId(void) const
128 if (__pTouchInfo == null)
134 return __pTouchInfo->GetPointId();
138 }}} // Tizen::Ui::Controls