Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_IScrollEventListener.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                FUiCtrl_IScrollEventListener.h
19  * @brief               This is the header file for the _IScrollEventListener class.
20  * @brief               This is the header file for the _ScrollExtraValue class.
21  *
22  * This header file contains the declarations of the _IScrollEventListener class.
23  * If a change event is generated, a method of this class is called.
24  * Applications that do jobs related to change events call the methods of this class.
25  */
26
27 #ifndef _FUICTRL_INTERNAL_ISCROLL_EVENT_LISTENER_H_
28 #define _FUICTRL_INTERNAL_ISCROLL_EVENT_LISTENER_H_
29
30 // Includes
31 #include <FUiCtrlScrollEventTypes.h>
32 #include <FOspConfig.h>
33 #include <FBaseRtIEventListener.h>
34
35 namespace Tizen { namespace Ui
36 {
37 class _Control;
38 }}      // Tizen::Ui
39
40 namespace Tizen {namespace Ui { namespace Controls
41 {
42
43 /**
44  * @interface   _IScrollEventListener
45  * @brief       This interface implements a listener for scroll events.
46  * @since       2.0
47  *
48  * The interface implements a listener for receiving changes to the Control's the behavior of the scroll.
49  * The class that displays and controls scroll implements this interface, and the instance created with
50  * that class is registered with a UI control, using the control's AddScrollEventListener() method.
51  */
52 class _IScrollEventListener
53         : virtual public Tizen::Base::Runtime::IEventListener
54 {
55 // Operation
56 public:
57         /**
58          * This is the destructor for this class.
59          *
60          * @since 2.0
61          *
62          */
63         virtual ~_IScrollEventListener(void) {}
64
65         /**
66          * Notifies when the scroll reached on one of top, bottom, left or right end
67          *
68          * @since           2.0
69          *
70          * @param[in]           source        The source of the event
71          * @param[in]           type          The type of scroll end event
72          */
73         virtual void OnScrollEndReached(Tizen::Ui::_Control& source, ScrollEndEvent type) = 0;
74
75         /**
76          * Notifies when the scroll is scrolled by scroll bar.
77          *
78          * @since           2.0
79          *
80          * @param[in]           source        The source of the event
81          * @param[in]           scrollPos     The scrolled position
82          */
83         virtual void OnScrollPositionChanged(Tizen::Ui::_Control& source, int scrollPos) {};
84
85         /**
86          * Called when the control's scroll movement has come to a stop.
87          *
88          * @since 2.0
89          *
90          * @param[in]               source        The control being scrolled
91          */
92         virtual void OnScrollStopped(Tizen::Ui::_Control& source) {};
93
94 };
95
96 }}}     // Tizen::Ui::Controls
97
98 #endif // _FUICTRL_INTERNAL_ISCROLL_EVENT_LISTENER_H_