ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
question.h File Reference

Cross-platform interactive prompting utilities. More...

Go to the source code of this file.

Data Structures

struct  prompt_opts_t
 Options for text prompts. More...
 

Macros

#define PROMPT_OPTS_DEFAULT   (prompt_opts_t){.echo = true, .same_line = false, .mask_char = 0}
 Default prompt options (echo enabled, answer on next line)
 
#define PROMPT_OPTS_PASSWORD   (prompt_opts_t){.echo = false, .same_line = true, .mask_char = '*'}
 Prompt options for password input (no echo, asterisk masking, same line)
 
#define PROMPT_OPTS_INLINE   (prompt_opts_t){.echo = true, .same_line = true, .mask_char = 0}
 Prompt options for inline text input (echo enabled, same line)
 

Functions

int platform_prompt_question (const char *prompt, char *buffer, size_t max_len, prompt_opts_t opts)
 Prompt the user for text input.
 
bool platform_prompt_yes_no (const char *prompt, bool default_yes)
 Prompt the user for a yes/no answer.
 
bool platform_is_interactive (void)
 Check if interactive prompting is available.
 

Detailed Description

Cross-platform interactive prompting utilities.

Definition in file question.h.