Merge "fix klocwork issue" into tizen_2.2
[platform/framework/native/uifw.git] / inc / FUiCtrlGalleryItem.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 /**
19  * @file        FUiCtrlGalleryItem.h
20  * @brief       This is the header file for the %GalleryItem class.
21  *
22  * This header file contains the declarations of the %GalleryItem class and its helper classes.
23  */
24
25 #ifndef _FUI_CTRL_GALLERY_ITEM_H_
26 #define _FUI_CTRL_GALLERY_ITEM_H_
27
28 #include <FBaseObject.h>
29 #include <FBaseString.h>
30 #include <FGrpBitmap.h>
31 #include <FUiCtrlGalleryTypes.h>
32
33 namespace Tizen { namespace Ui { namespace Controls
34 {
35
36 class _GalleryItemImpl;
37
38 /**
39  * @class       GalleryItem
40  * @brief This class defines the common behavior for a %GalleryItem control.
41  *
42  * @since               2.0
43  *
44  * The %GalleryItem class represents an item of the Gallery control. An instance of the %GalleryItem class
45  * comprises of a bitmap image and its image rotation. @n @n
46  *
47  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_gallery.htm">Gallery</a>.
48  */
49 class _OSP_EXPORT_ GalleryItem
50         : public Tizen::Base::Object
51 {
52 public:
53         /**
54          * The object is not fully constructed after this constructor is called. @n
55          * For full construction, the %Construct() method must be called right after calling this constructor.
56          *
57          * @since 2.0
58          */
59         GalleryItem(void);
60
61         /**
62          * This destructor overrides Tizen::Base::Object::~Object().
63          *
64          * @since 2.0
65          */
66         virtual ~GalleryItem(void);
67
68 public:
69         /**
70          * Initializes this instance of %GalleryItem with the specified parameters.
71          *
72          * @since 2.0
73          *
74          * @return              An error code
75          * @param[in]   bitmap                  The default bitmap image
76          * @param[in]   rotation                The rotation of the bitmap image
77          * @exception   E_SUCCESS               The method is successful.
78          * @exception E_SYSTEM          A system error has occurred.
79          */
80         result Construct(const Tizen::Graphics::Bitmap& bitmap, GalleryImageRotation rotation = GALLERY_IMAGE_ROTATION_0);
81
82         /**
83          * Initializes this instance of %GalleryItem with the specified parameters.
84          * @if OSPCOMPAT
85          * @brief <i> [Compatibility] </i>
86          * @endif
87          * @since 2.0
88          * @if OSPCOMPAT
89          * @compatibility This method has compatibility issues with OSP compatible applications. @n
90          *                                      For more information, see @ref CompIoPathPage "here".
91          * @endif
92          * @return                                       An error code
93          * @param[in]  bitmap                 The default bitmap image
94          * @param[in]  filePath               The bitmap file path
95          * @param[in]  rotation               The rotation of the bitmap image
96          * @exception   E_SUCCESS                               The method is successful.
97          * @exception   E_OVERFLOW                              The image specified by @c filePath has caused an overflow.
98          * @exception   E_UNSUPPORTED_FORMAT    The image specified by @c filePath is not supported.
99          * @exception  E_FILE_NOT_FOUND       The specified file cannot be found or accessed.
100          * @exception  E_INTERRUPTED             The requested operation cannot be performed due to an interruption from another thread. @n
101          * @exception  E_ILLEGAL_ACCESS       The image specified by @c filePath parameter, is protected with DRM.
102          * @exception  E_SYSTEM                  A system error has occurred.
103          * @remarks  The specified file path is used to decode the original bitmap to show a more higher quality image when the corresponding item is zoomed.
104          */
105         result Construct(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Base::String& filePath, GalleryImageRotation rotation = GALLERY_IMAGE_ROTATION_0);
106
107 private:
108         //
109         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
110         //
111         GalleryItem(const GalleryItem& rhs);
112
113         //
114         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
115         //
116         GalleryItem& operator =(const GalleryItem& rhs);
117
118 private:
119         _GalleryItemImpl* __pImpl;
120
121         friend class _GalleryItemImpl;
122 }; // GalleryItem
123
124 }}} // Tizen::Ui::Controls
125
126 #endif // _FUI_CTRL_GALLERY_ITEM_H_