summaryrefslogtreecommitdiffstats
path: root/Settings.h
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-01-21 23:27:31 -0200
committerHisham Muhammad <hisham@gobolinux.org>2015-01-21 23:27:31 -0200
commit3383d8e5561dfc6fb2b65e0a194df94ccb5e08af (patch)
treedafba704561386b31b6b8af6dafb5b9a2ba7453c /Settings.h
parent36b78328843d0dae0d0fadbd0e814a8a1546327c (diff)
Sorry about the mega-patch.
This is a work-in-progress, code is currently broken. (Some actions, and notably, the header, are missing.)
Diffstat (limited to 'Settings.h')
-rw-r--r--Settings.h45
1 files changed, 39 insertions, 6 deletions
diff --git a/Settings.h b/Settings.h
index 28fe5520..2ac431f0 100644
--- a/Settings.h
+++ b/Settings.h
@@ -11,24 +11,57 @@ in the source distribution for its full text.
#define DEFAULT_DELAY 15
-#include "ProcessList.h"
-#include "Header.h"
+#include "Process.h"
#include <stdbool.h>
+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 direction;
+ ProcessField sortKey;
+
+ bool countCPUsFromZero;
+ bool detailedCPUTime;
+ bool treeView;
+ 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

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