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.
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>
32 namespace Tizen { namespace Base { namespace Runtime
37 namespace Tizen { namespace Ui
40 class _TouchEventInfoImpl;
45 * Defines constants used to identify touch status.
51 TOUCH_PRESSED, /**< The touch pressed event type */
52 TOUCH_LONG_PRESSED, /**< The touch long pressed event type */
53 TOUCH_RELEASED, /**< The touch released event type */
54 TOUCH_MOVED, /**< The touch moved event type */
55 TOUCH_DOUBLE_PRESSED, /**< The touch double pressed event type */
56 TOUCH_FOCUS_IN, /**< The touch focus-in event type */
57 TOUCH_FOCUS_OUT, /**< The touch focus-out event type */
58 TOUCH_CANCELED, /**< The touch canceled event type */
62 * @class TouchEventInfo
63 * @brief This class stores the information of each touch events.
67 * @final This class is not intended for extension.
69 * The %TouchEventInfo class provides the touch event information: touch position, status, ID, and so on.
70 * @see ITouchEventListener, ITouchEventListener::OnTouchPressed(), @if OSPDEREC ITouchEventListener::OnTouchLongPressed(), @endif ITouchEventListener::OnTouchReleased(), ITouchEventListener::OnTouchMoved(), @if OSPDEPREC ITouchEventListener::OnTouchDoublePressed(), @endif ITouchEventListener::OnTouchFocusIn(), ITouchEventListener::OnTouchFocusOut()
73 class _OSP_EXPORT_ TouchEventInfo
74 : public Tizen::Base::Object
78 * This is the default constructor for this class.
85 * This destructor overrides Tizen::Base::Object::~Object().
89 virtual ~TouchEventInfo(void);
92 // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
95 // Initializes this instance of %TouchEventInfo with the specified parameters.
98 // @return An error code
99 // @param[in] eventArg The touch event argument
101 result Construct(const Tizen::Base::Runtime::IEventArg& eventArg);
104 * Gets the ID of the current touch event.
108 * @return The ID of the current touch event
110 unsigned long GetPointId(void) const;
113 * Gets the start position of the touch event.
117 * @return The start position of the touch event
119 Tizen::Graphics::Point GetStartPosition(void) const;
122 * Gets the current position of the touch event.
126 * @return The current position of the touch event
128 Tizen::Graphics::Point GetCurrentPosition(void) const;
131 * Gets the touch status.
135 * @return The touch status
137 TouchStatus GetTouchStatus(void) const;
140 * Checks whether the touch status is flick.
144 * @return @c true if the touch status is flick, @n
147 bool IsFlicked(void) const;
151 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
153 TouchEventInfo(const TouchEventInfo&);
156 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
158 TouchEventInfo& operator =(const TouchEventInfo&);
161 _TouchEventInfoImpl* __pTouchEventInfoImpl;
166 #endif // _FUI_TOUCH_EVENT_INFO_H_