Move more public-api headers to devel-api. PART 2
[platform/core/uifw/dali-adaptor.git] / adaptors / public-api / adaptor-framework / device-layout.h
1 #ifndef __DALI_DEVICE_LAYOUT_H__
2 #define __DALI_DEVICE_LAYOUT_H__
3
4 /*
5  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/math/vector2.h>
23
24 namespace Dali
25 {
26
27 /**
28  * @brief The attributes of the screen on the device.
29  *
30  * An application can specify the base layout that they used by inputting the values in this
31  * structure and passing it to the Application or Adaptor class.
32  * @see Dali::Application::Application(* argc, char **argv[], DeviceLayout baseLayout)
33  * @see Dali::Adaptor::Adaptor(RenderSurface& surface, DeviceLayout baseLayout)
34  */
35 struct DALI_IMPORT_API DeviceLayout
36 {
37 public: // Construction & Destruction
38
39   /**
40    * @brief Default Constructor.
41    */
42   DeviceLayout();
43
44   /**
45    * @brief Create a DeviceLayout with specific parameters.
46    * @param[in]  resolution       The resolution of the screen the application is based upon.
47    * @param[in]  screenSize       The size of the screen the application is based upon.
48    * @param[in]  dpi              The DPI of the screen the application is based upon.
49    * @param[in]  viewingDistance  The default viewing distance of the screen the application is based upon.
50    */
51   DeviceLayout(Vector2 resolution, float screenSize, Vector2 dpi, float viewingDistance);
52
53   /**
54    * @brief Destructor.
55    */
56   ~DeviceLayout();
57
58 public: // Data
59
60   Vector2 resolution;      ///< Resolution (width and height) of the screen.
61   float   screenSize;      ///< Size of the screen in inches (diagonal size).
62   Vector2 dpi;             ///< DPI (Dots per Inch) of the screen on the device (x & y).
63   float   viewingDistance; ///< Average distance between the user and the device.
64
65 public: // Defaults Layouts
66
67   /**
68    * @brief This is the default base layout that Dali will assume if no layout is passed in from the
69    * application.
70    *
71    * Resolution:        720.0f x 1280.0f
72    * Screen Size:       4.65f
73    * DPI:               316.0f x 316.0f
74    * Viewing Distance:  30.0f
75    */
76   static const DeviceLayout DEFAULT_BASE_LAYOUT;
77 };
78
79 } // namespace Dali
80
81 #endif // __DALI_DEVICE_LAYOUT_H__