mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-06 13:14:21 +01:00
Global: uses typed enums
This commit is contained in:
@@ -5,26 +5,26 @@
|
||||
#include "common/FFstrbuf.h"
|
||||
#include "common/FFlist.h"
|
||||
|
||||
typedef enum FF_A_PACKED FFSizeBinaryPrefixType {
|
||||
typedef enum FFSizeBinaryPrefixType: uint8_t {
|
||||
FF_SIZE_BINARY_PREFIX_TYPE_IEC, // 1024 Bytes = 1 KiB, 1024 KiB = 1 MiB, ... (standard)
|
||||
FF_SIZE_BINARY_PREFIX_TYPE_SI, // 1000 Bytes = 1 kB, 1000 kB = 1 MB, ...
|
||||
FF_SIZE_BINARY_PREFIX_TYPE_JEDEC, // 1024 Bytes = 1 KB, 1024 KB = 1 MB, ...
|
||||
} FFSizeBinaryPrefixType;
|
||||
|
||||
typedef enum FF_A_PACKED FFTemperatureUnit {
|
||||
typedef enum FFTemperatureUnit: uint8_t {
|
||||
FF_TEMPERATURE_UNIT_DEFAULT,
|
||||
FF_TEMPERATURE_UNIT_CELSIUS,
|
||||
FF_TEMPERATURE_UNIT_FAHRENHEIT,
|
||||
FF_TEMPERATURE_UNIT_KELVIN,
|
||||
} FFTemperatureUnit;
|
||||
|
||||
typedef enum FF_A_PACKED FFSpaceBeforeUnitType {
|
||||
typedef enum FFSpaceBeforeUnitType: uint8_t {
|
||||
FF_SPACE_BEFORE_UNIT_DEFAULT,
|
||||
FF_SPACE_BEFORE_UNIT_ALWAYS,
|
||||
FF_SPACE_BEFORE_UNIT_NEVER,
|
||||
} FFSpaceBeforeUnitType;
|
||||
|
||||
typedef enum FF_A_PACKED FFFractionTrailingZerosType {
|
||||
typedef enum FFFractionTrailingZerosType: uint8_t {
|
||||
FF_FRACTION_TRAILING_ZEROS_TYPE_DEFAULT,
|
||||
FF_FRACTION_TRAILING_ZEROS_TYPE_ALWAYS,
|
||||
FF_FRACTION_TRAILING_ZEROS_TYPE_NEVER,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "common/ffdata.h"
|
||||
|
||||
typedef enum FF_A_PACKED FFDsForceDrmType {
|
||||
typedef enum FFDsForceDrmType: uint8_t {
|
||||
FF_DS_FORCE_DRM_TYPE_FALSE = 0, // Disable
|
||||
FF_DS_FORCE_DRM_TYPE_TRUE = 1, // Try `libdrm`, then `sysfs` if libdrm failed
|
||||
FF_DS_FORCE_DRM_TYPE_SYSFS_ONLY, // Use `/sys/class/drm` only
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
#define FASTFETCH_LOGO_MAX_NAMES 9
|
||||
#define FASTFETCH_LOGO_MAX_COLORS 9 // two digits would make parsing much more complicated (index 1 - 9)
|
||||
|
||||
typedef enum FF_A_PACKED FFLogoType {
|
||||
typedef enum FFLogoType: uint8_t {
|
||||
FF_LOGO_TYPE_AUTO, // if something is given, first try builtin, then file. Otherwise detect logo
|
||||
FF_LOGO_TYPE_BUILTIN, // builtin ascii art
|
||||
FF_LOGO_TYPE_SMALL, // builtin ascii art, small version
|
||||
@@ -24,7 +24,7 @@ typedef enum FF_A_PACKED FFLogoType {
|
||||
FF_LOGO_TYPE_NONE, // `--logo none`, but still applies colors to the system information output (unless `--pipe` is set)
|
||||
} FFLogoType;
|
||||
|
||||
typedef enum FF_A_PACKED FFLogoPosition {
|
||||
typedef enum FFLogoPosition: uint8_t {
|
||||
FF_LOGO_POSITION_LEFT,
|
||||
FF_LOGO_POSITION_TOP,
|
||||
FF_LOGO_POSITION_RIGHT,
|
||||
|
||||
Reference in New Issue
Block a user