Settings.h 1.59 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

23
24
25
26
27
28
29
30
31
typedef struct {
   char* name;
   ProcessField* fields;
   int flags;
   int direction;
   ProcessField sortKey;
   bool treeView;
} ScreenSettings;

Hisham Muhammad's avatar
Hisham Muhammad committed
32
typedef struct Settings_ {
Hisham Muhammad's avatar
Hisham Muhammad committed
33
34
   char* filename;
   
35
   MeterColumnSettings meterColumns[2];
Hisham Muhammad's avatar
Hisham Muhammad committed
36

37
38
39
40
   ScreenSettings** screens;
   unsigned int nScreens;
   unsigned int ssIndex;
   ScreenSettings* ss;
41

Hisham Muhammad's avatar
Hisham Muhammad committed
42
   int flags;
Hisham Muhammad's avatar
Hisham Muhammad committed
43
   int colorScheme;
44
   int delay;
Hisham Muhammad's avatar
Hisham Muhammad committed
45

Hisham Muhammad's avatar
Hisham Muhammad committed
46
   int cpuCount;
Hisham Muhammad's avatar
Hisham Muhammad committed
47
48
49

   bool countCPUsFromZero;
   bool detailedCPUTime;
50
   bool showProgramPath;
Hisham Muhammad's avatar
Hisham Muhammad committed
51
52
53
54
55
56
57
58
59
60
61
62
   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
63
   bool changed;
Hisham Muhammad's avatar
Hisham Muhammad committed
64
65
} Settings;

Hisham Muhammad's avatar
Hisham Muhammad committed
66
67
68
69
#ifndef Settings_cpuId
#define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromZero ? (cpu) : (cpu)+1)
#endif

Hisham Muhammad's avatar
Hisham Muhammad committed
70

71
72
73
74
/*

*/

Hisham Muhammad's avatar
Hisham Muhammad committed
75
76
void Settings_delete(Settings* this);

77
78
ScreenSettings* Settings_newScreen(Settings* this, const char* name, const char* line);

Hisham Muhammad's avatar
Hisham Muhammad committed
79
80
bool Settings_write(Settings* this);

Hisham Muhammad's avatar
Hisham Muhammad committed
81
82
Settings* Settings_new(int cpuCount);

83
void ScreenSettings_invertSortOrder(ScreenSettings* this);
84

Hisham Muhammad's avatar
Hisham Muhammad committed
85
#endif