tizen 2.3.1 release
[apps/home/b2-clocksetting.git] / include / setting-safety.h
1 /*
2  *  Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  *  Licensed under the Flora License, Version 1.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
7  *
8  *      http://floralicense.org/license/
9  *
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.
15  *
16  */
17 /*
18  * setting-safety.h
19  *
20  *  Created on: Jan 14, 2014
21  *      Author: min-hoyun
22  */
23
24 #ifndef SETTING_SAFETY_H_
25 #define SETTING_SAFETY_H_
26
27 #include <Elementary.h>
28 #include "util.h"
29
30 #define SAFETY_MENU_ITEM_COUNT  5
31
32 struct _safety_menu_item {
33         char *name;
34         char *sub_name;
35         void (*func)(void *data, Evas_Object *obj, void *event_info);
36 };
37
38 struct _set_interval_menu_item {
39         char *title;
40         char *sub_title;
41         void (*func)(void *data, Evas_Object *obj, void *event_info);
42 };
43
44 typedef struct safety_Item_Data {
45         int index;
46         Elm_Object_Item *item;
47 } Safety_Item_Data;
48
49 struct _interval_trauma_menu_item {
50         char *str;
51         char *time;
52 };
53
54 typedef struct _safety_data {
55         int is_support_emergency;
56         int is_enable_emergency_mode;
57         int is_enable_trauma;
58         int is_enable_no_activity;
59         int interval_trauma;
60         int interval_no_activity;
61
62         appdata *temp_ad;
63
64         Evas_Object *g_safety_genlist;
65         Evas_Object *g_interval_genlist;
66
67 } Safety_Data;
68
69 Evas_Object *create_safety_list(void *data);
70 Eina_Bool clear_safety_cb(void *data, Elm_Object_Item *it);
71
72 static void _emergency_mode_cb(void *data, Evas_Object *obj, void *event_info);
73 static void _trauma_cb(void *data, Evas_Object *obj, void *event_info);
74 static void _no_activity_cb(void *data, Evas_Object *obj, void *event_info);
75 static void _set_interval_cb(void *data, Evas_Object *obj, void *event_info);
76 static void _help_cb(void *data, Evas_Object *obj, void *event_info);
77
78 static void show_interval_list(void *data);
79 static void _trauma_interval_cb(void *data, Evas_Object *obj, void *event_info);
80 static void _no_activity_interval_cb(void *data, Evas_Object *obj, void *event_info);
81
82 static void _show_interval_trauma_list(void *data);
83 static void _show_interval_no_activity_list(void *data);
84 void _help_popup_cb(void *data, Evas_Object *obj, void *event_info);
85 void _disable_emergency_popup_cb(void *data, Evas_Object *obj, void *event_info);
86
87 #endif /* SETTING_SAFETY_H_ */