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_DragDropEvent.h
19 * @brief This is the header file for _DragDropEvent class.
22 * This header file contains declaration of _DragDropEvent class.
24 #ifndef _FUI_INTERNAL_DRAG_DROP_EVENT_H_
25 #define _FUI_INTERNAL_DRAG_DROP_EVENT_H_
28 #include <FOspConfig.h>
29 #include <FBaseResult.h>
30 #include <FBaseRtIEventFilter.h>
31 #include <FBaseRt_Event.h>
32 #include <FBaseRt_EventDispatcher.h>
33 #include <FBaseRtIEventArg.h>
35 namespace Tizen { namespace Ui
40 namespace Tizen { namespace Ui
43 * @enum DragDropStatus
45 * Defines constants used to identify drag drop status.
49 DRAG_DROP_INDICATED = 0, /**< The touch indicated event type */
50 DRAG_DROP_PRESSED, /**< The touch pressed event type */
51 DRAG_DROP_LONG_PRESSED, /**< The touch long pressed event type */
52 DRAG_DROP_RELEASED, /**< The touch released event type */
53 DRAG_DROP_MOVED, /**< The touch moved event type */
54 DRAG_DROP_DOUBLE_PRESSED, /**< The touch double pressed event type */
55 DRAG_DROP_FOCUS_IN, /**< The touch focus-in event type */
56 DRAG_DROP_FOCUS_OUT, /**< The touch focus-out event type */
57 DRAG_DROP_FLICKED, /**< The touch flicked event type */
58 DRAG_DROP_FLICK_HELD, /**< The touch flick held event type */
59 DRAG_DROP_DRAGGED, /**< The touch dragged event type */
60 DRAG_DROP_DROPPED /**< The touch dropped event type */
64 * @class _DragDropEvent
65 * @brief This class handles a touch event. It is inherited from LowLevelEvent class.
67 * The Control class has an instance of the _DragDropEvent class as a member variable.
68 * _DragDropEvent notifies the listeners when a control receives a touch event.
72 class _OSP_EXPORT_ _DragDropEvent
73 : public Tizen::Base::Runtime::_Event
74 , public Tizen::Base::Runtime::IEventFilter
79 * This is the default class constructor. After creating an instance of this
80 * class, you must explicitly call one of construction methods to initialize
86 * This method constructs this _DragDropEvent instance.
88 * @return This method returns the error code.
89 * @param[in] source The owner of this key event.
90 * @exception E_SUCCESS - The method is successful.
91 * @exception E_SYSTEM - The method has failed.
92 * @exception E_ARG_NULL - @c pSource is @c NULL.
94 result Construct(const Tizen::Ui::Control& source);
98 * This is the class destructor.
100 virtual ~_DragDropEvent(void);
106 * This method enables/disables this event. A disabled event can not fire notification.
108 * @return This method returns the error code.
109 * @param[in] enable Determines the state of this event.
110 * @exception E_SUCCESS - This method is successful.
111 * @exception E_SYSTEM - This method has failed.
113 result SetEnabled(bool enable);
119 * This method returns the owner of this event.
121 * @return See the comment above.
123 const Tizen::Ui::Control* GetSource(void) const;
126 bool Filter(const Tizen::Base::Runtime::IEventArg& eventArg);
128 // due to build error
129 virtual result AddListener(const Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::_EventDispatcher* pEventDispatcher);
130 virtual result Wait(void);
136 * This method calls appropriate IKeyEventListener method.
138 * @return This method returns the error code.
139 * @param[in] pListener The IKeyEventListener instance.
140 * @param[in] arg The _DragDropEventArg.
141 * @exception E_SUCCESS - The method is successful.
142 * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.
143 * @exception E_INVALID_ARG - @c pListener is @c NULL.
145 virtual result FireImpl(Tizen::Base::Runtime::IEventListener* pListener, const Tizen::Base::Runtime::IEventArg& arg);
151 Tizen::Ui::Control* __pSource;
157 #endif //_FUI_INTERNAL_DRAG_DROP_EVENT_H_