htop/Settings.h

75 lines
1.4 KiB
C
Raw Normal View History

2006-03-04 18:16:49 +00:00
#ifndef HEADER_Settings
#define HEADER_Settings
/*
2006-06-06 20:28:42 +00:00
htop - Settings.h
2011-05-26 16:35:07 +00:00
(C) 2004-2011 Hisham H. Muhammad
Released under the GNU GPLv2, see the COPYING file
2006-03-04 18:16:49 +00:00
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
2011-12-26 21:35:57 +00:00
#include <stdbool.h>
2006-03-04 18:16:49 +00:00
2020-09-18 17:23:04 +00:00
#include "Process.h"
#define DEFAULT_DELAY 15
typedef struct {
int len;
char** names;
int* modes;
} MeterColumnSettings;
2006-03-04 18:16:49 +00:00
typedef struct Settings_ {
char* filename;
MeterColumnSettings columns[2];
ProcessField* fields;
int flags;
2006-03-04 18:16:49 +00:00
int colorScheme;
int delay;
int direction;
ProcessField sortKey;
bool countCPUsFromOne;
bool detailedCPUTime;
bool showCPUUsage;
bool showCPUFrequency;
bool treeView;
bool showProgramPath;
bool hideThreads;
bool shadowOtherUsers;
bool showThreadNames;
bool hideKernelThreads;
bool hideUserlandThreads;
bool highlightBaseName;
bool highlightMegabytes;
bool highlightThreads;
2020-10-31 01:56:16 +00:00
bool highlightChanges;
int highlightDelaySecs;
bool updateProcessNames;
bool accountGuestInCPUMeter;
bool headerMargin;
2019-07-12 19:41:09 +00:00
bool enableMouse;
#ifdef HAVE_LIBHWLOC
bool topologyAffinity;
#endif
2014-02-27 19:35:22 +00:00
bool changed;
2006-03-04 18:16:49 +00:00
} Settings;
#define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromOne ? (cpu)+1 : (cpu))
2006-03-04 18:16:49 +00:00
void Settings_delete(Settings* this);
2006-03-04 18:16:49 +00:00
bool Settings_write(Settings* this);
2006-03-04 18:16:49 +00:00
Settings* Settings_new(int initialCpuCount);
void Settings_invertSortOrder(Settings* this);
2006-03-04 18:16:49 +00:00
#endif