diff options
author | Daniel Lange <DLange@git.local> | 2024-01-10 12:40:37 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2024-01-10 12:40:37 +0100 |
commit | 7271b076b82785ffca73ee9e4ae84cabb77018ee (patch) | |
tree | e8270dd60ec096bee8157dbadf029e15ed584592 /pcp/PCPDynamicColumn.h | |
parent | f288666edc9180a2e81e6655951878124f321df6 (diff) | |
download | debian_htop-7271b076b82785ffca73ee9e4ae84cabb77018ee.tar.gz debian_htop-7271b076b82785ffca73ee9e4ae84cabb77018ee.tar.bz2 debian_htop-7271b076b82785ffca73ee9e4ae84cabb77018ee.zip |
New upstream version 3.3.0upstream/3.3.0upstream
Diffstat (limited to 'pcp/PCPDynamicColumn.h')
-rw-r--r-- | pcp/PCPDynamicColumn.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/pcp/PCPDynamicColumn.h b/pcp/PCPDynamicColumn.h index d0ffe71..ade782b 100644 --- a/pcp/PCPDynamicColumn.h +++ b/pcp/PCPDynamicColumn.h @@ -1,5 +1,11 @@ #ifndef HEADER_PCPDynamicColumn #define HEADER_PCPDynamicColumn +/* +htop - PCPDynamicColumn.h +(C) 2023 htop dev team +Released under the GNU GPLv2+, see the COPYING file +in the source distribution for its full text. +*/ #include <stddef.h> @@ -11,15 +17,22 @@ #include "pcp/PCPProcess.h" +struct pmDesc; + typedef struct PCPDynamicColumn_ { DynamicColumn super; char* metricName; + char* format; size_t id; /* identifier for metric array lookups */ + int width; /* optional width from configuration file */ + bool defaultEnabled; /* default enabled in dynamic screen */ + bool percent; + bool instances; /* an instance *names* column, not values */ } PCPDynamicColumn; typedef struct PCPDynamicColumns_ { Hashtable* table; - size_t count; /* count of dynamic meters discovered by scan */ + size_t count; /* count of dynamic columns discovered by scan */ size_t offset; /* start offset into the Platform metric array */ size_t cursor; /* identifier allocator for each new metric used */ } PCPDynamicColumns; @@ -28,8 +41,14 @@ void PCPDynamicColumns_init(PCPDynamicColumns* columns); void PCPDynamicColumns_done(Hashtable* table); +void PCPDynamicColumns_setupWidths(PCPDynamicColumns* columns); + void PCPDynamicColumn_writeField(PCPDynamicColumn* this, const Process* proc, RichString* str); +void PCPDynamicColumn_writeAtomValue(PCPDynamicColumn* column, RichString* str, const struct Settings_* settings, int metric, int instance, const struct pmDesc* desc, const void* atomvalue); + int PCPDynamicColumn_compareByKey(const PCPProcess* p1, const PCPProcess* p2, ProcessField key); +void PCPDynamicColumn_done(PCPDynamicColumn* this); + #endif |