2
* This file is a part of the Cairo-Dock project
4
* Copyright : (C) see the 'copyright' file.
5
* E-mail : see the 'copyright' file.
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 3
10
* of the License, or (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
#ifndef __POWERMANAGER_STRUCT__
21
#define __POWERMANAGER_STRUCT__
23
#include <cairo-dock.h>
27
POWER_MANAGER_NOTHING = 0,
30
POWER_MANAGER_NB_QUICK_INFO_TYPE
31
} MyAppletQuickInfoType;
34
POWER_MANAGER_EFFECT_NONE = 0,
35
POWER_MANAGER_EFFECT_ZOOM,
36
POWER_MANAGER_EFFECT_TRANSPARENCY,
37
POWER_MANAGER_EFFECT_BAR,
41
POWER_MANAGER_CHARGE_CRITICAL = 0,
42
POWER_MANAGER_CHARGE_LOW,
43
POWER_MANAGER_CHARGE_FULL,
44
POWER_MANAGER_NB_CHARGE_LEVEL,
47
struct _AppletConfig {
49
MyAppletQuickInfoType quickInfoType;
52
gboolean batteryWitness;
53
gboolean highBatteryWitness;
54
gboolean lowBatteryWitness;
55
gboolean criticalBatteryWitness;
57
gchar *batteryWitnessAnimation;
59
const gchar *cGThemePath;
60
gchar *cSoundPath[POWER_MANAGER_NB_CHARGE_LEVEL];
61
gboolean bUseDBusFallback;
64
gchar *cUserBatteryIconName;
65
gchar *cUserChargeIconName;
66
MyAppletEffect iEffect;
69
#define PM_NB_VALUES 100
71
cairo_surface_t *pSurfaceBattery;
72
cairo_surface_t *pSurfaceCharge;
74
gboolean battery_present;
76
gboolean on_battery, previously_on_battery;
77
gdouble battery_time, previous_battery_time;
78
gdouble battery_charge, previous_battery_charge;
83
gchar *cBatteryStateFilePath;
85
gdouble fRateHistory[PM_NB_VALUES];