aboutsummaryrefslogtreecommitdiff
path: root/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
commit6ac5c86e5d00e65f47a710e31f9c08b6a13f3bce (patch)
treea784193a4b65b2cdb884110d66442cdda3b60064 /src/tui/screen.hh
parent754006847fcfdaa68a59a2929d6c9020dd2616ed (diff)
downloadrwebbrowser-6ac5c86e5d00e65f47a710e31f9c08b6a13f3bce.tar.gz
rwebbrowser-6ac5c86e5d00e65f47a710e31f9c08b6a13f3bce.tar.xz
feat(tui): add Unicode text service and document layout
Diffstat (limited to 'src/tui/screen.hh')
-rw-r--r--src/tui/screen.hh20
1 files changed, 2 insertions, 18 deletions
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 <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.