Settings.h 1.35 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_Settings
#define HEADER_Settings
/*
Hisham Muhammad's avatar
Hisham Muhammad committed
6
htop - Settings.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
13
#define DEFAULT_DELAY 15

Hisham Muhammad's avatar
Hisham Muhammad committed
14
#include "Process.h"
Hisham Muhammad's avatar
Hisham Muhammad committed
15
#include <stdbool.h>
Hisham Muhammad's avatar
Hisham Muhammad committed
16

Hisham Muhammad's avatar
Hisham Muhammad committed
17
18
19
20
21
typedef struct {
   int len;
   char** names;
   int* modes;
} MeterColumnSettings;
22

Hisham Muhammad's avatar
Hisham Muhammad committed
23
typedef struct Settings_ {
Hisham Muhammad's avatar
Hisham Muhammad committed
24
25
26
27
   char* filename;
   
   MeterColumnSettings columns[2];

28
29
30
   char** screens;
   int nScreens;

Hisham Muhammad's avatar
Hisham Muhammad committed
31
32
   ProcessField* fields;
   int flags;
Hisham Muhammad's avatar
Hisham Muhammad committed
33
   int colorScheme;
34
   int delay;
Hisham Muhammad's avatar
Hisham Muhammad committed
35

Hisham Muhammad's avatar
Hisham Muhammad committed
36
   int cpuCount;
Hisham Muhammad's avatar
Hisham Muhammad committed
37
38
39
40
41
42
   int direction;
   ProcessField sortKey;

   bool countCPUsFromZero;
   bool detailedCPUTime;
   bool treeView;
43
   bool showProgramPath;
Hisham Muhammad's avatar
Hisham Muhammad committed
44
45
46
47
48
49
50
51
52
53
54
55
   bool hideThreads;
   bool shadowOtherUsers;
   bool showThreadNames;
   bool hideKernelThreads;
   bool hideUserlandThreads;
   bool highlightBaseName;
   bool highlightMegabytes;
   bool highlightThreads;
   bool updateProcessNames;
   bool accountGuestInCPUMeter;
   bool headerMargin;

Hisham Muhammad's avatar
Hisham Muhammad committed
56
   bool changed;
Hisham Muhammad's avatar
Hisham Muhammad committed
57
58
} Settings;

Hisham Muhammad's avatar
Hisham Muhammad committed
59
60
61
62
#ifndef Settings_cpuId
#define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromZero ? (cpu) : (cpu)+1)
#endif

Hisham Muhammad's avatar
Hisham Muhammad committed
63
64
65
66
67

void Settings_delete(Settings* this);

bool Settings_write(Settings* this);

Hisham Muhammad's avatar
Hisham Muhammad committed
68
69
70
Settings* Settings_new(int cpuCount);

void Settings_invertSortOrder(Settings* this);
71

Hisham Muhammad's avatar
Hisham Muhammad committed
72
#endif