ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
splash.c File Reference

Intro and status screen display implementation with animated rainbow effects. More...

Go to the source code of this file.

Data Structures

struct  splash_header_ctx_t
 Context data for splash header rendering. More...
 

Macros

#define ASCII_LOGO_LINES   7
 
#define ASCII_LOGO_WIDTH   36
 
#define RAINBOW_COLOR_COUNT   7
 

Functions

void splash_log_init (void)
 Initialize log buffer for splash animation.
 
void splash_log_destroy (void)
 Destroy splash log buffer.
 
void splash_log_clear (void)
 Clear splash log buffer.
 
bool splash_should_display (bool is_intro)
 Check if splash screen should display.
 
int splash_intro_start (session_display_ctx_t *ctx)
 Start animated intro screen with rainbow ASCII art (non-blocking)
 
int splash_intro_done (void)
 Signal that intro splash should end (first frame ready to render)
 
void splash_restore_stderr (void)
 Restore stderr after splash animation completes.
 
void splash_clear_display_context (void)
 Clear the cached display context to prevent use-after-free.
 
bool splash_is_running (void)
 Check if splash screen animation is currently running.
 
void splash_wait_for_animation (void)
 Wait for splash animation thread to fully exit.
 
void splash_set_update_notification (const char *notification)
 Set update notification to display on splash/status screens.
 

Detailed Description

Intro and status screen display implementation with animated rainbow effects.

Implements splash screen functionality including:

  • TTY detection with stdin/stdout checks
  • Animated rainbow color generation and cycling
  • UTF-8 box drawing character support with ASCII fallback
  • Non-blocking animation that runs while app initializes
  • Clean integration with main frame rendering
Author
Zachary Fogg me@zf.nosp@m.o.gg
Date
February 2026

Definition in file splash.c.

Macro Definition Documentation

◆ ASCII_LOGO_LINES

#define ASCII_LOGO_LINES   7

Definition at line 53 of file splash.c.

◆ ASCII_LOGO_WIDTH

#define ASCII_LOGO_WIDTH   36

Definition at line 54 of file splash.c.

◆ RAINBOW_COLOR_COUNT

#define RAINBOW_COLOR_COUNT   7

Definition at line 70 of file splash.c.

Variable Documentation

◆ anim_thread

asciichat_thread_t anim_thread

Definition at line 100 of file splash.c.

◆ frame

◆ intro_done_time_ns

atomic_t intro_done_time_ns

Definition at line 102 of file splash.c.

◆ is_running

atomic_t is_running

Definition at line 96 of file splash.c.

◆ should_stop

atomic_t should_stop

Definition at line 97 of file splash.c.

◆ start_time_ns

uint64_t start_time_ns

Definition at line 101 of file splash.c.

◆ thread_created

atomic_t thread_created

Definition at line 98 of file splash.c.