Options (Display): split code

This commit is contained in:
李通洲
2023-10-26 10:26:15 +08:00
parent bd898e4006
commit 399e2235d4
21 changed files with 452 additions and 439 deletions
+2 -41
View File
@@ -25,55 +25,16 @@
#include "options/modules.h"
#include "options/logo.h"
#include "options/display.h"
#include "options/general.h"
#include "options/library.h"
typedef enum FFBinaryPrefixType
{
FF_BINARY_PREFIX_TYPE_IEC, // 1024 Bytes = 1 KiB, 1024 KiB = 1 MiB, ... (standard)
FF_BINARY_PREFIX_TYPE_SI, // 1000 Bytes = 1 KB, 1000 KB = 1 MB, ...
FF_BINARY_PREFIX_TYPE_JEDEC, // 1024 Bytes = 1 kB, 1024 K = 1 MB, ...
} FFBinaryPrefixType;
typedef enum FFTemperatureUnit
{
FF_TEMPERATURE_UNIT_CELSIUS,
FF_TEMPERATURE_UNIT_FAHRENHEIT,
FF_TEMPERATURE_UNIT_KELVIN,
} FFTemperatureUnit;
typedef struct FFconfig
{
FFOptionsLogo logo;
FFOptionsDisplay display;
FFOptionsGeneral general;
FFOptionsModules modules;
//If one of those is empty, ffLogoPrint will set them
FFstrbuf colorKeys;
FFstrbuf colorTitle;
bool brightColor;
FFstrbuf keyValueSeparator;
bool stat;
bool pipe; //disables logo and all escape sequences
bool showErrors;
bool disableLinewrap;
bool hideCursor;
FFBinaryPrefixType binaryPrefixType;
uint8_t sizeNdigits;
uint8_t sizeMaxPrefix;
FFTemperatureUnit temperatureUnit;
FFstrbuf barCharElapsed;
FFstrbuf barCharTotal;
uint8_t barWidth;
bool barBorder;
uint8_t percentType;
uint8_t percentNdigits;
bool noBuffer;
uint32_t keyWidth;
FFOptionsLibrary library;
} FFconfig;