Fixed to add the AllWindowList
[platform/framework/native/uifw.git] / inc / FUiUiConfiguration.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        FUiUiConfiguration.h
20  * @brief       This is the header file for the %UiConfiguration class.
21  *
22  * This header file contains the declarations of the %UiConfiguration class.
23  */
24
25 #ifndef _FUI_UI_CONFIGURATION_H_
26 #define _FUI_UI_CONFIGURATION_H_
27
28 #include <FGrpColor.h>
29 #include <FUiUiConfigurationTypes.h>
30
31 namespace Tizen { namespace Base {
32 class String;
33 }} // Tizen::Base
34
35 namespace Tizen { namespace Ui {
36
37 /**
38  * @class       UiConfiguration
39  * @brief       This class provides various utility methods for UI configuration.
40  *
41  * @since 2.0
42  *
43  * The %UiConfiguration class provides various utility methods for UI configuration.
44  *
45  */
46 class _OSP_EXPORT_ UiConfiguration
47 {
48 public:
49         /**
50          * Sets the default font to all the Controls.
51          *
52          * @since 2.0
53          *
54          * @return      An error code
55          * @param[in]   fontName                        The app font name or system font name @n
56          *                                                                      The app font name is retrieved using Tizen::Graphics::GetFaceName(Tizen::Base::String& filepath).
57          *                                                                      The system font name is retrieved using Tizen::Graphics::Font::GetSystemFontListN().
58          *                                                                      Sets an empty string if you want to reset
59          * @exception   E_SUCCESS                       The method is successful.
60          * @exception   E_FILE_NOT_FOUND        The specified font cannot be found or accessed.
61          * @remarks                                             At First, the value of fontName is considered app font name if it matches one of the face names of the font files which is located in '/res/font'.
62          *                                                                      If not, the value of fontName is considered system font name if it matches one of the retrieved values using GetSystemFontListN().
63          * @remarks                                             The control first attempt to find the control font. If it fails, then it searches for the application default font and the system font, in sequence.
64          * @see                                                 GetDefaultFont()
65         */
66         static result SetDefaultFont(const Tizen::Base::String& fontName);
67
68         /**
69         * Gets the default font for all the Controls.
70         *
71         * @since 2.0
72         *
73         * @return                                                       The app font name or system font name @n
74         *                                                                       else an empty string if the default font is not set
75         * @see                                                          SetDefaultFont()
76         */
77         static Tizen::Base::String GetDefaultFont(void);
78
79         /**
80          * Sets the font of the control with the specified file name.
81          *
82          * @since 2.1
83          *
84          * @return             An error code
85          * @param[in]  fileName                                                         The file name of a font-resource located in @b '/res/font', @n
86          *                                                                                                              else sets an empty string to reset
87          * @exception  E_SUCCESS                                                                The method is successful.
88          * @exception  E_FILE_NOT_FOUND                                         The specified font cannot be found or accessed.
89          * @exception  E_UNSUPPORTED_FORMAT                             The specified font format is not supported.
90          * @see        GetDefaultFontFile()
91         */
92         static result SetDefaultFontFromFile(const Tizen::Base::String& fileName);
93
94         /**
95          * Gets a font file name of the control.
96          *
97          * @since 2.1
98          *
99          * @return                                      The font name set in the control  @n
100          *                                                      else an empty string if the font is not set
101          * @see                                 SetDefaultFontFromFile()
102         */
103         static Tizen::Base::String GetDefaultFontFile(void);
104
105         /**
106         * Gets the actual font size.
107         *
108         * @since 2.1
109         *
110         * @return                                       An actual font size of given font size string
111         * @param[in]  sizeString                The predefined string value, such as "giant", "huge", "large", "medium", or "small" @n
112         *                                               It is case-insensitive and can be retrieved using Tizen::System::SettingInfo::GetValue().
113         * @remarks                              If the specified @c sizeString is not defined, @c -1 is returned.
114         */
115         static float GetFontSize(const Tizen::Base::String& sizeString);
116
117         /**
118         * Gets the color of controls.
119         *
120         * @since 2.1
121         *
122         * @return     The color of the given color key
123         * @param[in]  colorKey                  The color key
124         * @exception  E_SUCCESS         The method is successful.
125         * @exception  E_KEY_NOT_FOUND   The specified color cannot be found or accessed.
126         * @remarks
127         *                       - Color keys are defined in FUiUiConfigurationTypes.h.
128         *                       - The specific error code can be accessed using the GetLastResult() method.
129         *                       - Using the return value without checking the return value of GetLastResult() is prohibited.
130         */
131         static Tizen::Graphics::Color GetColor(int colorKey);
132
133 private:
134         //
135         // This default constructor is intentionally declared as private because this class cannot be constructed.
136         //
137         UiConfiguration(void);
138
139         //
140         // This destructor is intentionally declared as private because this class cannot be constructed.
141         //
142          ~UiConfiguration(void);
143
144         //
145         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
146         //
147         UiConfiguration(const UiConfiguration& rhs);
148
149         //
150         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
151         //
152         UiConfiguration& operator =(const UiConfiguration& rhs);
153
154 }; // UiConfiguration
155
156 }} // Tizen::Ui
157
158 #endif // _FUI_UI_CONFIGURATION_H_