Changed indicator bg color.
[platform/framework/native/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 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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0/
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 "FUi_CoordinateSystemUtils.h"
19 #include "FUiCtrl_GalleryViewEventInfo.h"
20
21 using namespace Tizen::Graphics;
22
23 namespace Tizen { namespace Ui { namespace Controls {
24
25 _GalleryViewEventInfo::_GalleryViewEventInfo(void)
26         : __pTouchInfo(null)
27         , __flicked(false)
28         , __flickPosition(0, 0)
29         , __flickTime(0)
30         , __pinchCenterPosition(0, 0)
31         , __PinchArea(0)
32 {
33         // Do nothing
34 }
35
36 _GalleryViewEventInfo::_GalleryViewEventInfo(_TouchInfo& touchInfo)
37         : __pTouchInfo(&touchInfo)
38         , __flicked(false)
39         , __flickPosition(0, 0)
40         , __flickTime(0)
41         , __pinchCenterPosition(0, 0)
42         , __PinchArea(0)
43 {
44         // Do nothing.
45 }
46
47 _GalleryViewEventInfo::~_GalleryViewEventInfo(void)
48 {
49         // Do nothing.
50 }
51
52 Tizen::Graphics::FloatPoint
53 _GalleryViewEventInfo::GetCurrentPosition(void) const
54 {
55         if (__pTouchInfo == null)
56         {
57                 return FloatPoint(0.0f, 0.0f);
58         }
59         else
60         {
61                 return __pTouchInfo->GetCurrentPosition();
62         }
63 }
64
65 void
66 _GalleryViewEventInfo::SetFlicked(bool flicked)
67 {
68         __flicked = flicked;
69 }
70
71 bool
72 _GalleryViewEventInfo::IsFlicked(void) const
73 {
74         return __flicked;
75 }
76
77 void
78 _GalleryViewEventInfo::SetFlickPosition(Tizen::Graphics::Point flickPos)
79 {
80         __flickPosition = flickPos;
81 }
82
83 Tizen::Graphics::Point
84 _GalleryViewEventInfo::GetFlickPosition(void) const
85 {
86         return __flickPosition;
87 }
88
89 void
90 _GalleryViewEventInfo::SetFlickTime(int flickTime)
91 {
92         __flickTime = flickTime;
93 }
94
95 int
96 _GalleryViewEventInfo::GetFlickTime(void) const
97 {
98         return __flickTime;
99 }
100
101 void
102 _GalleryViewEventInfo::SetPinchCenterPosition(Tizen::Graphics::FloatPoint centerPos)
103 {
104         __pinchCenterPosition = centerPos;
105 }
106
107 Tizen::Graphics::FloatPoint
108 _GalleryViewEventInfo::GetPinchCenterPosition(void) const
109 {
110         return __pinchCenterPosition;
111 }
112
113 void
114 _GalleryViewEventInfo::SetPinchArea(int distance)
115 {
116         __PinchArea = distance;
117 }
118
119 int
120 _GalleryViewEventInfo::GetPinchArea(void) const
121 {
122         return __PinchArea;
123 }
124
125 unsigned long
126 _GalleryViewEventInfo::GetPointId(void) const
127 {
128         if (__pTouchInfo == null)
129         {
130                 return 0;
131         }
132         else
133         {
134                 return __pTouchInfo->GetPointId();
135         }
136 }
137
138 }}} // Tizen::Ui::Controls