diff options
author | Daniel Lange <DLange@git.local> | 2020-12-07 10:26:02 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2020-12-07 10:26:02 +0100 |
commit | d67ee86091f9e07f8d85c1fb77c7c58989e676bb (patch) | |
tree | 900f5e62bfd8e8c082be75a94f5348dea819beba /InfoScreen.h | |
parent | 3cbc50cde37fee19ce98ee8260b0a6095b829c4c (diff) | |
parent | 65357c8c46154de4e4eca14075bfe5523bb5fc14 (diff) | |
download | debian_htop-d67ee86091f9e07f8d85c1fb77c7c58989e676bb.tar.gz debian_htop-d67ee86091f9e07f8d85c1fb77c7c58989e676bb.tar.bz2 debian_htop-d67ee86091f9e07f8d85c1fb77c7c58989e676bb.zip |
Update upstream source from tag 'upstream/3.0.3'
Update to upstream version '3.0.3'
with Debian dir 8a3a733dc80e45b1cde220f88fcfd815869742f0
Diffstat (limited to 'InfoScreen.h')
-rw-r--r-- | InfoScreen.h | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/InfoScreen.h b/InfoScreen.h index 93665c1..0d80367 100644 --- a/InfoScreen.h +++ b/InfoScreen.h @@ -1,12 +1,25 @@ #ifndef HEADER_InfoScreen #define HEADER_InfoScreen -#include "Process.h" -#include "Panel.h" +#include <stdbool.h> + #include "FunctionBar.h" #include "IncSet.h" +#include "Macros.h" +#include "Object.h" +#include "Panel.h" +#include "Process.h" +#include "Vector.h" -typedef struct InfoScreen_ InfoScreen; + +typedef struct InfoScreen_ { + Object super; + const Process* process; + Panel* display; + FunctionBar* bar; + IncSet* inc; + Vector* lines; +} InfoScreen; typedef void(*InfoScreen_Scan)(InfoScreen*); typedef void(*InfoScreen_Draw)(InfoScreen*); @@ -14,32 +27,24 @@ typedef void(*InfoScreen_OnErr)(InfoScreen*); typedef bool(*InfoScreen_OnKey)(InfoScreen*, int); typedef struct InfoScreenClass_ { - ObjectClass super; + const ObjectClass super; const InfoScreen_Scan scan; const InfoScreen_Draw draw; const InfoScreen_OnErr onErr; const InfoScreen_OnKey onKey; } InfoScreenClass; -#define As_InfoScreen(this_) ((InfoScreenClass*)(((InfoScreen*)(this_))->super.klass)) +#define As_InfoScreen(this_) ((const InfoScreenClass*)(((InfoScreen*)(this_))->super.klass)) #define InfoScreen_scan(this_) As_InfoScreen(this_)->scan((InfoScreen*)(this_)) #define InfoScreen_draw(this_) As_InfoScreen(this_)->draw((InfoScreen*)(this_)) #define InfoScreen_onErr(this_) As_InfoScreen(this_)->onErr((InfoScreen*)(this_)) #define InfoScreen_onKey(this_, ch_) As_InfoScreen(this_)->onKey((InfoScreen*)(this_), ch_) -struct InfoScreen_ { - Object super; - Process* process; - Panel* display; - FunctionBar* bar; - IncSet* inc; - Vector* lines; -}; - -InfoScreen* InfoScreen_init(InfoScreen* this, Process* process, FunctionBar* bar, int height, const char* panelHeader); +InfoScreen* InfoScreen_init(InfoScreen* this, const Process* process, FunctionBar* bar, int height, const char* panelHeader); InfoScreen* InfoScreen_done(InfoScreen* this); +ATTR_FORMAT(printf, 2, 3) void InfoScreen_drawTitled(InfoScreen* this, const char* fmt, ...); void InfoScreen_addLine(InfoScreen* this, const char* line); |