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.
19 * @file FUiTouchEventInfo.h
20 * @brief This is the header file for the %TouchEventInfo class.
22 * This header file contains the declarations of the %TouchEventInfo class.
26 #ifndef _FUI_TOUCH_EVENT_INFO_H_
27 #define _FUI_TOUCH_EVENT_INFO_H_
29 #include <FBaseObject.h>
30 #include <FGrpPoint.h>
31 #include <FGrpFloatPoint.h>
33 namespace Tizen { namespace Base { namespace Runtime
38 namespace Tizen { namespace Ui
41 class _TouchEventInfoImpl;
46 * Defines constants used to identify touch status.
52 TOUCH_PRESSED, /**< The touch pressed event type */
53 TOUCH_LONG_PRESSED, /**< The touch long pressed event type */
54 TOUCH_RELEASED, /**< The touch released event type */
55 TOUCH_MOVED, /**< The touch moved event type */
56 TOUCH_DOUBLE_PRESSED, /**< The touch double pressed event type */
57 TOUCH_FOCUS_IN, /**< The touch focus-in event type */
58 TOUCH_FOCUS_OUT, /**< The touch focus-out event type */
59 TOUCH_CANCELED, /**< The touch canceled event type */
63 * @class TouchEventInfo
64 * @brief This class stores the information of each touch events.
68 * @final This class is not intended for extension.
70 * The %TouchEventInfo class provides the touch event information: touch position, status, ID, and so on.
71 * @see ITouchEventListener::OnTouchPressed()
72 * @see ITouchEventListener::OnTouchReleased()
73 * @see ITouchEventListener::OnTouchMoved()
74 * @see ITouchEventListener::OnTouchFocusIn()
75 * @see ITouchEventListener::OnTouchFocusOut()
77 * @see ITouchEventListener::OnTouchLongPressed()
78 * @see ITouchEventListener::OnTouchDoublePressed()
82 class _OSP_EXPORT_ TouchEventInfo
83 : public Tizen::Base::Object
87 * This is the default constructor for this class.
94 * This destructor overrides Tizen::Base::Object::~Object().
98 virtual ~TouchEventInfo(void);
101 // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
104 // Initializes this instance of %TouchEventInfo with the specified parameters.
107 // @return An error code
108 // @param[in] eventArg The touch event argument
110 result Construct(const Tizen::Base::Runtime::IEventArg& eventArg);
113 * Gets the ID of the current touch event.
117 * @return The ID of the current touch event
119 unsigned long GetPointId(void) const;
122 * Gets the start position of the touch event.
126 * @return The start position of the touch event
128 Tizen::Graphics::Point GetStartPosition(void) const;
131 * Gets the start position of the touch event.
135 * @return The start position of the touch event
137 Tizen::Graphics::FloatPoint GetStartPositionF(void) const;
140 * Gets the current position of the touch event.
144 * @return The current position of the touch event
146 Tizen::Graphics::Point GetCurrentPosition(void) const;
149 * Gets the current position of the touch event.
153 * @return The current position of the touch event
155 Tizen::Graphics::FloatPoint GetCurrentPositionF(void) const;
158 * Gets the touch status.
162 * @return The touch status
164 TouchStatus GetTouchStatus(void) const;
167 * Checks whether the touch status is flick.
171 * @return @c true if the touch status is flick, @n
174 bool IsFlicked(void) const;
178 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
180 TouchEventInfo(const TouchEventInfo&);
183 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
185 TouchEventInfo& operator =(const TouchEventInfo&);
188 _TouchEventInfoImpl* __pTouchEventInfoImpl;
193 #endif // _FUI_TOUCH_EVENT_INFO_H_