#ifndef ASCII3D_TUI_H #define ASCII3D_TUI_H #include "renderer.h" #include #ifdef __cplusplus extern "C" { #endif // Reconfigures standard input to be non-blocking and disables canonical mode. // This allows us to poll the keyboard gracefully in the render loop. int tui_init(void); // Restores terminal to its initial state to avoid leaving users with a broken // prompt. void tui_cleanup(void); // Processes pending keys and updates application state. // Standard typing appends to the text_buffer, while specific commands alter // settings. Returns non-zero when an exit is requested. int tui_process_input(RotationState *rotation, RenderSettings *settings, char *text_buffer, size_t max_text_len); #ifdef __cplusplus } #endif #endif