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_DragDropEventArg.h
19 * @brief This is the header file for _DragDropEventArg class.
22 * This header file contains declarations of _DragDropEventArg class.
25 #ifndef _FUI_DRAG_DROP_EVENT_ARG_H_
26 #define _FUI_DRAG_DROP_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_DragDropEvent.h"
37 namespace Tizen { namespace Ui
40 * @class _DragDropEventArg
42 * @brief This class is used as the argument to drag drop event listener.
44 * This class is used as the argument of drag drop event listener. When drag drop event event is generated,
45 * the @c DragDropEvent instance calls the registered IDragDropEventListener with an instance of this
46 * class as the argument.
49 class _OSP_EXPORT_ _DragDropEventArg
50 : public Tizen::Base::Object
51 , public Tizen::Base::Runtime::IEventArg
56 * This is the default class constructor.
58 * @param[in] source - A pointer to the Object instance which contains this instance.
59 * @param[in] status - DragDropStatus
61 _DragDropEventArg(const Tizen::Ui::Control& source, DragDropStatus status);
65 * This is the class destructor.
67 virtual ~_DragDropEventArg(void);
72 * This method returns the object which the event initially occurred.
74 * @return The object which the event initially occurred.
76 const Tizen::Ui::Control* GetSource(void) const;
79 * This method returns the touch status
81 * @return see the above
83 DragDropStatus GetDragDropStatus(void) const;
86 * This method returns the start position of touch pressed event on the window rectangle coordination.
88 * @return see the above
90 const Tizen::Graphics::Point GetStartPosition(void) const;
93 * This method returns the current position of touch event on the window rectangle coordination.
95 * @return see the above
97 const Tizen::Graphics::Point GetCurrentPosition(void) const;
100 * This method sets the dragged controls pointer.
102 * @return see the above
105 result SetDraggedControl(const Tizen::Ui::Control* pDraggedControl);
108 * This method returns the dragged controls pointer.
110 * @return see the above
112 const Tizen::Ui::Control* GetDraggedControl(void) const;
115 * This method sets the positions of touch event on the window rectangle coordination.
117 * @param[in] startX - x coordinate of the original touch pressed event
118 * @param[in] startY - y coordinate of the original touch pressed event
119 * @param[in] currentX - x coordinate of the current touch event
120 * @param[in] currentY - y coordinate of the currenttouch event
121 * @return The method returns error code.
122 * @exception E_SUCCESS - This method is successful.
124 result SetTouchPosition(int startX, int startY, int currentX, int currentY);
129 Tizen::Ui::Control* __pSource; // destination
130 Tizen::Ui::Control* __pDraggedControl;
133 DragDropStatus __dragDropStatus;
134 Tizen::Graphics::Point __startPosition;
135 Tizen::Graphics::Point __currentPosition;
136 }; // _DragDropEventArg
140 #endif // _FUI_DRAG_DROP_EVENT_ARG_H_