diff options
author | Nathan Scott <nathans@redhat.com> | 2023-08-22 16:11:05 +1000 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2023-08-30 13:11:57 +1000 |
commit | 0f751e991d399769fb8d7800f7c4bccec2ca7f60 (patch) | |
tree | 34cd7838f7ebf51049816f9acb6a63cea175af06 /MainPanel.h | |
parent | 68f4f10f012d11bd57bb725fe4113b2af937fc1d (diff) |
Introduce Row and Table classes for screens beyond top-processes
This commit refactors the Process and ProcessList structures such
they each have a new parent - Row and Table, respectively. These
new classes handle screen updates relating to anything that could
be represented in tabular format, e.g. cgroups, filesystems, etc,
without us having to reimplement the display logic repeatedly for
each new entity.
Diffstat (limited to 'MainPanel.h')
-rw-r--r-- | MainPanel.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/MainPanel.h b/MainPanel.h index bd22acd0..d062616d 100644 --- a/MainPanel.h +++ b/MainPanel.h @@ -17,7 +17,7 @@ in the source distribution for its full text. #include "IncSet.h" #include "Object.h" #include "Panel.h" -#include "Process.h" +#include "Row.h" typedef struct MainPanel_ { @@ -25,19 +25,19 @@ typedef struct MainPanel_ { State* state; IncSet* inc; Htop_Action* keys; - pid_t pidSearch; + unsigned int idSearch; } MainPanel; -typedef bool(*MainPanel_ForeachProcessFn)(Process*, Arg); +typedef bool(*MainPanel_foreachRowFn)(Row*, Arg); #define MainPanel_getFunctionBar(this_) (((Panel*)(this_))->defaultBar) // update the Label Keys in the MainPanel bar, list: list / tree mode, filter: filter (inc) active / inactive void MainPanel_updateLabels(MainPanel* this, bool list, bool filter); -int MainPanel_selectedPid(MainPanel* this); +int MainPanel_selectedRow(MainPanel* this); -bool MainPanel_foreachProcess(MainPanel* this, MainPanel_ForeachProcessFn fn, Arg arg, bool* wasAnyTagged); +bool MainPanel_foreachRow(MainPanel* this, MainPanel_foreachRowFn fn, Arg arg, bool* wasAnyTagged); extern const PanelClass MainPanel_class; |