2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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.h
19 * @brief This is the header file for _TouchEventArg class.
22 * This header file contains declarations of _TouchEventArg class.
25 #ifndef _FUI_TOUCH_EVENT_ARG_H_
26 #define _FUI_TOUCH_EVENT_ARG_H_
29 #include <FOspConfig.h>
30 #include <FBaseObject.h>
31 #include <FBaseRt_Event.h>
32 #include <FBaseRtIEventArg.h>
33 #include <FGrpPoint.h>
34 #include "FUi_UiTouchEvent.h"
37 namespace Tizen { namespace Ui
41 * @class _TouchEventArg
43 * @brief This class is used as tje argument to touch event listener.
45 * This class is used as the argument of touch event listener. When touch event event is generated,
46 * the @c TouchEvent instance calls the registered ITouchEventListener with an instance of this
47 * class as the argument.
51 : public Tizen::Base::Object
52 , public Tizen::Base::Runtime::IEventArg
57 * This is the default class constructor.
59 * @param[in] source - A pointer to the Object instance which contains this instance.
60 * @param[in] status - TouchStatus
62 _TouchEventArg(const Tizen::Ui::Control& source, _TouchStatus status);
66 * This is the class destructor.
68 virtual ~_TouchEventArg(void);
74 * This method returns the object which the event initially occurred.
76 * @return The object which the event initially occurred.
78 const Tizen::Ui::Control* GetSource(void) const;
81 * This method sets the positions of touch event on the window rectangle coordination.
82 * @param[in] PointId - PointId of the touch event
83 * @param[in] startX - x coordinate of the original touch pressed event
84 * @param[in] startY - y coordinate of the original touch pressed event
85 * @param[in] currentX - x coordinate of the current touch event
86 * @param[in] currentY - y coordinate of the currenttouch event
88 void SetTouchPosition(unsigned long PointId, int startX, int startY, int currentX, int currentY);
91 * This method returns the touch id
93 * @return see the above
95 unsigned long GetPointId(void) const;
98 * This method returns the touch status
100 * @return see the above
102 _TouchStatus GetTouchStatus(void) const;
105 * This method returns the start position of touch pressed event on the window rectangle coordination.
107 * @return see the above
109 const Tizen::Graphics::Point GetStartPosition(void) const;
112 * This method returns the current position of touch event on the window rectangle coordination.
114 * @return see the above
116 const Tizen::Graphics::Point GetCurrentPosition(void) const;
119 * This method sets the positions of touch event on the window rectangle coordination.
121 * @param[in] isFlicked - Flag whether it is flicked.
123 void SetFlickedStatus(bool isFlicked);
126 * This method returns the flicked status
128 * @return see the above
130 bool IsFlicked(void) const;
134 unsigned long __PointId;
135 Tizen::Ui::Control* __pSource;
136 _TouchStatus __touchStatus;
137 Tizen::Graphics::Point __startPosition;
138 Tizen::Graphics::Point __currentPosition;
144 #endif // _FUI_TOUCH_EVENT_ARG_H_