From ff9409b1737627857eb47f64f536a3f66b6a09a4 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 11 Apr 2016 13:01:07 +0200 Subject: Imported Upstream version 2.0.0 --- Settings.h | 47 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 6 deletions(-) (limited to 'Settings.h') diff --git a/Settings.h b/Settings.h index 28fe552..d9dc068 100644 --- a/Settings.h +++ b/Settings.h @@ -11,24 +11,59 @@ in the source distribution for its full text. #define DEFAULT_DELAY 15 -#include "ProcessList.h" -#include "Header.h" +#include "Process.h" #include +typedef struct { + int len; + char** names; + int* modes; +} MeterColumnSettings; + typedef struct Settings_ { - char* userSettings; - ProcessList* pl; - Header* header; + char* filename; + + MeterColumnSettings columns[2]; + + ProcessField* fields; + int flags; int colorScheme; int delay; + + int cpuCount; + int direction; + ProcessField sortKey; + + bool countCPUsFromZero; + bool detailedCPUTime; + bool treeView; + bool showProgramPath; + bool hideThreads; + bool shadowOtherUsers; + bool showThreadNames; + bool hideKernelThreads; + bool hideUserlandThreads; + bool highlightBaseName; + bool highlightMegabytes; + bool highlightThreads; + bool updateProcessNames; + bool accountGuestInCPUMeter; + bool headerMargin; + bool changed; } Settings; +#ifndef Settings_cpuId +#define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromZero ? (cpu) : (cpu)+1) +#endif + void Settings_delete(Settings* this); bool Settings_write(Settings* this); -Settings* Settings_new(ProcessList* pl, Header* header, int cpuCount); +Settings* Settings_new(int cpuCount); + +void Settings_invertSortOrder(Settings* this); #endif -- cgit v1.2.3