From 69f439eff387a6ecb52734e400b297a3c85f2285 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Tue, 21 Sep 2021 08:35:19 +0200 Subject: New upstream version 3.1.0 --- Settings.h | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'Settings.h') diff --git a/Settings.h b/Settings.h index fdaf3e3..20f583c 100644 --- a/Settings.h +++ b/Settings.h @@ -12,20 +12,27 @@ in the source distribution for its full text. #include #include +#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 -- cgit v1.2.3