ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
Video chat in your terminal
Loading...
Searching...
No Matches

Intro and status screen display for ascii-chat with animated rainbow effects. More...

Go to the source code of this file.

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.
void splash_log_append (const char *message)
 Append message to splash log buffer.
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_wait_for_animation (void)
 Wait for splash animation thread to fully exit.
bool splash_should_display (bool is_intro)
 Check if splash screen should display.
void splash_restore_stderr (void)
 Restore stderr after splash animation completes.
void splash_set_update_notification (const char *notification)
 Set update notification to display on splash/status screens.
void splash_clear_display_context (void)
 Clear the cached display context to prevent use-after-free.
void splash_notify_first_frame (void)
 Notify splash that the first frame has been rendered.
bool splash_is_running (void)
 Check if splash screen animation is currently running.
void splash_set_discovery_session (const char *session_string, bool joining)
void splash_clear_discovery_session (void)

Detailed Description

Intro and status screen display for ascii-chat with animated rainbow effects.

Provides splash screen functionality for displaying:

  • Intro screen with animated rainbow ASCII art (client/mirror/discovery modes)
  • Status screen with server/discovery-service information

The splash screen displays while initialization happens in the background:

  • For clients/mirror: displays during network connection & frame preparation
  • For servers: displays during binding and initialization
Author
Zachary Fogg me@zf.nosp@m.o.gg
Date
February 2026

Definition in file splash.h.

Function Documentation

◆ splash_clear_discovery_session()

void splash_clear_discovery_session ( void )

Reset discovery presentation after the animation has been joined.

Definition at line 111 of file splash.c.

111 {
112 discovery_splash_init();
113 mutex_lock(&g_discovery_splash_mutex);
114 memset(&g_discovery_splash, 0, sizeof(g_discovery_splash));
116 mutex_unlock(&g_discovery_splash_mutex);
117}
void ui_controller_title_activity(ui_title_activity_t activity)
@ UI_TITLE_ACTIVITY_IDLE

References ui_controller_title_activity(), and UI_TITLE_ACTIVITY_IDLE.

Referenced by discovery_main().

◆ splash_set_discovery_session()

void splash_set_discovery_session ( const char * session_string,
bool joining )

Store discovery presentation before or during splash startup. The string is copied.

Definition at line 100 of file splash.c.

100 {
101 discovery_splash_init();
102 mutex_lock(&g_discovery_splash_mutex);
103 g_discovery_splash.enabled = true;
104 g_discovery_splash.joining = joining;
105 ui_controller_title_discovery(session && session[0], joining);
106 SAFE_STRNCPY(g_discovery_splash.session_string, session ? session : "",
107 sizeof(g_discovery_splash.session_string));
108 mutex_unlock(&g_discovery_splash_mutex);
109}
#define SAFE_STRNCPY(dst, src, size)
void ui_controller_title_discovery(bool has_session, bool joining)

References SAFE_STRNCPY, and ui_controller_title_discovery().

Referenced by discovery_main().