summaryrefslogtreecommitdiff
path: root/src/surface.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/surface.zig')
-rw-r--r--src/surface.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/surface.zig b/src/surface.zig
index ca517d3b..c0f352ee 100644
--- a/src/surface.zig
+++ b/src/surface.zig
@@ -4,7 +4,6 @@ const pardes = @import("pardes.zig");
const std = @import("std");
const layout = @import("layout.zig");
const uucode = @import("uucode");
-const vaxis = @import("vaxis");
const panes = @import("panes.zig");
const config = @import("config.zig");
const MAX_PANES = pardes.MAX_PANES;
@@ -293,9 +292,11 @@ pub const Chrome = struct {
/// The canonical interface: what a frame of pardes IS. The tui shell writes
/// these cells to vaxis one-to-one; the SDL shells rasterize them.
pub const Surface = struct {
+ pub const GpuFrame = struct { bytes: []const u8, serial: u32, dst: RectCell };
/// `box` is acme's boxcursor, shown while a pane or a column is carried
/// by its grip (cols.c:485, rows.c:151).
pub const PointerShape = enum(u8) { arrow, link, target, box };
+ gpu_frames: [MAX_PANES]?GpuFrame = @splat(null),
pointer_shape: PointerShape = .arrow,
body_layers: [MAX_PANES]Layer = @splat(.{}),
tag_layers: [MAX_TAG_LAYERS]Layer = @splat(.{}),
@@ -415,7 +416,7 @@ pub const Surface = struct {
const width: u16 = if (decoded == null or (cp < 0x80 and cp_slice.len == 1))
1
else
- @max(1, vaxis.gwidth.gwidth(cp_slice, .unicode));
+ @max(1, panes.File.utf8Width(cp_slice));
if (width == 2 and col + 1 >= end) return null;
var shown = cp_slice;
if (shown.len > @typeInfo(@FieldType(Cell, "text")).array.len) {