diff options
author | Daniel Lange <DLange@git.local> | 2021-01-11 20:43:27 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2021-01-11 20:43:27 +0100 |
commit | c55320e9e2a8916e911bcd39ab37b79e3a7d03b2 (patch) | |
tree | d6be9a09fdf7d6dc155de3429a70697ee2bb43b0 /Settings.h | |
parent | 65357c8c46154de4e4eca14075bfe5523bb5fc14 (diff) | |
download | debian_htop-c55320e9e2a8916e911bcd39ab37b79e3a7d03b2.tar.gz debian_htop-c55320e9e2a8916e911bcd39ab37b79e3a7d03b2.tar.bz2 debian_htop-c55320e9e2a8916e911bcd39ab37b79e3a7d03b2.zip |
New upstream version 3.0.5upstream/3.0.5
Diffstat (limited to 'Settings.h')
-rw-r--r-- | Settings.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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 |