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_TouchEventArg.cpp
19 * @brief This is the implementation file for the _TouchEventArg class.
22 #include "FUi_TouchEventArg.h"
24 using namespace Tizen::Base;
25 using namespace Tizen::Base::Runtime;
26 using namespace Tizen::Graphics;
28 namespace Tizen { namespace Ui
31 _TouchEventArg::_TouchEventArg(const Tizen::Ui::Control& source, _TouchStatus status)
33 , __pSource(const_cast <Control*>(&source))
34 , __touchStatus(status)
35 , __startPosition(-1, -1)
36 , __currentPosition(-1, -1)
42 _TouchEventArg::~_TouchEventArg(void)
48 _TouchEventArg::GetTouchStatus(void) const
50 return (__touchStatus);
53 const Tizen::Ui::Control*
54 _TouchEventArg::GetSource(void) const
60 _TouchEventArg::SetTouchPosition(unsigned long PointId, float startX, float startY, float currentX, float currentY)
63 __startPosition = Tizen::Graphics::FloatPoint(startX, startY);
64 __currentPosition = Tizen::Graphics::FloatPoint(currentX, currentY);
68 _TouchEventArg::GetPointId(void) const
74 _TouchEventArg::GetStartPosition(void) const
76 return __startPosition;
80 _TouchEventArg::GetCurrentPosition(void) const
82 return __currentPosition;
86 _TouchEventArg::SetFlickedStatus(bool isFlicked)
88 __isFlicked = isFlicked;
92 _TouchEventArg::IsFlicked(void) const