2006-04-10 20:40:38 +00:00
|
|
|
/* Do not edit this file. It was automatically generated. */
|
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
|
2006-03-04 18:16:49 +00:00
|
|
|
Released under the GNU GPL, see the COPYING file
|
|
|
|
in the source distribution for its full text.
|
|
|
|
*/
|
|
|
|
|
2018-02-26 20:12:07 -03:00
|
|
|
#define DEFAULT_DELAY 15
|
2006-04-10 20:40:38 +00:00
|
|
|
|
2015-01-21 23:27:31 -02:00
|
|
|
#include "Process.h"
|
2011-12-26 21:35:57 +00:00
|
|
|
#include <stdbool.h>
|
2006-03-04 18:16:49 +00:00
|
|
|
|
2018-04-06 12:41:36 -03:00
|
|
|
typedef struct {
|
|
|
|
const char* name;
|
|
|
|
const char* columns;
|
|
|
|
const char* sortKey;
|
|
|
|
} ScreenDefaults;
|
|
|
|
|
2015-01-21 23:27:31 -02:00
|
|
|
typedef struct {
|
|
|
|
int len;
|
|
|
|
char** names;
|
|
|
|
int* modes;
|
|
|
|
} MeterColumnSettings;
|
2015-01-23 03:08:21 -02:00
|
|
|
|
2018-01-28 04:09:06 -02:00
|
|
|
typedef struct {
|
|
|
|
char* name;
|
|
|
|
ProcessField* fields;
|
|
|
|
int flags;
|
|
|
|
int direction;
|
|
|
|
ProcessField sortKey;
|
|
|
|
bool treeView;
|
|
|
|
} ScreenSettings;
|
|
|
|
|
2006-03-04 18:16:49 +00:00
|
|
|
typedef struct Settings_ {
|
2015-01-21 23:27:31 -02:00
|
|
|
char* filename;
|
|
|
|
|
2018-01-28 04:09:06 -02:00
|
|
|
MeterColumnSettings meterColumns[2];
|
2015-01-21 23:27:31 -02:00
|
|
|
|
2018-01-28 04:09:06 -02:00
|
|
|
ScreenSettings** screens;
|
|
|
|
unsigned int nScreens;
|
|
|
|
unsigned int ssIndex;
|
|
|
|
ScreenSettings* ss;
|
2018-01-27 23:29:58 -02:00
|
|
|
|
2006-03-04 18:16:49 +00:00
|
|
|
int colorScheme;
|
2006-04-10 20:40:38 +00:00
|
|
|
int delay;
|
2015-01-21 23:27:31 -02:00
|
|
|
|
2015-08-12 17:11:07 -03:00
|
|
|
int cpuCount;
|
2015-01-21 23:27:31 -02:00
|
|
|
|
|
|
|
bool countCPUsFromZero;
|
|
|
|
bool detailedCPUTime;
|
2015-07-29 21:14:29 +02:00
|
|
|
bool showProgramPath;
|
2015-01-21 23:27:31 -02:00
|
|
|
bool hideThreads;
|
|
|
|
bool shadowOtherUsers;
|
|
|
|
bool showThreadNames;
|
|
|
|
bool hideKernelThreads;
|
|
|
|
bool hideUserlandThreads;
|
|
|
|
bool highlightBaseName;
|
|
|
|
bool highlightMegabytes;
|
|
|
|
bool highlightThreads;
|
|
|
|
bool updateProcessNames;
|
|
|
|
bool accountGuestInCPUMeter;
|
|
|
|
bool headerMargin;
|
|
|
|
|
2014-02-27 16:35:22 -03:00
|
|
|
bool changed;
|
2006-03-04 18:16:49 +00:00
|
|
|
} Settings;
|
|
|
|
|
2015-01-21 23:27:31 -02:00
|
|
|
#ifndef Settings_cpuId
|
|
|
|
#define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromZero ? (cpu) : (cpu)+1)
|
|
|
|
#endif
|
|
|
|
|
2006-03-04 18:16:49 +00:00
|
|
|
|
2018-01-28 04:09:06 -02:00
|
|
|
/*
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2006-03-04 18:16:49 +00:00
|
|
|
void Settings_delete(Settings* this);
|
|
|
|
|
2018-01-28 17:06:53 -02:00
|
|
|
ScreenSettings* Settings_newScreen(Settings* this, const char* name, const char* line);
|
|
|
|
|
2006-03-04 18:16:49 +00:00
|
|
|
bool Settings_write(Settings* this);
|
|
|
|
|
2015-01-21 23:27:31 -02:00
|
|
|
Settings* Settings_new(int cpuCount);
|
|
|
|
|
2018-01-28 04:09:06 -02:00
|
|
|
void ScreenSettings_invertSortOrder(ScreenSettings* this);
|
2008-03-09 08:58:38 +00:00
|
|
|
|
2006-03-04 18:16:49 +00:00
|
|
|
#endif
|