summaryrefslogtreecommitdiff
path: root/battstat/battstat.h
diff options
context:
space:
mode:
Diffstat (limited to 'battstat/battstat.h')
-rw-r--r--battstat/battstat.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/battstat/battstat.h b/battstat/battstat.h
index 77ff8f10..994f7e7e 100644
--- a/battstat/battstat.h
+++ b/battstat/battstat.h
@@ -56,13 +56,20 @@ typedef enum
STATUS_PIXMAP_NUM
} StatusPixmapIndex;
+typedef enum
+{
+ POWER_STATUS_OFF = 0,
+ POWER_STATUS_ON,
+ POWER_STATUS_UNKNOWN
+} PowerStatus;
+
typedef struct
{
- gboolean on_ac_power;
- gboolean charging;
- gboolean present;
- gint minutes;
- gint percent;
+ PowerStatus on_ac_power;
+ PowerStatus charging;
+ gboolean present;
+ gint minutes;
+ gint percent;
} BatteryStatus;
typedef enum
@@ -133,12 +140,12 @@ typedef struct _ProgressData {
int timeout;
/* last_* for the benefit of the check_for_updates function */
- guint last_batt_life;
- guint last_acline_status;
+ guint last_batt_life;
StatusPixmapIndex last_pixmap_index;
- guint last_charging;
- guint last_minutes;
- gboolean last_present;
+ PowerStatus last_acline_status;
+ PowerStatus last_charging;
+ gboolean last_present;
+ guint last_minutes;
} ProgressData;
/* battstat_applet.c */
@@ -151,6 +158,6 @@ const char *power_management_getinfo (BatteryStatus *status);
const char *power_management_initialise (void (*callback) (void));
void power_management_cleanup (void);
-int power_management_using_upower (void);
+gboolean power_management_using_upower (void);
#endif /* _battstat_h_ */