diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:00:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:00:29 +0000 |
commit | 52e25213825024b8bb446eb26b03bedc9d5c2103 (patch) | |
tree | da70bf44b2423f6f8e9a070c063fed79d190b489 /Header.h | |
parent | Initial commit. (diff) | |
download | htop-upstream.tar.xz htop-upstream.zip |
Adding upstream version 3.2.2.upstream/3.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | Header.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Header.h b/Header.h new file mode 100644 index 0000000..954d434 --- /dev/null +++ b/Header.h @@ -0,0 +1,48 @@ +#ifndef HEADER_Header +#define HEADER_Header +/* +htop - Header.h +(C) 2004-2011 Hisham H. Muhammad +Released under the GNU GPLv2+, see the COPYING file +in the source distribution for its full text. +*/ + +#include "HeaderLayout.h" +#include "Meter.h" +#include "ProcessList.h" +#include "Settings.h" +#include "Vector.h" + + +typedef struct Header_ { + Vector** columns; + Settings* settings; + ProcessList* pl; + HeaderLayout headerLayout; + int pad; + int height; +} Header; + +#define Header_forEachColumn(this_, i_) for (size_t (i_)=0, H_fEC_numColumns_ = HeaderLayout_getColumns((this_)->headerLayout); (i_) < H_fEC_numColumns_; ++(i_)) + +Header* Header_new(ProcessList* pl, Settings* settings, HeaderLayout hLayout); + +void Header_delete(Header* this); + +void Header_setLayout(Header* this, HeaderLayout hLayout); + +void Header_populateFromSettings(Header* this); + +void Header_writeBackToSettings(const Header* this); + +Meter* Header_addMeterByClass(Header* this, const MeterClass* type, unsigned int param, unsigned int column); + +void Header_reinit(Header* this); + +void Header_draw(const Header* this); + +void Header_updateData(Header* this); + +int Header_calculateHeight(Header* this); + +#endif |