ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
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 <stdbool.h>
18#include <stddef.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
55const enum_to_string_entry_t *options_get_enum_entries(const char *option_name,
56 size_t *entry_count);
57
66const char **options_get_enum_values(const char *option_name,
67 size_t *value_count);
68
75bool options_is_enum_option(const char *option_name);
76
77/* ═══════════════════════════════════════════════════════════════════════════
78 * Enum Value Constants - Used throughout the codebase
79 * ═════════════════════════════════════════════════════════════════════════ */
80
81/* Shared scalar values */
82#define OPT_VALUE_AUTO "auto"
83#define OPT_VALUE_TRUE "true"
84#define OPT_VALUE_FALSE "false"
85#define OPT_COMPLETION_SHELL_BASH "bash"
86#define OPT_COMPLETION_SHELL_FISH "fish"
87#define OPT_COMPLETION_SHELL_ZSH "zsh"
88#define OPT_COMPLETION_SHELL_POWERSHELL "powershell"
89#define OPT_RENDER_THEME_DARK "dark"
90#define OPT_RENDER_THEME_LIGHT "light"
91#define OPT_RENDER_THEME_AUTO OPT_VALUE_AUTO
92
93/* log-level values */
94#define OPT_LOG_LEVEL_DEV "dev"
95#define OPT_LOG_LEVEL_DEBUG "debug"
96#define OPT_LOG_LEVEL_INFO "info"
97#define OPT_LOG_LEVEL_WARN "warn"
98#define OPT_LOG_LEVEL_ERROR "error"
99#define OPT_LOG_LEVEL_FATAL "fatal"
100
101/* color-mode values */
102#define OPT_COLOR_MODE_AUTO "auto"
103#define OPT_COLOR_MODE_NONE "none"
104#define OPT_COLOR_MODE_MONO "mono"
105#define OPT_COLOR_MODE_16 "16"
106#define OPT_COLOR_MODE_256 "256"
107#define OPT_COLOR_MODE_TRUECOLOR "truecolor"
108
109/* color-filter values */
110#define OPT_COLOR_FILTER_NONE "none"
111#define OPT_COLOR_FILTER_BLACK "black"
112#define OPT_COLOR_FILTER_WHITE "white"
113#define OPT_COLOR_FILTER_GREEN "green"
114#define OPT_COLOR_FILTER_MAGENTA "magenta"
115#define OPT_COLOR_FILTER_FUCHSIA "fuchsia"
116#define OPT_COLOR_FILTER_ORANGE "orange"
117#define OPT_COLOR_FILTER_TEAL "teal"
118#define OPT_COLOR_FILTER_CYAN "cyan"
119#define OPT_COLOR_FILTER_PINK "pink"
120#define OPT_COLOR_FILTER_RED "red"
121#define OPT_COLOR_FILTER_YELLOW "yellow"
122#define OPT_COLOR_FILTER_RAINBOW "rainbow"
123
124/* palette values */
125#define OPT_PALETTE_STANDARD "standard"
126#define OPT_PALETTE_BLOCKS "blocks"
127#define OPT_PALETTE_DIGITAL "digital"
128#define OPT_PALETTE_MINIMAL "minimal"
129#define OPT_PALETTE_COOL "cool"
130#define OPT_PALETTE_CUSTOM "custom"
131
132/* render-mode values */
133#define OPT_RENDER_MODE_FOREGROUND "foreground"
134#define OPT_RENDER_MODE_FG "fg"
135#define OPT_RENDER_MODE_BACKGROUND "background"
136#define OPT_RENDER_MODE_BG "bg"
137#define OPT_RENDER_MODE_HALF_BLOCK "half-block"
138
139/* reconnect values */
140#define OPT_RECONNECT_OFF "off"
141#define OPT_RECONNECT_AUTO "auto"
142
143/* audio visualization source values */
144#define OPT_AUDIO_SOURCE_ALL "all"
145#define OPT_AUDIO_SOURCE_CALL "call"
146#define OPT_AUDIO_SOURCE_MIC "mic"
147#define OPT_AUDIO_SOURCE_MEDIA "media"
148#define OPT_AUDIO_SOURCE_AUTO "auto"
149
150/* audio-capture-source values */
151#define OPT_AUDIO_CAPTURE_SOURCE_AUTO "auto"
152#define OPT_AUDIO_CAPTURE_SOURCE_MIC "mic"
153#define OPT_AUDIO_CAPTURE_SOURCE_MEDIA "media"
154#define OPT_AUDIO_CAPTURE_SOURCE_BOTH "both"
155#define OPT_AUDIO_CAPTURE_SOURCE_REMOTE "remote"
156
157#ifdef __cplusplus
158}
159#endif
const char ** options_get_enum_values(const char *option_name, size_t *value_count)
Get enum values for an option.
Definition enums.c:34
bool options_is_enum_option(const char *option_name)
Check if an option has enum values.
Definition enums.c:51
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