diff options
author | Nathan Scott <nathans@redhat.com> | 2023-05-02 09:02:22 +1000 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2023-05-08 13:06:07 +1000 |
commit | 0bdade1b6cb40c5bd374a93ac0489058a7421bb5 (patch) | |
tree | 0e0225f7dbf6867402c5ed3481a705d01941f42e /Header.h | |
parent | e4ebe18b67c366d367231a1123b057c82018cf5b (diff) |
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.
Diffstat (limited to 'Header.h')
-rw-r--r-- | Header.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -8,16 +8,14 @@ in the source distribution for its full text. */ #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 @@ typedef struct Header_ { #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); |