68
70
gboolean highBatteryWitness;
69
71
gboolean lowBatteryWitness;
70
72
gboolean criticalBatteryWitness;
72
73
gint lowBatteryValue;
73
74
const gchar *cGThemePath;
74
75
gchar *cSoundPath[POWER_MANAGER_NB_CHARGE_LEVEL];
75
gboolean bUseDBusFallback;
77
77
gdouble fLastDischargeMeanRate;
78
78
gdouble fLastChargeMeanRate;
83
83
MyAppletEffect iEffect;
91
gboolean bBatteryPresent;
95
#ifdef CD_UPOWER_AVAILABLE
96
UpClient *pUPowerClient;
97
UpDevice *pBatteryDevice;
99
gpointer pUPowerClient; // will stay NULL.
100
gpointer pBatteryDevice; // will stay NULL.
86
104
#define PM_NB_VALUES 100
87
105
struct _AppletData {
106
CairoDockTask *pTask;
107
#ifdef CD_UPOWER_AVAILABLE
108
UpClient *pUPowerClient;
110
gpointer pUPowerClient; // will stay NULL.
112
gchar *cBatteryStateFilePath;
113
gboolean bProcAcpiFound;
114
gboolean bSysClassFound;
119
gdouble fMaxAvailableCapacity;
124
gboolean bBatteryPresent;
126
gint iPrevPercentage;
127
gboolean bPrevOnBattery;
88
129
cairo_surface_t *pSurfaceBattery;
89
130
cairo_surface_t *pSurfaceCharge;
91
gboolean battery_present, prev_battery_present;
93
gboolean on_battery, previously_on_battery;
94
gdouble battery_time, previous_battery_time;
95
gdouble battery_charge, previous_battery_charge;
97
133
gboolean bCritical;
100
gchar *cBatteryStateFilePath;
102
gdouble fRateHistory[PM_NB_VALUES];
136
/**gdouble fRateHistory[PM_NB_VALUES];
103
137
gint iCurrentIndex;
107
140
gdouble fChargeMeanRate;
108
141
gint iNbChargeMeasures;
109
142
gdouble fDischargeMeanRate;
110
143
gint iNbDischargeMeasures;
145
gint iStatPercentage;
146
gint iStatPercentageBegin;
112
150
CairoEmblem *pEmblem;