From 6ac5c86e5d00e65f47a710e31f9c08b6a13f3bce Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Sat, 17 Oct 2026 03:54:06 +0800 Subject: feat(tui): add Unicode text service and document layout --- src/tui/screen.hh | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'src/tui/screen.hh') diff --git a/src/tui/screen.hh b/src/tui/screen.hh index f0df278..9677eb0 100644 --- a/src/tui/screen.hh +++ b/src/tui/screen.hh @@ -18,7 +18,7 @@ #pragma once -#include "ricochet/tui/document.hh" +#include "paint.hh" #include "ricochet/tui/session.hh" #include @@ -26,27 +26,10 @@ #include #include #include -#include #include namespace ricochet::tui::detail { -// Layout supplies one printable spacing character and its combining marks per -// glyph, with a measured width. Raw document text never goes directly to curses. -struct PaintGlyph -{ - CellPoint position {}; - int width { 1 }; - std::wstring text {}; - TextStyle style {}; -}; - -struct Frame -{ - std::vector glyphs {}; - std::optional cursor {}; -}; - struct InputBatch { std::vector events {}; @@ -62,6 +45,7 @@ public: Screen& operator=( const Screen& ) = delete; ScreenSize size() const; + static std::size_t glyph_capacity(); TerminalCapabilities capabilities() const; InputBatch read_events( std::size_t limit ); // Wait only polls descriptors; wgetch remains the sole terminal reader. -- cgit v1.2.3