Fork for IVI: mesa fixing
[profile/ivi/uifw.git] / inc / FGrpDimension.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        FGrpDimension.h
20  * @brief       This is the header file for the %Dimension class.
21  *
22  * This header file contains the declarations of the %Dimension class.
23  */
24
25 #ifndef _FGRP_DIMENSION_H_
26 #define _FGRP_DIMENSION_H_
27
28 #include <FBaseObject.h>
29
30 namespace Tizen { namespace Graphics
31 {
32 /**
33  * @class       Dimension
34  * @brief       This class represents the width and height of a two-dimensional region.
35  *
36  * @since       2.0
37  *
38  * @final       This class is not intended for extension.
39  *
40  * The %Dimension class provides methods to abstract and set the width and height of a two-dimensional region.
41  *
42  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/graphics/shapes.htm">Shapes</a>.
43  *
44  */
45 class _OSP_EXPORT_ Dimension
46         : public Tizen::Base::Object
47 {
48 public:
49         /**
50          * This is the default constructor for this class. @n
51          * This constructor initializes an instance of %Dimension with the width and the height set as @c 0.
52          *
53          * @since       2.0
54          */
55         Dimension(void);
56
57         /**
58         * This is the copy constructor for the %Dimension class.
59         *
60         * @since 2.0
61         *
62         * @param[in]    rhs             An instance of %Dimension
63         */
64         Dimension(const Dimension& rhs);
65
66         /**
67          * Initializes an instance of %Dimension with the specified values of width and height.
68          *
69          * @since                       2.0
70          *
71          * @param[in]   width   The width to set
72          * @param[in]   height  The height to set
73          */
74         Dimension(int width, int height);
75
76         /**
77          * This is the destructor for this class.
78          *
79          * @since       2.0
80          */
81         virtual ~Dimension(void);
82
83         /**
84         * Assigns the value of the specified instance to the current instance of %Dimension.
85         *
86         * @since 2.0
87         *
88         * @param[in]    rhs             An instance of %Dimension
89         */
90         Dimension& operator =(const Dimension& rhs);
91
92         /**
93          * Checks whether the two instances of %Dimension have equal width and height values.
94          *
95          * @since                       2.0
96          *
97          * @return              @c true if the values of the width and height of the two instances of %Dimension are equal, @n
98          *                              else @c false
99          * @param[in]   rhs             An instance of %Dimension
100          */
101         bool operator ==(const Dimension& rhs) const;
102
103         /**
104          * Checks whether the two instances of %Dimension have different width and height values.
105          *
106          * @since                       2.0
107          *
108          * @return              @c true if the values of the width and the height of the two instances of %Dimension are not equal, @n
109          *                              else @c false
110          * @param[in]   rhs             An instance of %Dimension
111          */
112         bool operator !=(const Dimension& rhs) const;
113
114         /**
115          * Checks whether the value of the current instance of %Dimension equals the value of the specified instance.
116          *
117          * @since                       2.0
118          *
119          * @return              @c true if the value of the current instance equals the value of the specified instance, @n
120          *               else @c false
121          * @param[in]   rhs             An instance of %Dimension
122          * @remarks             The %Dimension class has a semantic value, which means that the
123          *                              Equals() method checks whether the two instances have the same width and height.
124          */
125         virtual bool Equals(const Tizen::Base::Object& rhs) const;
126
127         /**
128          * Gets the hash value of the current instance.
129          *
130          * @since               2.0
131          *
132          * @return              The hash value of the current instance
133          * @remarks             Two equal instances must return the same hash value. For better performance,
134          *                              the used hash function must generate a random distribution for all inputs.
135          */
136         virtual int GetHashCode(void) const;
137
138         /**
139          * Sets the size of the current instance of %Dimension.
140          *
141          * @since                       2.0
142          *
143          * @param[in]   width           The new width
144          * @param[in]   height          The new height
145          */
146         void SetSize(int width, int height);
147
148 public:
149         /**
150          * The width of the current instance of %Dimension.
151          *
152          * @since       2.0
153          */
154         int width;
155
156         /**
157          * The height of the current instance of %Dimension.
158          *
159          * @since       2.0
160          */
161         int height;
162
163 private:
164         friend class _DimensionImpl;
165
166         //
167         // This variable is for internal use only.
168         // Using this variable can cause behavioral, security-related, and consistency-related issues in the application.
169         //
170         // @since 2.0
171         //
172         class _DimensionImpl * __pImpl;
173
174 }; // Dimension
175
176 }} // Tizen::Graphics
177
178 #endif // _FGRP_DIMENSION_H_