From c55320e9e2a8916e911bcd39ab37b79e3a7d03b2 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 11 Jan 2021 20:43:27 +0100 Subject: New upstream version 3.0.5 --- Settings.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Settings.h') diff --git a/Settings.h b/Settings.h index 752970a..fdaf3e3 100644 --- a/Settings.h +++ b/Settings.h @@ -33,7 +33,9 @@ typedef struct Settings_ { int delay; int direction; + int treeDirection; ProcessField sortKey; + ProcessField treeSortKey; bool countCPUsFromOne; bool detailedCPUTime; @@ -44,6 +46,7 @@ typedef struct Settings_ { bool degreeFahrenheit; #endif bool treeView; + bool treeViewAlwaysByPID; bool showProgramPath; bool shadowOtherUsers; bool showThreadNames; @@ -61,6 +64,7 @@ typedef struct Settings_ { bool accountGuestInCPUMeter; bool headerMargin; bool enableMouse; + int hideFunctionBar; // 0 - off, 1 - on ESC until next input, 2 - permanently #ifdef HAVE_LIBHWLOC bool topologyAffinity; #endif @@ -70,6 +74,16 @@ typedef struct Settings_ { #define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromOne ? (cpu)+1 : (cpu)) +static inline ProcessField Settings_getActiveSortKey(const Settings* this) { + return (this->treeView) + ? (this->treeViewAlwaysByPID ? PID : this->treeSortKey) + : this->sortKey; +} + +static inline int Settings_getActiveDirection(const Settings* this) { + return this->treeView ? this->treeDirection : this->direction; +} + void Settings_delete(Settings* this); bool Settings_write(Settings* this); @@ -78,4 +92,6 @@ Settings* Settings_new(int initialCpuCount); void Settings_invertSortOrder(Settings* this); +void Settings_setSortKey(Settings* this, ProcessField sortKey); + #endif -- cgit v1.2.3