diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-02-05 14:12:49 +0100 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2021-02-05 14:12:49 +0100 |
commit | fd4e6b432bcc0d6bac1a15a2ea492b4a540b75a1 (patch) | |
tree | 559e4dde1887a4f75b10309e2eddbf6843497ef0 /Action.h | |
parent | fd1ad863dca36da7166d9767218f5382074de4d2 (diff) |
Use MainPanel type in State struct
The State struct holds a pointer to the main process panel.
Use the distinct MainPanel type, to improve maintainability regrading
its usage.
This avoids usages of down-casts from Panel to MainPanel, only up-casts
from MainPanel to Panel are now required.
Diffstat (limited to 'Action.h')
-rw-r--r-- | Action.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -20,6 +20,7 @@ in the source distribution for its full text. #include "Settings.h" #include "UsersTable.h" + typedef enum { HTOP_OK = 0x00, HTOP_REFRESH = 0x01, @@ -31,11 +32,13 @@ typedef enum { HTOP_UPDATE_PANELHDR = 0x41, // implies HTOP_REFRESH } Htop_Reaction; +struct MainPanel_; + typedef struct State_ { Settings* settings; UsersTable* ut; ProcessList* pl; - Panel* panel; + struct MainPanel_* mainPanel; Header* header; bool pauseProcessUpdate; bool hideProcessSelection; |