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

17
18
19
20
21
22
typedef struct {
   const char* name;
   const char* columns;
   const char* sortKey;
} ScreenDefaults;

Hisham Muhammad's avatar
Hisham Muhammad committed
23
24
25
26
27
typedef struct {
   int len;
   char** names;
   int* modes;
} MeterColumnSettings;
28

29
30
31
32
33
34
35
36
37
typedef struct {
   char* name;
   ProcessField* fields;
   int flags;
   int direction;
   ProcessField sortKey;
   bool treeView;
} ScreenSettings;

Hisham Muhammad's avatar
Hisham Muhammad committed
38
typedef struct Settings_ {
Hisham Muhammad's avatar
Hisham Muhammad committed
39
40
   char* filename;
   
41
   MeterColumnSettings meterColumns[2];
Hisham Muhammad's avatar
Hisham Muhammad committed
42

43
44
45
46
   ScreenSettings** screens;
   unsigned int nScreens;
   unsigned int ssIndex;
   ScreenSettings* ss;
47

Hisham Muhammad's avatar
Hisham Muhammad committed
48
   int colorScheme;
49
   int delay;
Hisham Muhammad's avatar
Hisham Muhammad committed
50

Hisham Muhammad's avatar
Hisham Muhammad committed
51
   int cpuCount;
Hisham Muhammad's avatar
Hisham Muhammad committed
52
53
54

   bool countCPUsFromZero;
   bool detailedCPUTime;
55
   bool showProgramPath;
Hisham Muhammad's avatar
Hisham Muhammad committed
56
57
58
59
60
61
62
63
64
65
66
   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
67
   bool screenTabs;
Hisham Muhammad's avatar
Hisham Muhammad committed
68

Hisham Muhammad's avatar
Hisham Muhammad committed
69
   bool changed;
Hisham Muhammad's avatar
Hisham Muhammad committed
70
71
} Settings;

Hisham Muhammad's avatar
Hisham Muhammad committed
72
73
74
75
#ifndef Settings_cpuId
#define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromZero ? (cpu) : (cpu)+1)
#endif

Hisham Muhammad's avatar
Hisham Muhammad committed
76

77
78
79
80
/*

*/

Hisham Muhammad's avatar
Hisham Muhammad committed
81
82
void Settings_delete(Settings* this);

83
84
ScreenSettings* Settings_newScreen(Settings* this, const char* name, const char* line);

Hisham Muhammad's avatar
Hisham Muhammad committed
85
86
bool Settings_write(Settings* this);

Hisham Muhammad's avatar
Hisham Muhammad committed
87
88
Settings* Settings_new(int cpuCount);

89
void ScreenSettings_invertSortOrder(ScreenSettings* this);
90

Hisham Muhammad's avatar
Hisham Muhammad committed
91
#endif