~ubuntu-branches/ubuntu/saucy/cairo-dock-plug-ins/saucy

« back to all changes in this revision

Viewing changes to powermanager/src/powermanager-struct.h

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2009-08-26 21:07:39 UTC
  • Revision ID: james.westby@ubuntu.com-20090826210739-gyjuuqezrzuluao4
Tags: upstream-2.0.8.1
ImportĀ upstreamĀ versionĀ 2.0.8.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
* This file is a part of the Cairo-Dock project
 
3
*
 
4
* Copyright : (C) see the 'copyright' file.
 
5
* E-mail    : see the 'copyright' file.
 
6
*
 
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.
 
11
*
 
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/>.
 
18
*/
 
19
 
 
20
#ifndef __POWERMANAGER_STRUCT__
 
21
#define  __POWERMANAGER_STRUCT__
 
22
 
 
23
#include <cairo-dock.h>
 
24
 
 
25
 
 
26
typedef enum {
 
27
        POWER_MANAGER_NOTHING = 0,
 
28
        POWER_MANAGER_CHARGE,
 
29
        POWER_MANAGER_TIME,
 
30
        POWER_MANAGER_NB_QUICK_INFO_TYPE
 
31
  } MyAppletQuickInfoType;
 
32
 
 
33
typedef enum {
 
34
        POWER_MANAGER_EFFECT_NONE = 0,
 
35
        POWER_MANAGER_EFFECT_ZOOM,
 
36
        POWER_MANAGER_EFFECT_TRANSPARENCY,
 
37
        POWER_MANAGER_EFFECT_BAR,
 
38
        } MyAppletEffect;
 
39
 
 
40
typedef enum {
 
41
        POWER_MANAGER_CHARGE_CRITICAL = 0,
 
42
        POWER_MANAGER_CHARGE_LOW,
 
43
        POWER_MANAGER_CHARGE_FULL,
 
44
        POWER_MANAGER_NB_CHARGE_LEVEL,
 
45
        } MyAppletCharge;
 
46
 
 
47
struct _AppletConfig {
 
48
        gchar *defaultTitle;
 
49
        MyAppletQuickInfoType quickInfoType;
 
50
        gint iCheckInterval;
 
51
        
 
52
        gboolean batteryWitness;
 
53
        gboolean highBatteryWitness;
 
54
        gboolean lowBatteryWitness;
 
55
        gboolean criticalBatteryWitness;
 
56
        gboolean bUseApprox;
 
57
        gchar *batteryWitnessAnimation;
 
58
        gint lowBatteryValue;
 
59
        const gchar *cGThemePath;
 
60
        gchar *cSoundPath[POWER_MANAGER_NB_CHARGE_LEVEL];
 
61
        gboolean bUseDBusFallback;
 
62
        
 
63
        gboolean bUseGauge;
 
64
        gchar *cUserBatteryIconName;
 
65
        gchar *cUserChargeIconName;
 
66
        MyAppletEffect iEffect;
 
67
  } ;
 
68
 
 
69
#define PM_NB_VALUES 100
 
70
struct _AppletData {
 
71
        cairo_surface_t *pSurfaceBattery;
 
72
        cairo_surface_t *pSurfaceCharge;
 
73
        gboolean dbus_enable;
 
74
        gboolean battery_present;
 
75
        gint iCapacity;
 
76
        gboolean on_battery, previously_on_battery;
 
77
        gdouble battery_time, previous_battery_time;
 
78
        gdouble battery_charge, previous_battery_charge;
 
79
        gboolean alerted;
 
80
        gboolean bCritical;
 
81
        gint checkLoop;
 
82
        Gauge *pGauge;
 
83
        gchar *cBatteryStateFilePath;
 
84
        
 
85
        gdouble fRateHistory[PM_NB_VALUES];
 
86
        gint iCurrentIndex;
 
87
        gint iIndexMax;
 
88
        gboolean bUseDBus;
 
89
        } ;
 
90
 
 
91
 
 
92
#endif