aboutsummaryrefslogtreecommitdiffstats
path: root/Settings.h
diff options
context:
space:
mode:
Diffstat (limited to 'Settings.h')
-rw-r--r--Settings.h29
1 files changed, 23 insertions, 6 deletions
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 <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

© 2014-2024 Faster IT GmbH | imprint | privacy policy