Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUi_ITouchEventPreviewer.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://floralicense.org/license/
10 //
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.
16 //
17 /**
18  * @file        FUi_ITouchEventPreviewer.h
19  * @brief       This is the header file for the _ITouchEventPreviewer class.
20  *
21  * This header file contains the declarations of the %_ITouchEventPreviewer class.
22  */
23
24 #ifndef _FUI_INTERNAL_ITOUCH_EVENT_PREVIEWER_H_
25 #define _FUI_INTERNAL_ITOUCH_EVENT_PREVIEWER_H_
26
27 #include <FBaseTypes.h>
28 #include <FGraphics.h>
29 #include "FUi_IUiEventPreviewer.h"
30 #include "FUi_UiEventTypes.h"
31
32 namespace Tizen { namespace Ui
33 {
34
35 class _Control;
36 class _TouchInfo;
37
38 /**
39  * @interface   _ITouchEventPreviewer
40  * @brief                       This interface is used as the argument to the touch event listener.
41  * @since                       2.0
42  *
43  * The listener interface for receiving touch events. The class that processes a touch event
44  * implements this interface, and the instance created with that class is registered with a UI control, using the control's
45  * AddTouchEventListener() method. When the touch event occurs, the OnTouchDoublePressed(), OnTouchFocusIn(), OnTouchFocusOut(), OnTouchLongPressed(), OnTouchLongPressed(), OnTouchMoved(), OnTouchPressed(), or OnTouchReleased() method of that instance is invoked.
46  */
47 class _ITouchEventPreviewer
48         : virtual public _IUiEventPreviewer
49         , virtual public Tizen::Base::Runtime::IEventListener
50 {
51 // Operation
52 public:
53         /**
54         * This is the destructor for this class.
55         *
56         * @since                        2.0
57         */
58         virtual ~_ITouchEventPreviewer(void) {}
59
60         /**
61          * Notifies when an entity is touch pressed.
62          *
63          * @since                               2.0
64          * @param[in]   source                  The source of the event
65          * @param[in]   currentPosition The current position
66          * @param[in]   touchInfo               The touch event information
67          */
68         virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) = 0;
69
70         /**
71          * Notifies when an entity is touch released.
72          *
73          * @since                               2.0
74          * @param[in]   source                  The source of the event
75          * @param[in]   currentPosition The current position
76          * @param[in]   touchInfo               The touch event information
77          */
78         virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) = 0;
79
80         /**
81          * Notifies when an entity is touch moved.
82          *
83          * @since                               2.0
84          * @param[in]   source                  The source of the event
85          * @param[in]   currentPosition The current position
86          * @param[in]   touchInfo               The touch event information
87          */
88         virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) = 0;
89
90         /**
91          * Notifies when an entity is touch cancelled.
92          *
93          * @since                               2.0
94          * @param[in]   source                  The source of the event
95          * @param[in]   currentPosition The current position
96          * @param[in]   touchInfo               The touch event information
97          */
98         virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) = 0;
99 }; // _ITouchEventPreviewer
100
101 }} // Tizen::Ui
102
103 #endif // _FUI_INTERNAL_ITOUCH_EVENT_PREVIEWER_H_