ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
enums.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <stddef.h>
18#include <stdbool.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
27typedef struct {
29 const char *string;
30 const char *desc;
32
36typedef struct {
37 const char *option_name;
38 const char **values;
39 size_t value_count;
41
51const enum_to_string_entry_t *options_get_enum_entries(const char *option_name, size_t *entry_count);
52
60const char **options_get_enum_values(const char *option_name, size_t *value_count);
61
68bool options_is_enum_option(const char *option_name);
69
70/* ═══════════════════════════════════════════════════════════════════════════
71 * Enum Value Constants - Used throughout the codebase
72 * ═════════════════════════════════════════════════════════════════════════ */
73
74/* log-level values */
75#define OPT_LOG_LEVEL_DEV "dev"
76#define OPT_LOG_LEVEL_DEBUG "debug"
77#define OPT_LOG_LEVEL_INFO "info"
78#define OPT_LOG_LEVEL_WARN "warn"
79#define OPT_LOG_LEVEL_ERROR "error"
80#define OPT_LOG_LEVEL_FATAL "fatal"
81
82/* color-mode values */
83#define OPT_COLOR_MODE_AUTO "auto"
84#define OPT_COLOR_MODE_NONE "none"
85#define OPT_COLOR_MODE_16 "16"
86#define OPT_COLOR_MODE_256 "256"
87#define OPT_COLOR_MODE_TRUECOLOR "truecolor"
88
89/* color-filter values */
90#define OPT_COLOR_FILTER_NONE "none"
91#define OPT_COLOR_FILTER_BLACK "black"
92#define OPT_COLOR_FILTER_WHITE "white"
93#define OPT_COLOR_FILTER_GREEN "green"
94#define OPT_COLOR_FILTER_MAGENTA "magenta"
95#define OPT_COLOR_FILTER_FUCHSIA "fuchsia"
96#define OPT_COLOR_FILTER_ORANGE "orange"
97#define OPT_COLOR_FILTER_TEAL "teal"
98#define OPT_COLOR_FILTER_CYAN "cyan"
99#define OPT_COLOR_FILTER_PINK "pink"
100#define OPT_COLOR_FILTER_RED "red"
101#define OPT_COLOR_FILTER_YELLOW "yellow"
102#define OPT_COLOR_FILTER_RAINBOW "rainbow"
103
104/* palette values */
105#define OPT_PALETTE_STANDARD "standard"
106#define OPT_PALETTE_BLOCKS "blocks"
107#define OPT_PALETTE_DIGITAL "digital"
108#define OPT_PALETTE_MINIMAL "minimal"
109#define OPT_PALETTE_COOL "cool"
110#define OPT_PALETTE_CUSTOM "custom"
111
112/* render-mode values */
113#define OPT_RENDER_MODE_FOREGROUND "foreground"
114#define OPT_RENDER_MODE_FG "fg"
115#define OPT_RENDER_MODE_BACKGROUND "background"
116#define OPT_RENDER_MODE_BG "bg"
117#define OPT_RENDER_MODE_HALF_BLOCK "half-block"
118
119/* reconnect values */
120#define OPT_RECONNECT_OFF "off"
121#define OPT_RECONNECT_AUTO "auto"
122
123/* audio visualization source values */
124#define OPT_AUDIO_SOURCE_ALL "all"
125#define OPT_AUDIO_SOURCE_CALL "call"
126#define OPT_AUDIO_SOURCE_MIC "mic"
127#define OPT_AUDIO_SOURCE_MEDIA "media"
128#define OPT_AUDIO_SOURCE_AUTO "auto"
129
130/* audio-capture-source values */
131#define OPT_AUDIO_CAPTURE_SOURCE_AUTO "auto"
132#define OPT_AUDIO_CAPTURE_SOURCE_MIC "mic"
133#define OPT_AUDIO_CAPTURE_SOURCE_MEDIA "media"
134#define OPT_AUDIO_CAPTURE_SOURCE_BOTH "both"
135#define OPT_AUDIO_CAPTURE_SOURCE_REMOTE "remote"
136
137#ifdef __cplusplus
138}
139#endif
const char ** options_get_enum_values(const char *option_name, size_t *value_count)
Get enum values for an option.
Definition enums.c:166
bool options_is_enum_option(const char *option_name)
Check if an option has enum values.
Definition enums.c:222
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:134
ClangTool/LibTooling compatibility shim for stdbool.h.
Enum value mapping for an option.
Definition enums.h:36
const char ** values
Array of valid string values.
Definition enums.h:38
size_t value_count
Number of values in array.
Definition enums.h:39
const char * option_name
Long option name (e.g., "log-level")
Definition enums.h:37
Enum value mapping with description for shell completions.
Definition enums.h:27
int enum_value
The numeric enum value.
Definition enums.h:28
const char * desc
Description for shell completion.
Definition enums.h:30
const char * string
The string representation of that enum value.
Definition enums.h:29