~ubuntu-branches/ubuntu/oneiric/cairo-dock-plug-ins/oneiric-updates

« back to all changes in this revision

Viewing changes to weather/src/applet-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
 
 
21
#ifndef __CD_APPLET_STRUCT__
 
22
#define  __CD_APPLET_STRUCT__
 
23
 
 
24
#include <cairo-dock.h>
 
25
 
 
26
#define WEATHER_NB_DAYS_MAX 5
 
27
 
 
28
#define WEATHER_RATIO_ICON_DESKLET .5
 
29
 
 
30
#define WEATHER_DEFAULT_NAME "weather"
 
31
 
 
32
#define _display(cValue) (cValue == NULL || *cValue == 'N' ? "?" : cValue)
 
33
 
 
34
/**typedef enum {
 
35
  MY_DESKLET_CAROUSSEL = 0,
 
36
  MY_DESKLET_MAIN_ICON
 
37
  } MyDeskletRender ;*/
 
38
 
 
39
struct _AppletConfig {
 
40
        gchar *cLocationCode;
 
41
        gboolean bISUnits;
 
42
        gboolean bCurrentConditions;
 
43
        gboolean bDisplayNights;
 
44
        gboolean bDisplayTemperature;
 
45
        gint iNbDays;
 
46
        gchar *cRenderer;
 
47
        gint cDialogDuration;
 
48
        gint iCheckInterval;
 
49
        gchar *cThemePath;
 
50
        gboolean bDesklet3D;
 
51
        gboolean bSetName;
 
52
        ///MyDeskletRender iDeskletRenderer;
 
53
        } ;
 
54
 
 
55
typedef struct {
 
56
        gchar *cTemp;
 
57
        gchar *cDistance;
 
58
        gchar *cSpeed;
 
59
        gchar *cPressure;
 
60
        } Unit;
 
61
 
 
62
typedef struct {
 
63
        gchar *cSunRise;
 
64
        gchar *cSunSet;
 
65
        gchar *cDataAcquisitionDate;
 
66
        gchar *cObservatory;
 
67
        gchar *cTemp;
 
68
        gchar *cFeeledTemp;
 
69
        gchar *cWeatherDescription;
 
70
        gchar *cIconNumber;
 
71
        gchar *cWindSpeed;
 
72
        gchar *cWindDirection;
 
73
        gchar *cPressure;
 
74
        gchar *cHumidity;
 
75
        gchar *cMoonIconNumber;
 
76
        } CurrentContitions;
 
77
 
 
78
typedef struct {
 
79
        gchar *cIconNumber;
 
80
        gchar *cWeatherDescription;
 
81
        gchar *cWindSpeed;
 
82
        gchar *cWindDirection;
 
83
        gchar *cHumidity;
 
84
        gchar *cPrecipitationProba;
 
85
        } DayPart;
 
86
 
 
87
typedef struct {
 
88
        gchar *cName;
 
89
        gchar *cDate;
 
90
        gchar *cTempMax;
 
91
        gchar *cTempMin;
 
92
        gchar *cSunRise;
 
93
        gchar *cSunSet;
 
94
        DayPart part[2];
 
95
        } Day;
 
96
 
 
97
struct _AppletData {
 
98
        // memoire partagee.
 
99
        Unit units;
 
100
        gchar *cLocation;
 
101
        gchar *cLon;
 
102
        gchar *cLat;
 
103
        CurrentContitions currentConditions;
 
104
        Day days[WEATHER_NB_DAYS_MAX];
 
105
        gboolean bErrorInThread;
 
106
        // fin memoire partagee.
 
107
        CairoDockTask *pTask;
 
108
        gboolean bErrorRetrievingData;
 
109
        GList *pLocationsList;
 
110
        } ;
 
111
 
 
112
 
 
113
#endif