Fix to adjust the position of the partial Frame
[platform/framework/native/uifw.git] / inc / FUiCtrlIScrollEventListener.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                FUiCtrlIScrollEventListener.h
19  * @brief       This is the header file for the %IScrollEventListener interface.
20  *
21  * This header file contains the declarations of the %IScrollEventListener interface. @n
22  * If a change event is generated, a method of this interface is called. @n
23  * The applications that perform tasks related to the change events, call the methods of this interface.
24  *
25  */
26 #ifndef _FUI_CTRL_ISCROLL_EVENT_LISTENER_H_
27 #define _FUI_CTRL_ISCROLL_EVENT_LISTENER_H_
28
29 #include <FBaseRtIEventListener.h>
30 #include <FUiCtrlScrollEventTypes.h>
31
32 namespace Tizen { namespace Ui
33 {
34 class Control;
35 }}      // Tizen::Ui
36
37 namespace Tizen {namespace Ui { namespace Controls
38 {
39
40 /**
41  * @interface   IScrollEventListener
42  * @brief       This interface implements a listener for scroll events.
43  *
44  * @since       2.0
45  *
46  * The %IScrollEventListener interface is the listener interface for receiving scroll events.
47  * The class that processes a scroll event implements this interface, and the instance created with that class is registered with
48  * a UI control, using the control's AddScrollEventListener() method. When the scroll event occurs, the OnScrollEndReached()
49  * method of that instance is invoked.
50  *
51  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_panels.htm">Panels</a> and <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
52  */
53 class _OSP_EXPORT_ IScrollEventListener
54         : public Tizen::Base::Runtime::IEventListener
55 {
56 // Operation
57 public:
58         /**
59          * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
60          *
61          * @since 2.0
62          *
63          */
64         virtual ~IScrollEventListener(void) {}
65
66         /**
67          * Called when the scroll reaches the top, bottom, left or right end.
68          *
69          * @since           2.0
70          *
71          * @param[in]           source        The source of the event
72          * @param[in]           type          The type of scroll end event
73          */
74         virtual void OnScrollEndReached(Tizen::Ui::Control& source, Tizen::Ui::Controls::ScrollEndEvent type) = 0;
75
76         /**
77          * Called continuously when the control is being scrolled.
78          *
79          * @since 2.0
80          *
81          *@param[in]               source        The control being scrolled
82          *@param[in]               scrollPosition     The scrolled position
83          */
84         virtual void OnScrollPositionChanged(Tizen::Ui::Control& source, int scrollPosition) {};
85
86         /**
87          * Called when the control's scroll movement has come to a stop.
88          *
89          * @since 2.0
90          *
91          * @param[in]               source        The control being scrolled
92          */
93         virtual void OnScrollStopped(Tizen::Ui::Control& source) {};
94
95 protected:
96         //
97         // This method is for internal use only.
98         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
99         //
100         // This method is reserved and may change its name at any time without prior notice.
101         //
102         virtual void ScrollEventListener_Reserved1(void) {}
103
104         //
105         // This method is for internal use only.
106         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
107         //
108         // This method is reserved and may change its name at any time without prior notice.
109         //
110         virtual void ScrollEventListener_Reserved2(void) {}
111
112         //
113         // This method is for internal use only.
114         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
115         //
116         // This method is reserved and may change its name at any time without prior notice.
117         //
118         virtual void ScrollEventListener_Reserved3(void) {}
119
120 }; // IScrollEventListener
121
122 }}}     // Tizen::Ui::Controls
123
124 #endif // _FUI_CTRL_ISCROLL_EVENT_LISTENER_H_