0084a645bfbf9ceefe72b351d864e5ec762682c0
[apps/home/b2-clocksetting.git] / include / setting-battery.h
1 /*
2  * Copyright (c) 2010 Samsung Electronics, Inc.
3  * All rights reserved.
4  *
5  * This software is a confidential and proprietary information
6  * of Samsung Electronics, Inc. ("Confidential Information").  You
7  * shall not disclose such Confidential Information and shall use
8  * it only in accordance with the terms of the license agreement
9  * you entered into with Samsung Electronics.
10  */
11 /*
12  * setting-battery.h
13  *
14  *  Created on: Oct 12, 2013
15  *      Author: min-hoyun
16  */
17
18 #ifndef SETTING_BATTERY_H_
19 #define SETTING_BATTERY_H_
20
21 #include <Elementary.h>
22 #include <libintl.h>
23 #include <string.h>
24 #include <device.h>
25
26 struct _battery_menu_item {
27         char *name;
28         int is_enable;
29         void (*func)(void *data, Evas_Object *obj, void *event_info);
30 };
31
32 enum {
33         CHARGING_NONE,
34         CHARGING_AC,
35         CHARGING_USB
36 };
37
38 enum {
39         BATT_MENU_STATUS,
40         //BATT_MENU_PERCENT,
41         BATT_MENU_POWER_SAVING
42 };
43
44 struct _battery_info {
45         int percent;
46         int is_charging;
47 };
48
49 Ecore_Timer * battery_timer;
50
51 int percent;
52 bool is_charging;
53 bool prev_charging_state;
54 int image_index;
55 int is_alive;
56
57
58 // ----------------method----------------------//
59
60 Evas_Object* _create_battery_list(void* data);
61
62 Evas_Object *_battery_status_cb(void *data);
63 void _clear_battery_cb(void *data , Evas *e, Evas_Object *obj, void *event_info);
64 Eina_Bool _clear_battery_list_cb(void *data, Elm_Object_Item *it);
65 void _start_timer_for_update(Evas_Object * obj);
66
67 void _initialize_battery();
68
69 #endif /* SETTING_BATTERY_H_ */