diff options
author | Daniel Lange <DLange@git.local> | 2021-09-21 08:35:19 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2021-09-21 08:35:19 +0200 |
commit | 69f439eff387a6ecb52734e400b297a3c85f2285 (patch) | |
tree | 2a988b7868b749654796183ba70b4272965da1bf /Settings.h | |
parent | c55320e9e2a8916e911bcd39ab37b79e3a7d03b2 (diff) | |
download | debian_htop-69f439eff387a6ecb52734e400b297a3c85f2285.tar.gz debian_htop-69f439eff387a6ecb52734e400b297a3c85f2285.tar.bz2 debian_htop-69f439eff387a6ecb52734e400b297a3c85f2285.zip |
New upstream version 3.1.0upstream/3.1.0
Diffstat (limited to 'Settings.h')
-rw-r--r-- | Settings.h | 29 |
1 files changed, 23 insertions, 6 deletions
@@ -12,20 +12,27 @@ in the source distribution for its full text. #include <stdbool.h> #include <stdint.h> +#include "Hashtable.h" +#include "HeaderLayout.h" #include "Process.h" #define DEFAULT_DELAY 15 +#define CONFIG_READER_MIN_VERSION 2 + typedef struct { - int len; + uint8_t len; char** names; int* modes; -} MeterColumnSettings; +} MeterColumnSetting; typedef struct Settings_ { char* filename; - MeterColumnSettings columns[2]; + int config_version; + HeaderLayout hLayout; + MeterColumnSetting* hColumns; + Hashtable* dynamicColumns; ProcessField* fields; uint32_t flags; @@ -41,18 +48,20 @@ typedef struct Settings_ { bool detailedCPUTime; bool showCPUUsage; bool showCPUFrequency; - #ifdef HAVE_SENSORS_SENSORS_H + #ifdef BUILD_WITH_CPU_TEMP bool showCPUTemperature; bool degreeFahrenheit; #endif bool treeView; bool treeViewAlwaysByPID; + bool allBranchesCollapsed; bool showProgramPath; bool shadowOtherUsers; bool showThreadNames; bool hideKernelThreads; bool hideUserlandThreads; bool highlightBaseName; + bool highlightDeletedExe; bool highlightMegabytes; bool highlightThreads; bool highlightChanges; @@ -63,7 +72,9 @@ typedef struct Settings_ { bool updateProcessNames; bool accountGuestInCPUMeter; bool headerMargin; + #ifdef HAVE_GETMOUSE bool enableMouse; + #endif int hideFunctionBar; // 0 - off, 1 - on ESC until next input, 2 - permanently #ifdef HAVE_LIBHWLOC bool topologyAffinity; @@ -86,12 +97,18 @@ static inline int Settings_getActiveDirection(const Settings* this) { void Settings_delete(Settings* this); -bool Settings_write(Settings* this); +int Settings_write(const Settings* this, bool onCrash); -Settings* Settings_new(int initialCpuCount); +Settings* Settings_new(unsigned int initialCpuCount, Hashtable* dynamicColumns); void Settings_invertSortOrder(Settings* this); void Settings_setSortKey(Settings* this, ProcessField sortKey); +void Settings_enableReadonly(void); + +bool Settings_isReadonly(void); + +void Settings_setHeaderLayout(Settings* this, HeaderLayout hLayout); + #endif |