diff options
| author | sumuel <samuel@yakubos.org> | 2026-08-17 20:44:55 +0000 |
|---|---|---|
| committer | sumuel <samuel@yakubos.org> | 2026-08-17 20:44:55 +0000 |
| commit | 76424950e373d3b04ac3dd13019151bfba3e8423 (patch) | |
| tree | 4c3cfdbda039e592b9186be3e28f8d7cfd439e8a /src/common/printing.h | |
Add the files
Diffstat (limited to 'src/common/printing.h')
| -rw-r--r-- | src/common/printing.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/common/printing.h b/src/common/printing.h new file mode 100644 index 0000000..f20a244 --- /dev/null +++ b/src/common/printing.h @@ -0,0 +1,21 @@ +#pragma once + +#include "fastfetch.h" +#include "common/format.h" + +typedef enum FF_A_PACKED FFPrintType { + FF_PRINT_TYPE_DEFAULT = 0, + FF_PRINT_TYPE_NO_CUSTOM_KEY = 1 << 0, // key has been formatted outside + FF_PRINT_TYPE_NO_CUSTOM_KEY_COLOR = 1 << 1, + FF_PRINT_TYPE_NO_CUSTOM_KEY_WIDTH = 1 << 2, + FF_PRINT_TYPE_NO_CUSTOM_OUTPUT_FORMAT = 1 << 3, // reserved + FF_PRINT_TYPE_FORCE_UNSIGNED = UINT8_MAX, +} FFPrintType; + +void ffPrintLogoAndKey(const char* moduleName, uint8_t moduleIndex, const FFModuleArgs* moduleArgs, FFPrintType printType); +bool ffPrintFormat(const char* moduleName, uint8_t moduleIndex, const FFModuleArgs* moduleArgs, FFPrintType printType, uint32_t numArgs, const FFformatarg* arguments); +#define FF_PRINT_FORMAT_CHECKED(moduleName, moduleIndex, moduleArgs, printType, arguments) \ + ffPrintFormat((moduleName), (moduleIndex), (moduleArgs), (printType), (sizeof(arguments) / sizeof(*arguments)), (arguments)); +FF_A_PRINTF(5, 6) void ffPrintError(const char* moduleName, uint8_t moduleIndex, const FFModuleArgs* moduleArgs, FFPrintType printType, const char* message, ...); +void ffPrintColor(const FFstrbuf* colorValue); +void ffPrintCharTimes(char c, uint32_t times); |