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/>.
21
#ifndef __CD_APPLET_STRUCT__
22
#define __CD_APPLET_STRUCT__
24
#include <cairo-dock.h>
26
#define CD_SYSMONITOR_PROC_FS "/proc" // REPRIS DE SYSTEM-MONITOR
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
typedef struct _CDDiskUsage {
50
//\___________ structure containing the applet's configuration parameters.
51
struct _AppletConfig {
53
gboolean bDisplayBackground;
54
double fBackgroundColor1[4];
55
double fBackgroundColor2[4];
56
gint iBackgroundRadius;
57
gint iBorderThickness;
58
double fBorderColor[4];
59
double fDefaultTextColor[4];
62
gint iSpaceBetweenLines;
69
// REPRIS DE SYSTEM-MONITOR :
76
gchar *cWatermarkImagePath;
78
CDSysmonitorDisplayType iDisplayType;
79
CairoDockTypeGraph iGraphType;
84
gint iNbDisplayedProcesses;
85
gboolean bTopInPercent;
86
CairoDockLabelDescription *pTopTextDescription;
87
gchar *cSystemMonitorCommand;
88
gchar *cSystemMonitorClass;
89
gboolean bStealTaskBarIcon;
96
// REPRIS DE SYSTEM-MONITOR :
103
gdouble fLastCheckTime;
110
//\___________ structure containing the applet's data, like surfaces, dialogs, results of calculus, etc.
115
gchar *cPrevAlignWidth;
116
gchar *cPrevAlignHeight;
118
double fPrevTextColor[4];
134
CairoDockTask *pPeriodicRefreshTask;
136
GList *pTextZoneList;
140
double fCurrentX; // Position du curseur dans le desklet
142
double fCurrentYalign;
143
gchar *cLastAlignHeight;
144
gint iLastLineHeight;
145
gboolean bLastWasSameLine;
146
gint iMaxGraphHistory;
148
cairo_surface_t *pImgSurface;
152
// REPRIS DE SYSTEM-MONITOR :
154
// infos, constantes.
161
gchar *cDriverVersion;
163
// shared memory for the main thread.
164
gboolean bInitialized;
165
gboolean bAcquisitionOK;
167
long long int cpu_user, cpu_user_nice, cpu_system, cpu_idle;
168
unsigned long long ramTotal, ramFree, ramUsed, ramBuffers, ramCached;
169
unsigned long long swapTotal, swapFree, swapUsed;
172
gdouble fPrevCpuPercent;
173
gdouble fRamPercent,fSwapPercent;
174
gdouble fPrevRamPercent, fPrevSwapPercent;
175
gdouble fGpuTempPercent;
176
gdouble fPrevGpuTempPercent;
177
gboolean bNeedsUpdate;
179
// end of shared memory.
180
gint iCount; // pour sous-echantilloner les acquisitions de valeurs moins variables.
183
CairoDialog *pTopDialog;
184
cairo_surface_t *pTopSurface;
185
CairoDockTask *pTopTask;
186
// shared memory for the "top" thread.
187
GHashTable *pProcessTable;
188
CDProcess **pTopList;
190
gboolean bSortTopByRam;
191
// end of shared memory.