Introduce Machine class for host-specific info (split from ProcessList)
First stage in sanitizing the process list structure so that htop
can support other types of lists too (cgroups, filesystems, ...),
in the not-too-distant future.
This introduces struct Machine for system-wide information while
keeping process-list information in ProcessList (now much less).
Next step is to propogate this separation into each platform, to
match these core changes.
diff --git a/Header.h b/Header.h
index 954d434..add4d76 100644
--- a/Header.h
+++ b/Header.h
@@ -8,16 +8,14 @@
*/
#include "HeaderLayout.h"
+#include "Machine.h"
#include "Meter.h"
-#include "ProcessList.h"
-#include "Settings.h"
#include "Vector.h"
typedef struct Header_ {
Vector** columns;
- Settings* settings;
- ProcessList* pl;
+ Machine* host;
HeaderLayout headerLayout;
int pad;
int height;
@@ -25,7 +23,7 @@
#define Header_forEachColumn(this_, i_) for (size_t (i_)=0, H_fEC_numColumns_ = HeaderLayout_getColumns((this_)->headerLayout); (i_) < H_fEC_numColumns_; ++(i_))
-Header* Header_new(ProcessList* pl, Settings* settings, HeaderLayout hLayout);
+Header* Header_new(Machine *host, HeaderLayout hLayout);
void Header_delete(Header* this);