htop/Header.h

49 lines
1.1 KiB
C
Raw Permalink Normal View History

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