From 5bb312993960adaa663701391a83f76b81edc60a Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Sun, 21 Dec 2025 16:57:44 +0900 Subject: created htop-vim/ --- fedora/.local/bin/htop-vim/pcp/PCPDynamicMeter.h | 44 ++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 fedora/.local/bin/htop-vim/pcp/PCPDynamicMeter.h (limited to 'fedora/.local/bin/htop-vim/pcp/PCPDynamicMeter.h') diff --git a/fedora/.local/bin/htop-vim/pcp/PCPDynamicMeter.h b/fedora/.local/bin/htop-vim/pcp/PCPDynamicMeter.h new file mode 100644 index 0000000..0e5ddd2 --- /dev/null +++ b/fedora/.local/bin/htop-vim/pcp/PCPDynamicMeter.h @@ -0,0 +1,44 @@ +#ifndef HEADER_PCPDynamicMeter +#define HEADER_PCPDynamicMeter + +#include + +#include "CRT.h" +#include "DynamicMeter.h" +#include "Hashtable.h" +#include "Meter.h" +#include "RichString.h" + + +typedef struct PCPDynamicMetric_ { + size_t id; /* index into metric array */ + ColorElements color; + char* name; /* derived metric name */ + char* label; + char* suffix; +} PCPDynamicMetric; + +typedef struct PCPDynamicMeter_ { + DynamicMeter super; + PCPDynamicMetric* metrics; + size_t totalMetrics; +} PCPDynamicMeter; + +typedef struct PCPDynamicMeters_ { + Hashtable* table; + size_t count; /* count of dynamic meters discovered by scan */ + size_t offset; /* start offset into the Platform metric array */ + size_t cursor; /* identifier allocator for each new metric used */ +} PCPDynamicMeters; + +void PCPDynamicMeters_init(PCPDynamicMeters* meters); + +void PCPDynamicMeters_done(Hashtable* table); + +void PCPDynamicMeter_enable(PCPDynamicMeter* this); + +void PCPDynamicMeter_updateValues(PCPDynamicMeter* this, Meter* meter); + +void PCPDynamicMeter_display(PCPDynamicMeter* this, const Meter* meter, RichString* out); + +#endif -- cgit v1.2.3