summaryrefslogtreecommitdiffstats
path: root/Process.h
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-12-04 19:57:47 +0100
committerBenBE <BenBE@geshi.org>2022-03-06 19:56:25 +0100
commit3ba695293c981af034d243605a30dac6cb55f880 (patch)
tree5c09f11bfbe34680f52b86cc00f2225bd45615b9 /Process.h
parent6133cac721f355aec0d6b5581fef90db34305f29 (diff)
Linux: dynamically adjust the SECATTR column width
SELinux contexts can be quite long; adjust the column width dynamically at each cycle to the longest value. Also with the recent addition of multiple screens, over-long columns can be moved into their own screen.
Diffstat (limited to 'Process.h')
-rw-r--r--Process.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Process.h b/Process.h
index 70892e57..d02c5d5f 100644
--- a/Process.h
+++ b/Process.h
@@ -279,6 +279,9 @@ typedef struct ProcessFieldData_ {
/* Whether the column should be sorted in descending order by default */
bool defaultSortDesc;
+
+ /* Whether the column width is dynamically adjusted (the minimum width is determined by the title length) */
+ bool autoWidth;
} ProcessFieldData;
// Implemented in platform-specific code:
@@ -286,6 +289,7 @@ void Process_writeField(const Process* this, RichString* str, ProcessField field
int Process_compare(const void* v1, const void* v2);
void Process_delete(Object* cast);
extern const ProcessFieldData Process_fields[LAST_PROCESSFIELD];
+extern uint8_t Process_fieldWidths[LAST_PROCESSFIELD];
#define PROCESS_MIN_PID_DIGITS 5
#define PROCESS_MAX_PID_DIGITS 19
#define PROCESS_MIN_UID_DIGITS 5
@@ -406,4 +410,7 @@ void Process_makeCommandStr(Process* this);
void Process_writeCommand(const Process* this, int attr, int baseAttr, RichString* str);
+void Process_resetFieldWidths(void);
+void Process_updateFieldWidth(ProcessField key, size_t width);
+
#endif

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