Header.h 1.22 KB
Newer Older
1
/* Do not edit this file. It was automatically generated. */
Hisham Muhammad's avatar
Hisham Muhammad committed
2
3
4
5

#ifndef HEADER_Header
#define HEADER_Header
/*
Hisham Muhammad's avatar
Hisham Muhammad committed
6
htop - Header.h
Hisham Muhammad's avatar
Hisham Muhammad committed
7
(C) 2004-2011 Hisham H. Muhammad
Hisham Muhammad's avatar
Hisham Muhammad committed
8
9
10
11
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/

Hisham Muhammad's avatar
Hisham Muhammad committed
12
#include "ProcessList.h"
13
#include "Meter.h"
Hisham Muhammad's avatar
Hisham Muhammad committed
14
15
16
17
18
19
20

typedef enum HeaderSide_ {
   LEFT_HEADER,
   RIGHT_HEADER
} HeaderSide;

typedef struct Header_ {
21
22
   Vector* leftMeters;
   Vector* rightMeters;
Hisham Muhammad's avatar
Hisham Muhammad committed
23
24
25
26
27
28
29
   ProcessList* pl;
   bool margin;
   int height;
   int pad;
} Header;


30
31
32
33
#ifndef MAX
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif

Hisham Muhammad's avatar
Hisham Muhammad committed
34
35
36
37
38
39
Header* Header_new(ProcessList* pl);

void Header_delete(Header* this);

void Header_createMeter(Header* this, char* name, HeaderSide side);

40
void Header_setMode(Header* this, int i, MeterModeId mode, HeaderSide side);
Hisham Muhammad's avatar
Hisham Muhammad committed
41

42
Meter* Header_addMeter(Header* this, MeterType* type, int param, HeaderSide side);
Hisham Muhammad's avatar
Hisham Muhammad committed
43
44
45
46
47

int Header_size(Header* this, HeaderSide side);

char* Header_readMeterName(Header* this, int i, HeaderSide side);

48
MeterModeId Header_readMeterMode(Header* this, int i, HeaderSide side);
Hisham Muhammad's avatar
Hisham Muhammad committed
49

50
void Header_defaultMeters(Header* this, int cpuCount);
Hisham Muhammad's avatar
Hisham Muhammad committed
51

52
53
54
void Header_reinit(Header* this);

void Header_draw(const Header* this);
Hisham Muhammad's avatar
Hisham Muhammad committed
55
56
57
58

int Header_calculateHeight(Header* this);

#endif