2 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
4 * Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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.
17 #include "gear-racing-controller.h"
18 #include "view/view_base.h"
19 #include "view/view_reset.h"
20 #include "view_manager/view_manager.h"
21 #include "controller/controller_reset.h"
23 typedef struct _s_view_reset {
27 static s_view_reset s_info = { 0,};
29 static void _layout_back_cb(void *data, Evas_Object *obj, void *event_info)
31 elm_win_lower(view_manager_get_win());
32 controller_reset_back_btn();
35 static void _ok_button_clicked_cb(void *data, Evas_Object *obj, void *event_info)
37 controller_reset_next_page();
40 static void _view_reset_create_gui(Evas_Object *parent)
42 s_info.layout = view_base_create_layout(parent, EDJ_FILE, GRP_MAIN);
43 eext_object_event_callback_add(s_info.layout, EEXT_CALLBACK_BACK, _layout_back_cb, NULL);
44 elm_layout_text_set(s_info.layout, "txt_title", "Reset");
46 view_base_create_button(s_info.layout, "Button_Ok", "Ok", _ok_button_clicked_cb, NULL);
47 view_base_create_button(s_info.layout, "Button_Cancel", "Cancel", NULL, NULL);
50 void view_reset_init(Evas_Object *parent)
52 controller_reset_init(NULL);
53 _view_reset_create_gui(parent);