Header.h 1.24 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"
Hisham Muhammad's avatar
Hisham Muhammad committed
13
14
15

#include "debug.h"
#include <assert.h>
16
#include <time.h>
Hisham Muhammad's avatar
Hisham Muhammad committed
17
18
19
20
21
22
23
24


typedef enum HeaderSide_ {
   LEFT_HEADER,
   RIGHT_HEADER
} HeaderSide;

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


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

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

void Header_delete(Header* this);

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

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

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

int Header_size(Header* this, HeaderSide side);

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

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

void Header_defaultMeters(Header* this);

56
57
58
void Header_reinit(Header* this);

void Header_draw(const Header* this);
Hisham Muhammad's avatar
Hisham Muhammad committed
59
60
61
62

int Header_calculateHeight(Header* this);

#endif