2006-03-04 21:16:49 +03:00
|
|
|
#ifndef HEADER_Header
|
|
|
|
#define HEADER_Header
|
|
|
|
/*
|
2006-06-07 00:28:42 +04:00
|
|
|
htop - Header.h
|
2011-05-26 20:35:07 +04:00
|
|
|
(C) 2004-2011 Hisham H. Muhammad
|
2021-09-22 12:33:00 +03:00
|
|
|
Released under the GNU GPLv2+, see the COPYING file
|
2006-03-04 21:16:49 +03:00
|
|
|
in the source distribution for its full text.
|
|
|
|
*/
|
|
|
|
|
2021-08-24 18:27:43 +03:00
|
|
|
#include "HeaderLayout.h"
|
2006-04-11 00:40:38 +04:00
|
|
|
#include "Meter.h"
|
2020-09-19 14:55:23 +03:00
|
|
|
#include "ProcessList.h"
|
2015-01-23 08:08:21 +03:00
|
|
|
#include "Settings.h"
|
2015-01-22 04:27:31 +03:00
|
|
|
#include "Vector.h"
|
2006-03-04 21:16:49 +03:00
|
|
|
|
2021-04-29 21:13:36 +03:00
|
|
|
|
2006-03-04 21:16:49 +03:00
|
|
|
typedef struct Header_ {
|
2015-01-22 04:27:31 +03:00
|
|
|
Vector** columns;
|
2015-01-23 08:08:21 +03:00
|
|
|
Settings* settings;
|
2020-11-26 08:15:09 +03:00
|
|
|
ProcessList* pl;
|
2020-12-25 18:42:35 +03:00
|
|
|
HeaderLayout headerLayout;
|
2015-01-23 08:08:21 +03:00
|
|
|
int pad;
|
|
|
|
int height;
|
2006-03-04 21:16:49 +03:00
|
|
|
} Header;
|
|
|
|
|
2021-09-10 17:34:20 +03:00
|
|
|
#define Header_forEachColumn(this_, i_) for (size_t (i_)=0, H_fEC_numColumns_ = HeaderLayout_getColumns((this_)->headerLayout); (i_) < H_fEC_numColumns_; ++(i_))
|
2015-01-22 04:27:31 +03:00
|
|
|
|
2020-12-25 18:42:35 +03:00
|
|
|
Header* Header_new(ProcessList* pl, Settings* settings, HeaderLayout hLayout);
|
2006-03-04 21:16:49 +03:00
|
|
|
|
2020-09-02 10:38:44 +03:00
|
|
|
void Header_delete(Header* this);
|
2006-03-04 21:16:49 +03:00
|
|
|
|
2020-12-25 18:42:35 +03:00
|
|
|
void Header_setLayout(Header* this, HeaderLayout hLayout);
|
|
|
|
|
2020-09-02 10:38:44 +03:00
|
|
|
void Header_populateFromSettings(Header* this);
|
2015-01-23 08:08:21 +03:00
|
|
|
|
2020-09-02 10:38:44 +03:00
|
|
|
void Header_writeBackToSettings(const Header* this);
|
2015-03-17 05:01:21 +03:00
|
|
|
|
2020-12-25 18:42:35 +03:00
|
|
|
Meter* Header_addMeterByClass(Header* this, const MeterClass* type, unsigned int param, unsigned int column);
|
2006-03-04 21:16:49 +03:00
|
|
|
|
2020-09-02 10:38:44 +03:00
|
|
|
void Header_reinit(Header* this);
|
2011-03-22 23:37:08 +03:00
|
|
|
|
2020-09-02 10:38:44 +03:00
|
|
|
void Header_draw(const Header* this);
|
2006-03-04 21:16:49 +03:00
|
|
|
|
2021-02-08 18:38:49 +03:00
|
|
|
void Header_updateData(Header* this);
|
|
|
|
|
2020-09-02 10:38:44 +03:00
|
|
|
int Header_calculateHeight(Header* this);
|
2006-03-04 21:16:49 +03:00
|
|
|
|
|
|
|
#endif
|