Merge "Fix Ime Rotation" into tizen_2.1
[platform/framework/native/uifw.git] / inc / FUiICustomItemEventListener.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                FUiICustomItemEventListener.h
20  * @brief               This is the header file for the %ICustomItemEventListener interface.
21  *
22  * This header file contains the declarations of the ICustomItemEventListener interface. @n
23  * If an item event is generated, a method of this interface is called. @n
24  * Application doing tasks related to the item event use the methods of this interface.
25  *
26  */
27 #ifndef _FUI_ICUSTOM_ITEM_EVENT_LISTENER_H_
28 #define _FUI_ICUSTOM_ITEM_EVENT_LISTENER_H_
29
30 #include <FBaseRtIEventListener.h>
31 #include <FUiIItemEventListener.h>
32
33 namespace Tizen { namespace Ui
34 {
35 class Control;
36 } }
37
38 namespace Tizen {namespace Ui
39 {
40
41 /**
42   * @if OSPDEPREC
43  * @interface   ICustomItemEventListener
44  * @brief               <i> [Deprecated] </i> This interface implements the listener for the item event.
45  *
46  * @deprecated  This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface.
47  * @since               2.0
48  *
49  * The %ICustomItemEventListener interface is the listener interface for receiving item events. The class that processes an item event
50  * implements this interface, and the instance created with that class is registered with a UI control, using the CustomList::AddCustomItemEventListener()
51  * method. When the item event occurs, the OnItemStateChanged() method of that object is invoked.
52  * @endif
53  */
54 class _OSP_EXPORT_ ICustomItemEventListener
55         : public Tizen::Base::Runtime::IEventListener
56 {
57 // Operation
58 public:
59         /**
60          * @if OSPDEPREC
61          * This is the destructor for this class.
62          *
63          * @brief               <i> [Deprecated] </i>
64          * @deprecated  This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface.
65          * @since               2.0
66          * @endif
67          */
68         virtual ~ICustomItemEventListener(void) {}
69
70         /**
71          * @if OSPDEPREC
72          * Called when the state of CustomListItem is changed.
73          *
74          * @brief               <i> [Deprecated] </i>
75          * @deprecated  This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface.
76          * @since               2.0
77          *
78          * @param[in]   source          The source control from which the event is fired
79          * @param[in]   index       The index of the item
80          * @param[in]   itemId      The item ID
81          * @param[in]   status      The state of the item
82          * @remarks     Implement this method in a class which derives %ICustomItemEventListener to handle the user interaction at the CustomListItem.
83          * @remarks             If CustomList is constructed with CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER, this method is called when the radio button is selected.
84          * @endif
85          */
86         virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status) = 0;
87
88
89         /**
90          * @if OSPDEPREC
91          * Called when the state of an element in the CustomListItem is changed.
92          *
93          * @brief               <i> [Deprecated] </i>
94          * @deprecated  This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface.
95          * @since                       2.0
96          *
97          * @param[in]       source              The source control from which the event is fired
98          * @param[in]       index               The index of the item
99          * @param[in]       itemId              The item ID
100          * @param[in]       elementId   The element ID
101          * @param[in]       status              The state of the element
102          * @remarks         Implement this method in a class which derives %ICustomItemEventListener to handle the user interaction at the element in
103          *                                      CustomListItem.
104          * @remarks         If CustomList is constructed with CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER, this method is not called when the radio button is selected.
105          *                                      Instead, OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status) is called.
106          * @endif
107          */
108         virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, int elementId, Tizen::Ui::ItemStatus status) = 0;
109
110
111 }; //ICustomItemEventListener
112
113 }} // Tizen::Ui
114
115 #endif // _FUI_ICUSTOM_ITEM_EVENT_LISTENER_H_