Settings.h 1.58 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.
*/

Hisham Muhammad's avatar
Hisham Muhammad committed
12
#define DEFAULT_DELAY 15
13

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 colorScheme;
43
   int delay;
Hisham Muhammad's avatar
Hisham Muhammad committed
44

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

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

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

Hisham Muhammad's avatar
Hisham Muhammad committed
69

70
71
72
73
/*

*/

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

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

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

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

82
void ScreenSettings_invertSortOrder(ScreenSettings* this);
83

Hisham Muhammad's avatar
Hisham Muhammad committed
84
#endif