2 * Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
4 * PROPRIETARY/CONFIDENTIAL
6 * This software is the confidential and proprietary information of
7 * SAMSUNG ELECTRONICS ("Confidential Information").
8 * You shall not disclose such Confidential Information and shall
9 * use it only in accordance with the terms of the license agreement
10 * you entered into with SAMSUNG ELECTRONICS.
11 * SAMSUNG make no representations or warranties about the suitability
12 * of the software, either express or implied, including but not
13 * limited to the implied warranties of merchantability, fitness for
14 * a particular purpose, or non-infringement.
15 * SAMSUNG shall not be liable for any damages suffered by licensee as
16 * a result of using, modifying or distributing this software or its derivatives.
23 #include "nsa-ui-widget.h"
24 #include "nsa-debug.h"
28 Evas_Object *nsa_create_main_layout(Evas_Object *parent)
32 retv_if(parent == NULL, NULL);
36 layout = elm_layout_add(parent);
37 retv_if(layout == NULL, NULL);
39 elm_object_focus_set(layout, EINA_FALSE);
40 elm_layout_theme_set(layout, "layout", "application", "default");
41 evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND,
44 evas_object_show(layout);
51 Evas_Object *nsa_create_theme_layout(Evas_Object *parent,
52 const char *clas, const char *group, const char *style)
56 retv_if(parent == NULL, NULL);
60 layout = elm_layout_add(parent);
61 retv_if(layout == NULL, NULL);
63 elm_object_focus_set(layout, EINA_FALSE);
64 elm_layout_theme_set(layout, clas, group, style);
65 evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND,
68 evas_object_show(layout);
75 Evas_Object *nsa_create_bg(Evas_Object *parent)
78 #if defined(PROCESS_POOL)
82 retv_if(parent == NULL, NULL);
86 #if defined(PROCESS_POOL)
87 win = (Evas_Object *)app_get_preinitialized_window(PACKAGE);
89 bg = app_get_preinitialized_background();
91 NSA_DEBUG_ERR("get bg fail");
92 bg = elm_bg_add(parent);
95 NSA_DEBUG_ERR("win is different");
96 bg = elm_bg_add(parent);
99 bg = elm_bg_add(parent);
101 retv_if(bg == NULL, NULL);
103 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND,
105 elm_win_resize_object_add(parent, bg);
107 evas_object_show(bg);
114 Evas_Object *nsa_create_conformant(Evas_Object *parent)
116 Evas_Object *conform;
117 #if defined(PROCESS_POOL)
121 retv_if(parent == NULL, NULL);
125 #if defined(PROCESS_POOL)
126 win = (Evas_Object *)app_get_preinitialized_window(PACKAGE);
128 conform = (Evas_Object *)app_get_preinitialized_conformant();
129 if (conform == NULL) {
130 NSA_DEBUG_ERR("get conform fail");
131 conform = elm_conformant_add(parent);
134 NSA_DEBUG_ERR("win is different");
135 conform = elm_conformant_add(parent);
138 conform = elm_conformant_add(parent);
140 retv_if(conform == NULL, NULL);
142 evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND,
144 elm_win_resize_object_add(parent, conform);
146 evas_object_show(conform);
153 Evas_Object* nsa_create_edj_layout(Evas_Object* parent,
160 retv_if(parent == NULL, NULL);
162 layout = elm_layout_add(parent);
163 retv_if(layout == NULL, NULL);
165 elm_object_focus_set(layout, EINA_FALSE);
168 elm_layout_file_set(layout, EDJ_FILE, edc_path);
170 evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND,
173 evas_object_show(layout);