/* SPDX-License-Identifier: GPL-3.0-or-later */ /* * vfetch - neofetch but the ascii part is a video * * Copyright (C) 2026 Doan Luu Duc Tai * */ #ifndef SRC__CONFIG_H #define SRC__CONFIG_H #include #include #include #include #include "error.h" typedef enum { ARG_HANDLER_BOOLEAN, ARG_HANDLER_CHAFA_MAP, ARG_HANDLER_CHAFA_FLAG, ARG_HANDLER_BOUNDED_FLOAT, ARG_HANDLER_CUSTOM } ArgHandlerType; typedef struct VfetchArgs { GHashTable *chafa_options; gchar *filename; gchar *colors_arg; gchar *fetch_tool_arg; gchar *fg_color_arg; gchar *bg_color_arg; gchar *format_arg; double cell_aspect_ratio; double fps; uint32_t width; uint32_t height; uint32_t pad_x; uint32_t pad_y; uint32_t num_frames; uint16_t refresh_rate; bool audio; bool loop; bool debug; bool verbose; } VfetchArgs; typedef struct BoundedFloatData { size_t offset; float min; float max; } BoundedFloatData; typedef VfetchError (*CustomArgParserFunc)(int *idx, int argc, const char *argv[], VfetchArgs *args); typedef struct ArgumentHandler { union { BoundedFloatData bounded_float; CustomArgParserFunc custom_parser; const char *chafa_key; size_t boolean_offset; } data; const char *name; ArgHandlerType type; } ArgumentHandler; #endif /* SRC__CONFIG_H */