2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
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.
20 #include <Elementary.h>
21 #include <efl_assist.h>
24 #include "setting_debug.h"
34 #include <efl_extension.h>
37 #define IMG_DIR "/usr/apps/org.tizen.clocksetting/data/images/"
38 #define EDJE_PATH "/usr/apps/org.tizen.clocksetting/res/edje/clocksetting.edj"
40 #ifndef FEATURE_SETTING_CHANGEABLE
41 #define FEATURE_SETTING_CHANGEABLE
44 #ifdef FEATURE_SETTING_CHANGEABLE
45 #define COLOR_INFO_TABLE "/usr/apps/org.tizen.clocksetting/shared/res/tables/org.tizen.clocksetting_ChangeableColorInfo.xml"
51 #define SETTING_PACKAGE "clocksetting"
52 #define SYSTEM_PACKAGE "sys-string"
54 #define _(s) setting_gettext(s)
55 #define REPL(s,o,r) replace(s,o,r)
56 #define ICU_NUM(n) _get_strnum_from_icu(n)
71 SETTING_DOUBLE_PRESSING,
77 SETTING_VOLUME_2_DEPTH,
78 SETTING_SOUND_RINGTONE,
79 SETTING_SOUND_NOTIFICATION
94 typedef struct _appdata {
99 Evas_Object *win_main;
100 Evas_Object *conform;
102 Evas_Object *layout_main;
104 Evas_Object *datetime;
105 Evas_Object *alert_rdg;
106 Evas_Object *sound_mode_rdg;
107 Evas_Object *ringtone_type_rdg;
108 Evas_Object *notification_rdg;
109 Evas_Object *vibration_rdg;
110 Evas_Object *pref_arm_rdg;
111 Evas_Object *homescreen_rdg;
112 Evas_Object *double_rdg;
113 Evas_Object *safety_interval_trauma_rdg;
114 Evas_Object *safety_interval_no_activity_rdg;
116 Evas_Object *screen_timeout_rdg;
117 Evas_Object *font_size_rdg;
118 Evas_Object *font_style_rdg;
120 Evas_Object *language_rdg;
121 Evas_Object *wake_up_guesture_rdg;
122 Evas_Object *rotate_screen_rdg;
123 Elm_Object_Item *dt_genlist_item_of_time;
124 Elm_Object_Item *dt_genlist_item_of_date;
125 Elm_Object_Item *language_item;
127 Evas_Object *main_genlist;
131 int is_motion_smart_relay_on;
132 int is_motion_wake_up_on;
134 int is_show_ringtone_toast;
135 int is_show_noti_toast;
141 Evas_Object *indicator_layout;
143 #ifdef FEATURE_SETTING_CHANGEABLE
144 Ea_Theme_Color_Table *color_table;
148 Eext_Circle_Surface *circle_surface;
153 typedef struct _Item_Data {
155 Elm_Object_Item *item;
158 typedef struct _spin_date spin_date;
160 Evas_Object *spinner;
163 double posx1, posy1, posx2, posy2;
166 char *replace(char *str, char *orig, char *repl);
167 char *setting_gettext(const char *s);
169 void setting_popup_back_cb(void *data, Evas_Object *obj, void *event_info);
171 int is_connected_GM();
173 bool colorstr_to_decimal(char *color, int *R, int *G, int *B);
175 bool is_file_exist(char *file_path);