summaryrefslogtreecommitdiffstats
path: root/src/logo/logo.h
diff options
context:
space:
mode:
authorsumuel <samuel@yakubos.org>2026-08-17 20:44:55 +0000
committersumuel <samuel@yakubos.org>2026-08-17 20:44:55 +0000
commit76424950e373d3b04ac3dd13019151bfba3e8423 (patch)
tree4c3cfdbda039e592b9186be3e28f8d7cfd439e8a /src/logo/logo.h
Add the files
Diffstat (limited to 'src/logo/logo.h')
-rw-r--r--src/logo/logo.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/logo/logo.h b/src/logo/logo.h
new file mode 100644
index 0000000..105b964
--- /dev/null
+++ b/src/logo/logo.h
@@ -0,0 +1,44 @@
+#pragma once
+
+#include "fastfetch.h"
+
+typedef enum FF_A_PACKED FFLogoLineType {
+ FF_LOGO_LINE_TYPE_NORMAL = 0,
+ FF_LOGO_LINE_TYPE_SMALL_BIT = 1 << 0, // The names of small logo must end with `_small` or `-small`
+ FF_LOGO_LINE_TYPE_ALTER_BIT = 1 << 1,
+ FF_LOGO_LINE_TYPE_FORCE_UNSIGNED = UINT8_MAX,
+} FFLogoLineType;
+
+typedef enum FF_A_PACKED FFLogoSize {
+ FF_LOGO_SIZE_UNKNOWN,
+ FF_LOGO_SIZE_NORMAL,
+ FF_LOGO_SIZE_SMALL,
+} FFLogoSize;
+
+typedef struct FFlogo {
+ const char* lines;
+ const char* names[FASTFETCH_LOGO_MAX_NAMES];
+ const char* colors[FASTFETCH_LOGO_MAX_COLORS];
+ const char* colorKeys;
+ const char* colorTitle;
+ FFLogoLineType type;
+} FFlogo;
+
+// logo.c
+void ffLogoPrint(void);
+void ffLogoPrintChars(const char* data, bool doColorReplacement);
+void ffLogoPrintLine(void);
+void ffLogoPrintRemaining(void);
+void ffLogoBuiltinPrint(void);
+void ffLogoBuiltinList(void);
+void ffLogoBuiltinListAutocompletion(void);
+void ffLogoPrintDetected(FFLogoSize size);
+const FFlogo* ffLogoGetBuiltinForName(const FFstrbuf* name, FFLogoSize size);
+const FFlogo* ffLogoGetBuiltinDetected(FFLogoSize size);
+
+// builtin.c
+extern const FFlogo* ffLogoBuiltins[];
+extern const FFlogo ffLogoUnknown;
+
+// image/image.c
+bool ffLogoPrintImageIfExists(FFLogoType type, bool printError);