2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include <Elementary.h>
20 #include <app_debug.h>
21 #include <app_define.h>
34 static Evas_Object *_add_win(const char *name)
38 win = elm_win_add(NULL, name, ELM_WIN_BASIC);
40 _ERR("elm_win_add failed");
43 elm_win_title_set(win, PACKAGE);
44 elm_win_focus_highlight_enabled_set(win, EINA_FALSE);
45 elm_win_focus_highlight_style_set(win, "invisible");
46 efl_util_set_window_opaque_state(win, 1);
48 evas_object_show(win);
53 static bool _create(void *data)
59 _ERR("failed to get data");
65 elm_app_base_scale_set(APP_BASE_SCALE);
67 win = _add_win(ad->name);
69 _ERR("failed to create win object");
73 if (!viewmgr_create(win)) {
74 _ERR("failed to initialize viewmgr");
79 viewmgr_add_view(view_bgimage_get_vclass(), NULL);
82 viewmgr_show_view(VIEW_BGIMAGE);
87 static void _terminate(void *data)
92 _ERR("failed to get data");
99 viewmgr_remove_view(VIEW_BGIMAGE);
100 evas_object_del(ad->win);
105 int main(int argc, char *argv[])
108 ui_app_lifecycle_callback_s cbs = {
110 .terminate = _terminate,
113 memset(&ad, 0x00, sizeof(ad));
116 return ui_app_main(argc, argv, &cbs, &ad);