remove CR & modified doxygen in UIFW
[platform/framework/native/uifw.git] / inc / FUiCtrlIGalleryItemProvider.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0/
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                FUiCtrlIGalleryItemProvider.h
19  * @brief               This is the header file for the %IGalleryItemProvider interface.
20  *
21  * This header file contains the declarations of the %IGalleryItemProvider interface. @n
22  * If an event is generated, a method of this interface is called. @n
23  * Therefore, if applications perform jobs related to the list events, use the methods of this interface.
24  *
25  */
26 #ifndef _FUI_CTRL_IGALLERY_ITEM_PROVIDER_H_
27 #define _FUI_CTRL_IGALLERY_ITEM_PROVIDER_H_
28
29 #include <FUiCtrlGalleryItem.h>
30
31 namespace Tizen { namespace Ui { namespace Controls
32 {
33
34 /**
35  * @interface   IGalleryItemProvider
36  * @brief               This interface implements the provider for events on Gallery.
37  *
38  * @since               2.0
39  *
40  * The %IGalleryItemProvider interface is the interface for handling Gallery items. The class that handles gallery items implements this
41  * interface, and the instance created using the Gallery's SetItemProvider() method.
42  *
43  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_gallery.htm">Gallery</a>.
44  */
45 class _OSP_EXPORT_ IGalleryItemProvider
46 {
47 public:
48         /**
49          * This polymorphic destructor should be overridden if required.@n
50          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
51          *
52          * @since       2.0
53          */
54         virtual ~IGalleryItemProvider(void) {}
55
56         /**
57          * Gets the total number of items.
58          *
59          * @since       2.0
60          *
61          * @return              The total number of the Gallery control items
62          * @remarks             An application that uses the Gallery control must implement this method.
63          */
64         virtual int GetItemCount(void) = 0;
65
66         /**
67          * Gets the item at the specified index from the item provider.
68          *
69          * @since       2.0
70          *
71          * @return              An item of the Gallery control
72          * @param[in]   index                   The index of the item
73          * @see                 DeleteItem()
74          * @remarks             An application that uses the Gallery control must implement this method. This method is expected to return an item that is allocated on a
75          *                              heap memory. The returned item can be of type GalleryItem. Note that when the item is not required, the Gallery control calls the
76          *                              IGalleryItemProvider::DeleteItem() method.
77          */
78         virtual Tizen::Ui::Controls::GalleryItem* CreateItem(int index) = 0;
79
80         /**
81          * Deletes the specified item.
82          *
83          * @since       2.0
84          *
85          * @return              @c true if the item is deallocated by this method, @n
86          *                              else @c false
87          * @param[in]   index           The index of the item
88          * @param[in]   pItem           The pointer to GalleryItem to delete
89          * @see                 CreateItem()
90          * @remarks             An application that uses the Gallery control must implement this method. Using this method, an application can deallocate the item. If an
91          *                              application deallocates the item, this method returns @c true. This notifies the Gallery control to not release the item.
92          *                              Otherwise, the item is deallocated by the Gallery control.
93          */
94         virtual bool DeleteItem(int index, Tizen::Ui::Controls::GalleryItem* pItem) = 0;
95
96 protected:
97         //
98         //This method is for internal use only. Using this method can cause behavioral, security-related,
99         //and consistency-related issues in the application.
100         //
101         virtual void GalleryItemProvider_Reserved1(void) {}
102
103         //
104         //This method is for internal use only. Using this method can cause behavioral, security-related,
105         //and consistency-related issues in the application.
106         //
107         virtual void GalleryItemProvider_Reserved2(void) {}
108
109         //
110         //This method is for internal use only. Using this method can cause behavioral, security-related,
111         //and consistency-related issues in the application.
112         //
113         virtual void GalleryItemProvider_Reserved3(void) {}
114 }; // IGalleryItemProvider
115
116 }}} // Tizen::Ui::Controls
117
118 #endif // _FUI_CTRL_IGALLERY_ITEM_PROVIDER_H_