3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Flora License, Version 1.1 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://floralicense.org/license/
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an AS IS BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 #ifndef __SETTING_PHONE_H__
18 #define __SETTING_PHONE_H__
21 #include <Elementary.h>
23 #include <glib-object.h>
25 #include <setting-common-draw-widget.h>
26 #include <setting-common-view.h>
33 #include <tapi_common.h>
35 #include <TapiUtility.h>
37 #include <unicode/ucal.h>
38 #include <unicode/uloc.h>
39 #include <unicode/udat.h>
40 #include <unicode/ustring.h>
41 #include <unicode/udatpg.h>
42 #include <unicode/utmscale.h>
44 /* Choose default programe*/
45 #define Display_APP_Full_Name 1
46 #define MAX_APP_NAME 1024
47 #define IMAGES_MIME_TYPE "image/png" /* temporary implement */
48 #define SOUNDS_MIME_TYPE "audio/mpeg" /* temporary implement */
49 #define VIDEOS_MIME_TYPE "video/3gpp" /* temporary implement */
50 #define OTHERS_MIME_TYPE "application/pdf" /* temporary implement */
51 #define TBL_NAME "menu"
52 #define MIME_FIELD_NAME "mimetype"
53 #define NAME_BUF_LEN (128)
55 #define REGION_ITEM_MAX 300
57 #define ASK_DEREG_PHONE "<linesize=44>Your phone is<br>already registered.<br> Are you sure you<br>wish to deregister?"
58 #define REGISTRATION_GET_FAILED "Failed to get registration code"
59 #define REGISTRATION_INDICATOT "<br><br><br><br>Your device<br>registration code:<br><br>"
60 #define REGISTRATION_AT "<br><br><br>Register at"
61 #define DEREGISTRATION_INDICATOT "<br><br><br><br>Your device<br>deregistration code:<br><br>"
62 #define EREGISTRATION_AT "<br><br><br>Deregister at"
63 #define TRANSFER_INFO "Your recommendation information is also sent with the file you transfer"
65 typedef struct _SettingPhoneUG SettingPhoneUG;
68 * Setting Phone UG context
69 * all UG function has void* as an agument. this is casted back to SettingPhoneUG
70 * and the functions access app context.
72 struct _SettingPhoneUG {
76 /* add more variables here (move your appdata to here) */
78 Evas_Object *win_main_layout;
80 ui_gadget_h ug_loading;
82 Evas_Object *gl_lang_region;
84 Evas_Object *gl_region;
86 Evas_Object *navi_bar;
88 Evas_Object *popup_clear_license;
89 void (*popup_cb) (void *data, Evas_Object *obj, void *event_info);
91 int intial_shaking_value;
93 Evas_Object *ly_language;
96 Evas_Object *chk_lang;
97 int prev_lang; /** prev is used for special lang. */
99 //bundle *bundle_data;
100 service_h bundle_data;
101 setting_view *view_to_load;
102 TelSimImsiInfo_t imsi;
103 const char *sim_lang; /** is just used for '0' (automatic). */
104 Elm_Genlist_Item_Class itc_1text;
105 Elm_Genlist_Item_Class itc_1text_1icon_2;
106 Elm_Genlist_Item_Class itc_1text_1icon;
107 Elm_Genlist_Item_Class itc_seperator;
108 Elm_Genlist_Item_Class itc_2text_3_parent;
109 Elm_Genlist_Item_Class itc_1icon_1text_sub;
110 Elm_Genlist_Item_Class itc_1icon_2text;
112 // [view] Language & Region
113 Setting_GenGroupItem_Data *data_display_language;
114 Setting_GenGroupItem_Data *data_region_fmt;
115 Setting_GenGroupItem_Data *data_region_fmt_example;
117 Evas_Object *chk_region;
119 char *region_keyStr[REGION_ITEM_MAX];
120 char *region_desc[REGION_ITEM_MAX];
121 int region_index[REGION_ITEM_MAX];
124 int gl_region_cur_index;
125 int selected_region_idx;
126 char *region_vconf_str;
127 Elm_Genlist_Item_Class itc_2text_2;
128 Elm_Genlist_Item_Class itc_bg_1icon;
129 UDateTimePatternGenerator *pattern_generator;
131 Elm_Object_Item *selected_item;
133 Evas_Object *pop_progress;
134 Evas_Object *search_bar;
135 char search_text[MAX_SEARCH_STR_LEN + 1];
136 Ecore_Idler *search_idler;
137 Ecore_Animator *animator;
140 /* extern setting_view setting_view_phone_main; */
141 extern setting_view setting_view_phone_language_region;
142 extern setting_view setting_view_phone_display_language;
143 extern setting_view setting_view_phone_region_format;
145 /* void setting_phone_lang_changed_cb(void *data); */
146 int app_terminate_dead_cb(int pid, void *data);
147 extern char *setting_phone_lang_get_region_str(const char *region);
148 extern char *setting_phone_lang_get_by_pattern(const char *locale,
149 const char *skeleton,
151 extern char *setting_phone_lang_get_example_desc(const char *region,
154 * Change language string to UTF8 format, the invoker need to free the return string
156 * @param unichars The source string will be translated.
158 * @return UTF8 format string.
160 extern char *setting_phone_lang_str_to_utf8(const UChar *unichars);
162 #endif /* __SETTING_PHONE_H__ */