Modify the drawing strategy of 'Setting->about phone' and to fix the blank issue..
[apps/core/preloaded/settings.git] / setting-about / include / setting-about.h
1 /*
2  * setting
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
5  *
6  * Contact: MyoungJune Park <mj2004.park@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21 #ifndef __SETTING_ABOUT_H__
22 #define __SETTING_ABOUT_H__
23
24 #include <stdio.h>
25 #include <Elementary.h>
26 #include <ITapiSim.h>
27
28 #include <glib-object.h>
29
30 #include <iniparser.h>
31 // #include <mobileap_lib.h>
32
33 #include <setting-common-draw-widget.h>
34 #include <setting-common-view.h>
35
36 #include <TapiUtility.h>
37 #include <tapi_common.h>
38 #include <ITapiSim.h>
39
40 #define MAX_DISPLAY_STR_LEN_ON_PHONE_INFO       256
41
42 #define SETTING_ABOUT_PROGRESSBAR_TIMEOUT 10
43 //#define SETTING_ABOUT_MOBILE_AP_TURNED_OFF "Mobile hotspot will be turned off."
44 #define SETTING_ABOUT_MOBILE_AP_TURNED_OFF "Wi-Fi hotspot will be turned off if Device name is changed."
45
46 #define SETTING_ABOUT_MY_NUMBERS_LEN 3
47 #define SETTING_ABOUT_WIFI_MAC_STR_LEN 17
48 #define SETTING_ABOUT_DEFAULT_DEVICE_NAME       "Redwood"
49
50 typedef struct _SettingAboutUG SettingAboutUG;
51
52 /**
53  * Setting About UG context
54  * all UG function has void* as an agument. this is casted back to SettingAboutUG
55  * and the functions access app context.
56  */
57 struct _SettingAboutUG {
58         ui_gadget_h ug;
59         TapiHandle *handle;
60         bool tapi_responsed;
61
62         setting_view *view_to_load;
63
64         Elm_Genlist_Item_Class itc_1text;
65         Elm_Genlist_Item_Class itc_1icon;
66         Elm_Genlist_Item_Class itc_2text_2;
67         Elm_Genlist_Item_Class itc_seperator;
68         Elm_Genlist_Item_Class itc_group_item;
69         Elm_Genlist_Item_Class itc_2text_3_parent;
70         Elm_Genlist_Item_Class itc_1icon_1text_sub;
71         Elm_Genlist_Item_Class itc_help_style;
72
73         /* add more variables here (move your appdata to here) */
74         Evas *evas;
75         Evas_Object *win_main_layout;
76         Evas_Object *win_get;
77
78         ui_gadget_h ug_loading;
79
80         Evas_Object *navi_bar;
81         Evas_Object *ly_main;
82         Evas_Object *genlsit;
83         Elm_Object_Item *navi_item;
84
85         Ecore_Timer *update_timer;
86         Setting_GenGroupItem_Data *item_dev_name;
87         Setting_GenGroupItem_Data *item_data_cpu;
88         Setting_GenGroupItem_Data *item_data_battery;
89         Setting_GenGroupItem_Data *item_data_bt;
90         Setting_GenGroupItem_Data *item_data_wifi;
91         Evas_Object *popup;
92         bool empty_flag;
93         //char *my_numbers[SETTING_ABOUT_MY_NUMBERS_LEN];
94         TelSimMsisdnList_t my_numbers;
95         bool popup_showed_flag; /** if popup has been showed, do not show again*/
96 //      MOBILE_AP_HANDLE mobile_ap_handle;
97 };
98
99 extern setting_view setting_view_about_main;
100 extern int setting_about_generate_genlist(void *data);
101 void setting_about_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, void *priv);
102 void setting_about_main_exp_cb(void *data, Evas_Object *obj, void *event_info);
103
104 #endif                          /* __SETTING_ABOUT_H__ */