-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcommon.h
112 lines (93 loc) · 2.38 KB
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#ifndef FC_COMMON_H
#define FC_COMMON_H
#include <e.h>
#include "config.h"
#include "e_mod_config.h"
#ifdef HAVE_GETTEXT
# include <libintl.h>
# define D_(string) dgettext(LOCALEDOMAIN, string)
#else
# define bindtextdomain(domain,dir)
# define bind_textdomain_codeset(domain,codeset)
# define D_(string) (string)
#endif
#define N_(string) (string)
/* EINA_LOG support macros and global */
extern int _e_forecast_log_dom;
#undef DBG
#undef INF
#undef WRN
#undef ERR
#undef CRI
#define DBG(...) EINA_LOG_DOM_DBG(_e_forecast_log_dom, __VA_ARGS__)
#define INF(...) EINA_LOG_DOM_INFO(_e_forecast_log_dom, __VA_ARGS__)
#define WRN(...) EINA_LOG_DOM_WARN(_e_forecast_log_dom, __VA_ARGS__)
#define ERR(...) EINA_LOG_DOM_ERR(_e_forecast_log_dom, __VA_ARGS__)
#define CRI(...) EINA_LOG_DOM_CRIT(_e_forecast_log_dom, __VA_ARGS__)
#define FORECASTS 3
typedef struct _Instance Instance;
typedef struct _Forecasts Forecasts;
typedef struct _Config Config;
typedef struct _Config_Item Config_Item;
struct _Instance
{
E_Gadcon_Client *gcc;
Evas_Object *forecasts_obj;
Forecasts *forecasts;
Ecore_Timer *check_timer, *delay;
Eina_Binbuf *buffer;
Eina_List *handlers;
struct
{
int code;
int temp, temp_c, temp_f;
int feel, feel_c, feel_f;
char update[52];
char desc[256];
} condition;
struct
{
char temp, distance[3], pressure[3], speed[5];
} units;
struct
{
struct
{
int chill, chill_c, chill_f;
int direction;
int speed, speed_km, speed_mi;
} wind;
struct
{
int humidity, rising;
float pressure, pressure_km, pressure_mi;
float visibility, visibility_km, visibility_mi;
float precip;
} atmosphere;
struct
{
char sunrise[9], sunset[9];
} astronomy;
} details;
struct
{
char day[4];
char date[12];
int low, high, low_c, high_c, low_f, high_f, code;
char desc[256];
} forecast[5];
const char *location;
const char *country;
const char *language;
const char *label;
const char *area;
E_Gadcon_Popup *popup;
Config_Item *ci;
};
struct _Forecasts
{
Instance *inst;
Evas_Object *forecasts_obj;
Evas_Object *icon_obj;
};
#endif