summaryrefslogtreecommitdiffstats
path: root/Action.h
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-02-05 14:12:49 +0100
committerChristian Göttsche <cgzones@googlemail.com>2021-02-05 14:12:49 +0100
commitfd4e6b432bcc0d6bac1a15a2ea492b4a540b75a1 (patch)
tree559e4dde1887a4f75b10309e2eddbf6843497ef0 /Action.h
parentfd1ad863dca36da7166d9767218f5382074de4d2 (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.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Action.h b/Action.h
index 02d9030d..8e86569e 100644
--- a/Action.h
+++ b/Action.h
@@ -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;

© 2014-2024 Faster IT GmbH | imprint | privacy policy