Settings.h 1.27 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
28
29
   char* filename;
   
   MeterColumnSettings columns[2];

   ProcessField* fields;
   int flags;
Hisham Muhammad's avatar
Hisham Muhammad committed
30
   int colorScheme;
31
   int delay;
Hisham Muhammad's avatar
Hisham Muhammad committed
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

   int direction;
   ProcessField sortKey;

   bool countCPUsFromZero;
   bool detailedCPUTime;
   bool treeView;
   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
51
   bool changed;
Hisham Muhammad's avatar
Hisham Muhammad committed
52
53
} Settings;

Hisham Muhammad's avatar
Hisham Muhammad committed
54
55
56
57
#ifndef Settings_cpuId
#define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromZero ? (cpu) : (cpu)+1)
#endif

Hisham Muhammad's avatar
Hisham Muhammad committed
58
59
60
61
62

void Settings_delete(Settings* this);

bool Settings_write(Settings* this);

Hisham Muhammad's avatar
Hisham Muhammad committed
63
64
65
Settings* Settings_new(int cpuCount);

void Settings_invertSortOrder(Settings* this);
66

Hisham Muhammad's avatar
Hisham Muhammad committed
67
#endif