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_ITouchEventListener.h
19 * @brief This is the header file for the _ITouchEventListener class.
21 * This header file contains the declarations of the %_ITouchEventListener class.
24 #ifndef _FUI_INTERNAL_ITOUCH_EVENT_LISTENER_H_
25 #define _FUI_INTERNAL_ITOUCH_EVENT_LISTENER_H_
27 #include <FBaseTypes.h>
28 #include <FGraphics.h>
29 #include "FUi_IUiEventListener.h"
31 namespace Tizen { namespace Ui
38 * @interface _ITouchEventListener
39 * @brief This interface is used as the argument to the touch event listener.
42 * The listener interface for receiving touch events. The class that processes a touch event
43 * implements this interface, and the instance created with that class is registered with a UI control, using the control's
44 * AddTouchEventListener() method. When the touch event occurs, the OnTouchDoublePressed(), OnTouchFocusIn(), OnTouchFocusOut(), OnTouchLongPressed(), OnTouchLongPressed(), OnTouchMoved(), OnTouchPressed(), or OnTouchReleased() method of that instance is invoked.
46 class _ITouchEventListener
47 : virtual public _IUiEventListener
48 , virtual public Tizen::Base::Runtime::IEventListener
53 * This is the destructor for this class.
57 virtual ~_ITouchEventListener(void) {}
60 * Notifies when an entity is touch pressed.
63 * @param[in] source The source of the event
64 * @param[in] currentPosition The current position
65 * @param[in] touchInfo The touch event information
67 virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) = 0;
70 * Notifies when an entity is touch released.
73 * @param[in] source The source of the event
74 * @param[in] currentPosition The current position
75 * @param[in] touchInfo The touch event information
77 virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) = 0;
80 * Notifies when an entity is touch moved.
83 * @param[in] source The source of the event
84 * @param[in] currentPosition The current position
85 * @param[in] touchInfo The touch event information
87 virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) = 0;
90 * Notifies when an entity is touch cancelled.
93 * @param[in] source The source of the event
94 * @param[in] currentPosition The current position
95 * @param[in] touchInfo The touch event information
97 virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) = 0;
98 }; // _ITouchEventListener
102 #endif // _FUI_INTERNAL_ITOUCH_EVENT_LISTENER_H_