1 #ifndef __DALI_DEVICE_LAYOUT_H__
2 #define __DALI_DEVICE_LAYOUT_H__
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/math/vector2.h>
28 * @brief The attributes of the screen on the device.
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)
35 struct DALI_IMPORT_API DeviceLayout
37 public: // Construction & Destruction
40 * @brief Default Constructor.
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.
51 DeviceLayout(Vector2 resolution, float screenSize, Vector2 dpi, float viewingDistance);
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.
65 public: // Defaults Layouts
68 * @brief This is the default base layout that Dali will assume if no layout is passed in from the
71 * Resolution: 720.0f x 1280.0f
73 * DPI: 316.0f x 316.0f
74 * Viewing Distance: 30.0f
76 static const DeviceLayout DEFAULT_BASE_LAYOUT;
81 #endif // __DALI_DEVICE_LAYOUT_H__