2 * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
4 * This program is licensed under the terms and conditions of the
5 * Apache License, version 2.0. The full text of the Apache License is at
6 * http://www.apache.org/licenses/LICENSE-2.0
10 * @brief window control
14 #include "CicoHSWindowController.h"
16 #include "CicoSystemConfig.h"
18 Ecore_Evas *CicoHSWindowController::ms_ecoreEvas = NULL;
20 /*============================================================================*/
22 /*============================================================================*/
23 /*--------------------------------------------------------------------------*/
25 * @brief CicoHSWindowController::CicoHSWindowController
28 /*--------------------------------------------------------------------------*/
29 CicoHSWindowController::CicoHSWindowController()
33 /*--------------------------------------------------------------------------*/
35 * @brief CicoHSWindowController::CicoHSWindowController
38 /*--------------------------------------------------------------------------*/
39 CicoHSWindowController::~CicoHSWindowController()
43 /*--------------------------------------------------------------------------*/
45 * @brief CicoHSWindowController::Initialize
51 /*--------------------------------------------------------------------------*/
53 CicoHSWindowController::Initialize(void)
56 /* Reset a ecore_evas */
57 ret = ecore_evas_init();
58 ICO_DBG("CicoHSWindowController::Initialize: ecore_evas_init retrun %d",
62 /*--------------------------------------------------------------------------*/
64 * @brief CicoHSWindowController::Finalize
70 /*--------------------------------------------------------------------------*/
72 CicoHSWindowController::Finalize(void)
74 /* end the ecore_evas */
75 ecore_evas_shutdown();
78 /*--------------------------------------------------------------------------*/
80 * @brief CicoHSWindowController::GetFullScreenSize
81 * get size of full screen
83 * @param[in] orientation vertial or horizontal
84 * @param[out] width width of window
85 * @param[out] height heigth of window
88 /*--------------------------------------------------------------------------*/
90 CicoHSWindowController::GetFullScreenSize(int orientation,
91 int *width, int *height)
93 ICO_TRA("CicoHSWindowController::GetFullScreenSize Enter");
95 int display_width = 0;
96 int display_height = 0;
98 ms_ecoreEvas = ecore_evas_new(NULL, 0, 0, 1, 1, "frame=0");
100 /* getting size of screen */
101 /* home screen size is full of display*/
102 ecore_wl_screen_size_get(&display_width, &display_height);
104 ICO_DBG("ecore_wl_screen_size_get => w/h=%d/%d",
105 display_width, display_height);
107 #if 1 /* 2014/07/16 ecore_wl_screen_size_get() bug */
108 if ((display_width <= 0) || (display_height <= 0)) {
109 const CicoSCDisplayConf* dispconf = CicoSystemConfig::getInstance()
110 ->findDisplayConfbyId(0);
112 // if Ecore has no full screen size, get from configuration
113 display_width = dispconf->width;
114 display_height = dispconf->height;
115 ICO_DBG("Screen size w/h=%d/%d from Config", display_width, display_height);
118 // if Ecore and config has no full screen size, fixed vaule
119 display_width = 1080;
120 display_height = 1920;
121 ICO_DBG("Screen size w/h=1080/1920 fixed");
124 #endif /* 2014/07/16 ecore_wl_screen_size_get() bug */
126 *width = display_width;
127 *height = display_height;
129 ICO_TRA("CicoHSWindowController::GetFullScreenSize Leave(w/h=%d/%d)", *width, *height);
131 // vim:set expandtab ts=4 sw=4: