fix bug when on_resume cb is called
[framework/location/ug-setting-location-efl.git] / libug-setting-location-efl.h
1 /*
2  * Copyright 2012  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://www.tizenopensource.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 #ifndef __libug_setting_location_efl_H__
18 #define __libug_setting_location_efl_H__
19
20 #include <Elementary.h>
21 #include <ui-gadget.h>
22 #include <libintl.h>
23 #include <locations.h>
24 #include <dlog.h>
25 #include <glib.h>
26 #include <location-appman.h>
27
28 #define _EDJ(x)                 (Evas_Object *)elm_layout_edje_get(x)
29
30 #define PKGNAME                 "ug-setting-location-efl"
31
32 #define _(s)                    dgettext(PKGNAME, s)
33 #define S_(s)                   dgettext("sys_string", s)
34 #define dgettext_noop(s)        (s)
35 #define N_(s)                   dgettext_noop(s)
36
37 #define KEY_ENABLED     1
38 #define KEY_DISABLED    0
39
40 typedef struct {
41         char package[64];
42         Evas_Object *tg;
43         Elm_Object_Item *gi_app;
44         Elm_Genlist_Item_Class *itc_app;
45 } location_appman_info;
46
47 struct ug_data {
48         Evas_Object *base;
49
50         ui_gadget_h ug;
51
52         Evas_Object *naviframe;
53         Evas_Object *genlist;
54         Elm_Object_Item *gi_gps, *gi_net, *gi_agps;
55         Elm_Object_Item *gi_mypos, *gi_help, *gi_msg, *gi_line, *gi_bot_sep;
56         Elm_Object_Item *gi_lat, *gi_long, *gi_alt, *gi_speed;
57         Evas_Object *tg_gps, *tg_net, *tg_agps;
58         Elm_Genlist_Item_Class *itc_gps, *itc_agps, *itc_net, *itc_mypos, *itc_help;
59         Elm_Genlist_Item_Class *itc_sep, *itc_line, *itc_msg, *itc_help_msg, *itc_bot_sep;
60         Elm_Genlist_Item_Class *itc_lat, *itc_long, *itc_alt, *itc_speed;
61         int is_gps, is_net, is_agps;
62
63         location_manager_h loc;
64         double latitude, longitude, altitude, speed;
65
66         location_appman_info *app_info;
67         int app_count;
68 };
69
70 #endif                          /* __libug_setting_location_efl_H__ */