ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
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 104 of file splash.c.

104 {
105 discovery_splash_init();
106 mutex_lock(&g_discovery_splash_mutex);
107 memset(&g_discovery_splash, 0, sizeof(g_discovery_splash));
109 mutex_unlock(&g_discovery_splash_mutex);
110}
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 94 of file splash.c.

94 {
95 discovery_splash_init();
96 mutex_lock(&g_discovery_splash_mutex);
97 g_discovery_splash.enabled = true;
98 g_discovery_splash.joining = joining;
99 ui_controller_title_discovery(session && session[0], joining);
100 SAFE_STRNCPY(g_discovery_splash.session_string, session ? session : "", sizeof(g_discovery_splash.session_string));
101 mutex_unlock(&g_discovery_splash_mutex);
102}
#define SAFE_STRNCPY(dst, src, size)
Definition common.h:423
void ui_controller_title_discovery(bool has_session, bool joining)

References SAFE_STRNCPY, and ui_controller_title_discovery().

Referenced by discovery_main().