ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
enums.h
Go to the documentation of this file.
1
14
15#pragma once
16
17#include <stddef.h>
18#include <stdbool.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
29typedef struct {
31 const char *string;
32 const char *desc;
34
38typedef struct {
39 const char *option_name;
40 const char **values;
41 size_t value_count;
43
53const enum_to_string_entry_t *options_get_enum_entries(const char *option_name, size_t *entry_count);
54
62const char **options_get_enum_values(const char *option_name, size_t *value_count);
63
70bool options_is_enum_option(const char *option_name);
71
72/* ═══════════════════════════════════════════════════════════════════════════
73 * Enum Value Constants - Used throughout the codebase
74 * ═════════════════════════════════════════════════════════════════════════ */
75
76/* Shared scalar values */
77#define OPT_VALUE_AUTO "auto"
78#define OPT_VALUE_TRUE "true"
79#define OPT_VALUE_FALSE "false"
80#define OPT_COMPLETION_SHELL_BASH "bash"
81#define OPT_COMPLETION_SHELL_FISH "fish"
82#define OPT_COMPLETION_SHELL_ZSH "zsh"
83#define OPT_COMPLETION_SHELL_POWERSHELL "powershell"
84#define OPT_RENDER_THEME_DARK "dark"
85#define OPT_RENDER_THEME_LIGHT "light"
86#define OPT_RENDER_THEME_AUTO OPT_VALUE_AUTO
87
88/* log-level values */
89#define OPT_LOG_LEVEL_DEV "dev"
90#define OPT_LOG_LEVEL_DEBUG "debug"
91#define OPT_LOG_LEVEL_INFO "info"
92#define OPT_LOG_LEVEL_WARN "warn"
93#define OPT_LOG_LEVEL_ERROR "error"
94#define OPT_LOG_LEVEL_FATAL "fatal"
95
96/* color-mode values */
97#define OPT_COLOR_MODE_AUTO "auto"
98#define OPT_COLOR_MODE_NONE "none"
99#define OPT_COLOR_MODE_MONO "mono"
100#define OPT_COLOR_MODE_16 "16"
101#define OPT_COLOR_MODE_256 "256"
102#define OPT_COLOR_MODE_TRUECOLOR "truecolor"
103
104/* color-filter values */
105#define OPT_COLOR_FILTER_NONE "none"
106#define OPT_COLOR_FILTER_BLACK "black"
107#define OPT_COLOR_FILTER_WHITE "white"
108#define OPT_COLOR_FILTER_GREEN "green"
109#define OPT_COLOR_FILTER_MAGENTA "magenta"
110#define OPT_COLOR_FILTER_FUCHSIA "fuchsia"
111#define OPT_COLOR_FILTER_ORANGE "orange"
112#define OPT_COLOR_FILTER_TEAL "teal"
113#define OPT_COLOR_FILTER_CYAN "cyan"
114#define OPT_COLOR_FILTER_PINK "pink"
115#define OPT_COLOR_FILTER_RED "red"
116#define OPT_COLOR_FILTER_YELLOW "yellow"
117#define OPT_COLOR_FILTER_RAINBOW "rainbow"
118
119/* palette values */
120#define OPT_PALETTE_STANDARD "standard"
121#define OPT_PALETTE_BLOCKS "blocks"
122#define OPT_PALETTE_DIGITAL "digital"
123#define OPT_PALETTE_MINIMAL "minimal"
124#define OPT_PALETTE_COOL "cool"
125#define OPT_PALETTE_CUSTOM "custom"
126
127/* render-mode values */
128#define OPT_RENDER_MODE_FOREGROUND "foreground"
129#define OPT_RENDER_MODE_FG "fg"
130#define OPT_RENDER_MODE_BACKGROUND "background"
131#define OPT_RENDER_MODE_BG "bg"
132#define OPT_RENDER_MODE_HALF_BLOCK "half-block"
133
134/* reconnect values */
135#define OPT_RECONNECT_OFF "off"
136#define OPT_RECONNECT_AUTO "auto"
137
138/* audio visualization source values */
139#define OPT_AUDIO_SOURCE_ALL "all"
140#define OPT_AUDIO_SOURCE_CALL "call"
141#define OPT_AUDIO_SOURCE_MIC "mic"
142#define OPT_AUDIO_SOURCE_MEDIA "media"
143#define OPT_AUDIO_SOURCE_AUTO "auto"
144
145/* audio-capture-source values */
146#define OPT_AUDIO_CAPTURE_SOURCE_AUTO "auto"
147#define OPT_AUDIO_CAPTURE_SOURCE_MIC "mic"
148#define OPT_AUDIO_CAPTURE_SOURCE_MEDIA "media"
149#define OPT_AUDIO_CAPTURE_SOURCE_BOTH "both"
150#define OPT_AUDIO_CAPTURE_SOURCE_REMOTE "remote"
151
152#ifdef __cplusplus
153}
154#endif
const char ** options_get_enum_values(const char *option_name, size_t *value_count)
Get enum values for an option.
Definition enums.c:30
bool options_is_enum_option(const char *option_name)
Check if an option has enum values.
Definition enums.c:44
const enum_to_string_entry_t * options_get_enum_entries(const char *option_name, size_t *entry_count)
Get enum entries with descriptions for an option.
Definition enums.c:9
Enum value mapping for an option.
Definition enums.h:38
const char ** values
Array of valid string values.
Definition enums.h:40
size_t value_count
Number of values in array.
Definition enums.h:41
const char * option_name
Long option name (e.g., "log-level").
Definition enums.h:39
Enum value mapping with description for shell completions.
Definition enums.h:29
int enum_value
The numeric enum value.
Definition enums.h:30
const char * desc
Description for shell completion.
Definition enums.h:32
const char * string
The string representation of that enum value.
Definition enums.h:31