Header.h 1.18 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
/*
6
htop - Header.c
Hisham Muhammad's avatar
Hisham Muhammad committed
7
8
9
10
11
(C) 2004-2006 Hisham H. Muhammad
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/

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

#include "debug.h"
#include <assert.h>


typedef enum HeaderSide_ {
   LEFT_HEADER,
   RIGHT_HEADER
} HeaderSide;

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


33
34
35
36
#ifndef MAX
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif

Hisham Muhammad's avatar
Hisham Muhammad committed
37
38
39
40
41
42
Header* Header_new(ProcessList* pl);

void Header_delete(Header* this);

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

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

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

int Header_size(Header* this, HeaderSide side);

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

51
MeterModeId Header_readMeterMode(Header* this, int i, HeaderSide side);
Hisham Muhammad's avatar
Hisham Muhammad committed
52
53
54
55
56
57
58
59

void Header_defaultMeters(Header* this);

void Header_draw(Header* this);

int Header_calculateHeight(Header* this);

#endif