Header.h 1.31 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.
*/

12
#include "Meter.h"
13
#include "Settings.h"
Hisham Muhammad's avatar
Hisham Muhammad committed
14
#include "Vector.h"
Hisham Muhammad's avatar
Hisham Muhammad committed
15
16

typedef struct Header_ {
Hisham Muhammad's avatar
Hisham Muhammad committed
17
   Vector** columns;
18
   Settings* settings;
Hisham Muhammad's avatar
Hisham Muhammad committed
19
20
   struct ProcessList_* pl;
   int nrColumns;
21
22
   int pad;
   int height;
Hisham Muhammad's avatar
Hisham Muhammad committed
23
24
25
} Header;


26
27
28
29
#ifndef MAX
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif

Hisham Muhammad's avatar
Hisham Muhammad committed
30
31
32
33
#ifndef Header_forEachColumn
#define Header_forEachColumn(this_, i_) for (int i_=0; i_ < this->nrColumns; i_++)
#endif

34
Header* Header_new(struct ProcessList_* pl, Settings* settings, int nrColumns);
Hisham Muhammad's avatar
Hisham Muhammad committed
35
36
37

void Header_delete(Header* this);

38
39
void Header_populateFromSettings(Header* this);

Hisham Muhammad's avatar
Hisham Muhammad committed
40
MeterModeId Header_addMeterByName(Header* this, char* name, int column);
Hisham Muhammad's avatar
Hisham Muhammad committed
41

Hisham Muhammad's avatar
Hisham Muhammad committed
42
void Header_setMode(Header* this, int i, MeterModeId mode, int column);
Hisham Muhammad's avatar
Hisham Muhammad committed
43

Hisham Muhammad's avatar
Hisham Muhammad committed
44
Meter* Header_addMeterByClass(Header* this, MeterClass* type, int param, int column);
Hisham Muhammad's avatar
Hisham Muhammad committed
45

Hisham Muhammad's avatar
Hisham Muhammad committed
46
int Header_size(Header* this, int column);
Hisham Muhammad's avatar
Hisham Muhammad committed
47

Hisham Muhammad's avatar
Hisham Muhammad committed
48
char* Header_readMeterName(Header* this, int i, int column);
Hisham Muhammad's avatar
Hisham Muhammad committed
49

Hisham Muhammad's avatar
Hisham Muhammad committed
50
MeterModeId Header_readMeterMode(Header* this, int i, int column);
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