Fork for IVI: mesa fixing
[profile/ivi/uifw.git] / inc / FUiCtrlIIconListViewItemEventListener.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 /**
19  * @file        FUiCtrlIIconListViewItemEventListener.h
20  * @brief       This is the header file for the %IIconListViewItemEventListener interface.
21  *
22  * This header file contains the declarations of the %IIconListViewItemEventListener interface. @n
23  * If an item event is generated, a method of this interface is called. @n
24  * So, if an application does some jobs related to the item event, use the methods of this interface.
25  */
26
27 #ifndef _FUI_CTRL_IICON_LIST_VIEW_ITEM_EVENT_LISTENER_H_
28 #define _FUI_CTRL_IICON_LIST_VIEW_ITEM_EVENT_LISTENER_H_
29
30 // Includes
31 #include <FBaseRtIEventListener.h>
32 #include <FOspConfig.h>
33
34 namespace Tizen { namespace Ui { namespace Controls
35 {
36
37 class IconListView;
38
39 /**
40  * @interface   IIconListViewItemEventListener
41  * @brief               This interface implements the listener for the item event.
42  *
43  * @since               2.0
44  *
45  * The %IIconListViewItemEventListener interface is the listener interface for receiving IconListView item events.
46  * The class that processes a list item event implements this interface, and the instance created with that class is registered
47  * with a UI control, using the control's AddIIconListViewItemEventListener() method. When the list item event occurs, the
48  * OnIconListViewItemStateChanged() method of that instance is invoked.
49  *
50  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
51  */
52 class _OSP_EXPORT_ IIconListViewItemEventListener
53         : virtual public Tizen::Base::Runtime::IEventListener
54 {
55 public:
56         /**
57          * 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.
58          *
59          * @since       2.0
60          */
61         virtual ~IIconListViewItemEventListener(void) {}
62
63         /**
64          * Called when an item event occurs.
65          *
66          * @since   2.0
67          *
68          * @param[in] iconListView      The source of the event
69          * @param[in] index                     The index of the item
70          * @param[in] status            The item status
71          */
72         virtual void OnIconListViewItemStateChanged(Tizen::Ui::Controls::IconListView& iconListView, int index, Tizen::Ui::Controls::IconListViewItemStatus status) = 0;
73
74         /**
75          * Called when the overlay bitmap is selected.
76          *
77          * @since 2.0
78          *
79          * @param[in] iconListView      The source of the event
80          * @param[in] index             The index of the item
81          * @param[in] overlayBitmapId   The overlay bitmap ID
82          */
83         virtual void OnIconListViewOverlayBitmapSelected(Tizen::Ui::Controls::IconListView& iconListView, int index, int overlayBitmapId) {}
84
85         /**
86          * Called when the item is reordered.
87          *
88          * @since 2.0
89          *
90          * @param[in] iconListView      The source of the event
91          * @param[in] indexFrom         The start index of the item
92          * @param[in] indexTo           The final index of the item
93          */
94         virtual void OnIconListViewItemReordered(Tizen::Ui::Controls::IconListView&  iconListView, int indexFrom, int indexTo) {}
95
96 protected:
97         // Following methods are reserved and may change its name at any time without prior notice.
98         virtual void IconListViewItemEventListener_Reserved1(void) {}
99         virtual void IconListViewItemEventListener_Reserved2(void) {}
100         virtual void IconListViewItemEventListener_Reserved3(void) {}
101 }; // IIconListViewItemEventListener
102
103 }}} // Tizen::Ui::Controls
104
105 #endif // _FUI_CTRL_IICON_LIST_VIEW_ITEM_EVENT_LISTENER_H_