[go: up one dir, main page]

Menu

[12172e]: / src / acpustatus.h  Maximize  Restore  History

Download this file

46 lines (32 with data), 881 Bytes

 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
#ifndef __CPUSTATUS_H
#define __CPUSTATUS_H
#if (defined(linux) || defined(HAVE_KSTAT_H))
#ifdef HAVE_KSTAT_H
#include <kstat.h>
#include <sys/sysinfo.h>
#endif /* have_kstat_h */
#define IWM_USER (0)
#define IWM_NICE (1)
#define IWM_SYS (2)
#define IWM_IDLE (3)
#define IWM_STATES (4)
#include "ywindow.h"
#include "ytimer.h"
class CPUStatus: public YWindow, public YTimerListener {
public:
CPUStatus(YWindow *aParent = 0);
virtual ~CPUStatus();
virtual void paint(Graphics &g, int x, int y, unsigned int width, unsigned int height);
virtual bool handleTimer(YTimer *t);
virtual void handleClick(const XButtonEvent &up, int count);
void updateStatus();
void getStatus();
void updateToolTip();
private:
int **cpu;
long last_cpu[IWM_STATES];
YColor *color[IWM_STATES];
YTimer *fUpdateTimer;
};
#endif
#endif