2 * Copyright 2012 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://www.tizenopensource.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.
18 #ifndef __SETTING_PHONE_H__
19 #define __SETTING_PHONE_H__
22 #include <appcore-efl.h>
23 #include <Elementary.h>
26 #include <glib-object.h>
27 #include <ui-gadget.h>
28 #include <ui-gadget-module.h>
31 #include <setting-common-draw-widget.h>
32 #include <setting-common-view.h>
39 #include <TapiEvent.h>
40 #include <ITapiNetwork.h>
42 #include <unicode/ucal.h>
43 #include <unicode/uloc.h>
44 #include <unicode/udat.h>
45 #include <unicode/ustring.h>
46 #include <unicode/udatpg.h>
47 #include <unicode/utmscale.h>
49 /* Choose default programe*/
50 #define Display_APP_Full_Name 1
51 #define MAX_APP_NAME 1024
52 #define IMAGES_MIME_TYPE "image/png" /* temporary implement */
53 #define SOUNDS_MIME_TYPE "audio/mpeg" /* temporary implement */
54 #define VIDEOS_MIME_TYPE "video/3gpp" /* temporary implement */
55 #define OTHERS_MIME_TYPE "application/pdf" /* temporary implement */
56 #define TBL_NAME "menu"
57 #define MIME_FIELD_NAME "mimetype"
58 #define NAME_BUF_LEN (128)
60 #define REGION_ITEM_MAX 300
62 typedef struct _SettingPhoneUG SettingPhoneUG;
65 * Setting Phone UG context
66 * all UG function has void* as an agument. this is casted back to SettingPhoneUG
67 * and the functions access app context.
69 struct _SettingPhoneUG {
72 /* add more variables here (move your appdata to here) */
74 Evas_Object *win_main_layout;
77 Evas_Object *gl_lang_region;
79 Evas_Object *gl_region;
81 Evas_Object *navi_bar;
83 Evas_Object *popup_clear_license;
84 void (*popup_cb) (void *data, Evas_Object *obj, void *event_info);
86 int intial_shaking_value;
88 Evas_Object *ly_language;
89 Evas_Object *ly_ticker;
90 Evas_Object *ly_license;
92 Setting_GenGroupItem_Data *data_n_dsp;
93 Setting_GenGroupItem_Data *data_n_msg;
94 Setting_GenGroupItem_Data *data_n_vmail;
95 Setting_GenGroupItem_Data *data_n_email;
97 Setting_GenGroupItem_Data *data_n_sns;
98 Setting_GenGroupItem_Data *data_n_file;
100 Evas_Object *chk_lang;
101 int prev_lang; /** prev is used for special lang. */
102 Setting_GenGroupItem_Data *data_tracking;
103 Setting_GenGroupItem_Data *data_expiry;
104 Setting_GenGroupItem_Data *data_roaming_nw;
107 Setting_GenGroupItem_Data *data_reg;
108 Setting_GenGroupItem_Data *data_dereg;
109 Evas_Object *pop_dereg;
110 int mode; /* 0: reg, 1: dereg */
112 Evas_Object *chk_tracking;
113 Evas_Object *chk_expiry;
116 setting_view *view_to_load;
117 TelSimImsiInfo_t imsi;
118 const char *sim_lang; /** is just used for '0' (automatic). */
119 Elm_Genlist_Item_Class itc_1text;
120 Elm_Genlist_Item_Class itc_1text_1icon_2;
121 Elm_Genlist_Item_Class itc_1text_1icon;
122 Elm_Genlist_Item_Class itc_seperator;
123 Elm_Genlist_Item_Class itc_2text_3_parent;
124 Elm_Genlist_Item_Class itc_1icon_1text_sub;
126 Setting_GenGroupItem_Data *data_display_language;
127 Setting_GenGroupItem_Data *data_region_fmt;
128 Setting_GenGroupItem_Data *data_region_fmt_example;
129 Evas_Object *chk_region;
131 char *region_keyStr[REGION_ITEM_MAX];
132 char *region_desc[REGION_ITEM_MAX];
133 int region_index[REGION_ITEM_MAX];
136 int gl_region_cur_index;
137 int selected_region_idx;
138 char *region_vconf_str;
139 Elm_Genlist_Item_Class itc_2text_2;
140 Elm_Genlist_Item_Class itc_bg_1icon;
141 UDateTimePatternGenerator *pattern_generator;
143 Elm_Object_Item *selected_item;
145 Evas_Object *pop_progress;
146 Eina_List *killed_pid_list;
147 Evas_Object *search_bar;
148 char search_text[MAX_SEARCH_STR_LEN + 1];
149 Ecore_Idler *search_idler;
150 Ecore_Animator *animator;
153 /* extern setting_view setting_view_phone_main; */
154 extern setting_view setting_view_phone_language_region;
155 extern setting_view setting_view_phone_ticker_notification;
156 extern setting_view setting_view_phone_license_main;
157 extern setting_view setting_view_phone_license_divx_main;
158 extern setting_view setting_view_phone_license_divx_mode;
159 extern setting_view setting_view_phone_display_language;
160 extern setting_view setting_view_phone_region_format;
162 /* void setting_phone_lang_changed_cb(void *data); */
163 int app_terminate_func(const aul_app_info *info, void *data);
164 int app_terminate_dead_cb(int pid, void *data);
165 extern char *setting_phone_lang_get_region_str(const char *region);
166 extern char *setting_phone_lang_get_by_pattern(const char *locale,
167 const char *skeleton,
169 extern char *setting_phone_lang_get_example_desc(const char *region,
172 * Change language string to UTF8 format, the invoker need to free the return string
174 * @param unichars The source string will be translated.
176 * @return UTF8 format string.
178 extern char *setting_phone_lang_str_to_utf8(const UChar *unichars);
180 #endif /* __SETTING_PHONE_H__ */