aboutsummaryrefslogtreecommitdiff
path: root/ricochet/src/tui/screen.hh
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-10-17 03:54:06 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-10-17 03:54:06 +0800
commitb84c87ef820976cc541586a09ec6f845726580f2 (patch)
treeff268a659bb40236c461b86653c1373a5935cbd2 /ricochet/src/tui/screen.hh
parentb1c08a55448a6e363eddba88cbc58e61de630dc9 (diff)
downloadrcc-project-b84c87ef820976cc541586a09ec6f845726580f2.tar.gz
rcc-project-b84c87ef820976cc541586a09ec6f845726580f2.tar.xz
feat(tui): add Unicode text service and document layout
Diffstat (limited to 'ricochet/src/tui/screen.hh')
-rw-r--r--ricochet/src/tui/screen.hh20
1 files changed, 2 insertions, 18 deletions
diff --git a/ricochet/src/tui/screen.hh b/ricochet/src/tui/screen.hh
index f0df278..9677eb0 100644
--- a/ricochet/src/tui/screen.hh
+++ b/ricochet/src/tui/screen.hh
@@ -18,7 +18,7 @@
#pragma once
-#include "ricochet/tui/document.hh"
+#include "paint.hh"
#include "ricochet/tui/session.hh"
#include <chrono>
@@ -26,27 +26,10 @@
#include <cstdio>
#include <memory>
#include <optional>
-#include <string>
#include <vector>
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<PaintGlyph> glyphs {};
- std::optional<CellPoint> cursor {};
-};
-
struct InputBatch
{
std::vector<InputEvent> 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.