Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / controls / FUiCtrl_GalleryViewEventInfo.cpp
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.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
8 //
9 //     http://floralicense.org/license/
10 //
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.
16 //
17 #include <FBaseSysLog.h>
18 #include "FUiCtrl_GalleryViewEventInfo.h"
19
20 namespace Tizen { namespace Ui { namespace Controls {
21
22 _GalleryViewEventInfo::_GalleryViewEventInfo(void)
23         : __pTouchInfo(null)
24         , __flicked(false)
25         , __flickPosition(0, 0)
26         , __flickTime(0)
27         , __pinchCenterPosition(0, 0)
28         , __PinchArea(0)
29 {
30         // Do nothing
31 }
32
33 _GalleryViewEventInfo::_GalleryViewEventInfo(_TouchInfo& touchInfo)
34         : __pTouchInfo(&touchInfo)
35         , __flicked(false)
36         , __flickPosition(0, 0)
37         , __flickTime(0)
38         , __pinchCenterPosition(0, 0)
39         , __PinchArea(0)
40 {
41         // Do nothing.
42 }
43
44 _GalleryViewEventInfo::~_GalleryViewEventInfo(void)
45 {
46         // Do nothing.
47 }
48
49 _TouchStatus
50 _GalleryViewEventInfo::GetTouchStatus(void) const
51 {
52         SysAssert(__pTouchInfo != null);
53         return __pTouchInfo->GetTouchStatus();
54 }
55
56 Tizen::Graphics::Point
57 _GalleryViewEventInfo::GetCurrentPosition(void) const
58 {
59         SysAssert(__pTouchInfo != null);
60         return __pTouchInfo->GetCurrentPosition();
61 }
62
63 void
64 _GalleryViewEventInfo::SetFlicked(bool flicked)
65 {
66         __flicked = flicked;
67 }
68
69 bool
70 _GalleryViewEventInfo::IsFlicked(void) const
71 {
72         return __flicked;
73 }
74
75 void
76 _GalleryViewEventInfo::SetFlickPosition(Tizen::Graphics::Point flickPos)
77 {
78         __flickPosition = flickPos;
79 }
80
81 Tizen::Graphics::Point
82 _GalleryViewEventInfo::GetFlickPosition(void) const
83 {
84         return __flickPosition;
85 }
86
87 void
88 _GalleryViewEventInfo::SetFlickTime(int flickTime)
89 {
90         __flickTime = flickTime;
91 }
92
93 int
94 _GalleryViewEventInfo::GetFlickTime(void) const
95 {
96         return __flickTime;
97 }
98
99 void
100 _GalleryViewEventInfo::SetPinchCenterPosition(Tizen::Graphics::Point centerPos)
101 {
102         __pinchCenterPosition = centerPos;
103 }
104
105 Tizen::Graphics::Point
106 _GalleryViewEventInfo::GetPinchCenterPosition(void) const
107 {
108         return __pinchCenterPosition;
109 }
110
111 void
112 _GalleryViewEventInfo::SetPinchArea(int distance)
113 {
114         __PinchArea = distance;
115 }
116
117 int
118 _GalleryViewEventInfo::GetPinchArea(void) const
119 {
120         return __PinchArea;
121 }
122
123 unsigned long
124 _GalleryViewEventInfo::GetPointId(void) const
125 {
126         return __pTouchInfo->GetPointId();
127 }
128
129 }}} // Tizen::Ui::Controls