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

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

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

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

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

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

Hisham Muhammad's avatar
Hisham Muhammad committed
41
   int colorScheme;
42
   int delay;
Hisham Muhammad's avatar
Hisham Muhammad committed
43

Hisham Muhammad's avatar
Hisham Muhammad committed
44
   int cpuCount;
Hisham Muhammad's avatar
Hisham Muhammad committed
45
46
47

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

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

Hisham Muhammad's avatar
Hisham Muhammad committed
68

69
70
71
72
/*

*/

Hisham Muhammad's avatar
Hisham Muhammad committed
73
74
void Settings_delete(Settings* this);

75
76
ScreenSettings* Settings_newScreen(Settings* this, const char* name, const char* line);

Hisham Muhammad's avatar
Hisham Muhammad committed
77
78
bool Settings_write(Settings* this);

Hisham Muhammad's avatar
Hisham Muhammad committed
79
80
Settings* Settings_new(int cpuCount);

81
void ScreenSettings_invertSortOrder(ScreenSettings* this);
82

Hisham Muhammad's avatar
Hisham Muhammad committed
83
#endif