26
26
#define CD_SYSMONITOR_PROC_FS "/proc" // REPRIS DE SYSTEM-MONITOR
27
27
#define CD_SYSMONITOR_NB_MAX_VALUES 4 // REPRIS DE SYSTEM-MONITOR
29
// REPRIS DE SYSTEM-MONITOR :
30
typedef enum _CDSysmonitorDisplayType {
31
CD_SYSMONITOR_GAUGE=0,
34
CD_SYSMONITOR_NB_TYPES
35
} CDSysmonitorDisplayType;
39
29
typedef struct _CDDiskUsage {
40
30
long long iPrevAvail;
50
38
//\___________ structure containing the applet's configuration parameters.
51
39
struct _AppletConfig {
41
double fDefaultTextColor[4];
43
gint iSpaceBetweenLines;
53
44
gboolean bDisplayBackground;
54
45
double fBackgroundColor1[4];
55
46
double fBackgroundColor2[4];
56
47
gint iBackgroundRadius;
57
48
gint iBorderThickness;
58
49
double fBorderColor[4];
59
double fDefaultTextColor[4];
62
gint iSpaceBetweenLines;
63
52
gchar *cXmlFilePath;
65
53
gint iCheckInterval;
69
55
// REPRIS DE SYSTEM-MONITOR :
73
58
gboolean bShowNvidia;
74
59
gboolean bShowSwap;
76
gchar *cWatermarkImagePath;
78
CDSysmonitorDisplayType iDisplayType;
79
CairoDockTypeGraph iGraphType;
84
gint iNbDisplayedProcesses;
85
gboolean bTopInPercent;
86
CairoDockLabelDescription *pTopTextDescription;
87
gchar *cSystemMonitorCommand;
88
60
gchar *cSystemMonitorClass;
89
gboolean bStealTaskBarIcon;
96
// REPRIS DE SYSTEM-MONITOR :
103
gdouble fLastCheckTime;
110
64
//\___________ structure containing the applet's data, like surfaces, dialogs, results of calculus, etc.
111
65
struct _AppletData {
66
//~ // Copy of myConfig :
67
//~ gchar *cDefaultFont;
68
//~ double fDefaultTextColor[4];
70
//~ gint iSpaceBetweenLines;
71
//~ gboolean bDisplayBackground;
72
//~ double fBackgroundColor1[4];
73
//~ double fBackgroundColor2[4];
74
//~ gint iBackgroundRadius;
75
//~ gint iBorderThickness;
76
//~ double fBorderColor[4];
115
80
gchar *cPrevAlignWidth;
116
81
gchar *cPrevAlignHeight;
118
83
double fPrevTextColor[4];
119
84
gint iPrevOverrideH;
134
CairoDockTask *pPeriodicRefreshTask;
136
GList *pTextZoneList;
86
CairoDockTask *pPeriodicRefreshTask;
139
88
gchar *cCurrentText;
140
89
double fCurrentX; // Position du curseur dans le desklet
142
91
double fCurrentYalign;
143
92
gchar *cLastAlignHeight;
144
93
gint iLastLineHeight;
145
gboolean bLastWasSameLine;
146
gint iMaxGraphHistory;
94
gboolean bLastWasSameLine;
148
95
cairo_surface_t *pImgSurface;
96
gint iCurrentFileSize;
152
98
// REPRIS DE SYSTEM-MONITOR :
154
99
// infos, constantes.
158
102
gchar *cModelName;
161
105
gchar *cDriverVersion;
163
106
// shared memory for the main thread.
164
107
gboolean bInitialized;
165
108
gboolean bAcquisitionOK;