mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
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.
This commit is contained in:
5
Action.h
5
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;
|
||||
|
Reference in New Issue
Block a user