Support dynamic screens with 'top-most' entities beyond processes
This implements our concept of 'dynamic screens' in htop, with a
first use-case of pcp-htop displaying things like top-filesystem
and top-cgroups under new screen tabs. However the idea is more
general than use in pcp-htop and we've paved the way here for us
to collectively build mroe general tabular screens in core htop,
as well.
From the pcp-htop side of things, dynamic screens are configured
using text-based configuration files that define the mapping for
PCP metrics to columns (and metric instances to rows). Metrics
are defined either directly (via metric names) or indirectly via
PCP derived metric specifications. Value scaling and the units
displayed is automatic based on PCP metric units and data types.
This commit represents a collaborative effort of several months,
primarily between myself, Nathan and BenBE.
Signed-off-by: Sohaib Mohamed <sohaib.amhmd@gmail.com>
Signed-off-by: Nathan Scott <nathans@redhat.com>
diff --git a/ScreensPanel.h b/ScreensPanel.h
index 60aaf2a..0be0b82 100644
--- a/ScreensPanel.h
+++ b/ScreensPanel.h
@@ -10,7 +10,9 @@
#include <stdbool.h>
+#include "AvailableColumnsPanel.h"
#include "ColumnsPanel.h"
+#include "DynamicScreen.h"
#include "ListItem.h"
#include "Object.h"
#include "Panel.h"
@@ -27,6 +29,7 @@
ScreenManager* scr;
Settings* settings;
ColumnsPanel* columns;
+ AvailableColumnsPanel* availableColumns;
char buffer[SCREEN_NAME_LEN + 1];
char* saved;
int cursor;
@@ -36,6 +39,7 @@
typedef struct ScreenListItem_ {
ListItem super;
+ DynamicScreen* ds;
ScreenSettings* ss;
} ScreenListItem;
@@ -44,8 +48,6 @@
ScreenListItem* ScreenListItem_new(const char* value, ScreenSettings* ss);
-extern PanelClass ScreensPanel_class;
-
ScreensPanel* ScreensPanel_new(Settings* settings);
void ScreensPanel_update(Panel* super);