summaryrefslogtreecommitdiff
path: root/abi/term.zig
diff options
context:
space:
mode:
Diffstat (limited to 'abi/term.zig')
-rw-r--r--abi/term.zig11
1 files changed, 5 insertions, 6 deletions
diff --git a/abi/term.zig b/abi/term.zig
index 68434e8e..40f9e4f3 100644
--- a/abi/term.zig
+++ b/abi/term.zig
@@ -231,6 +231,9 @@ pub const ImagesAt = struct {
now_ms: u64,
cell_w: u32,
cell_h: u32,
+ /// Its images as glyph art even where pixels could be drawn (the
+ /// pane's Petscii).
+ petscii: bool = false,
};
/// What a predicted echo reads of a cell: its codepoint, whether the shell
@@ -286,8 +289,6 @@ pub const Applied = struct { seq: u32, extra: []const u8 };
pub const Parts = struct {
reply: []const u8 = "",
reply_dropped: u32 = 0,
- mouse_cell: ?Coordinate = null,
- petscii: bool = false,
/// The view's top row, counted from the top of the history.
view: usize = 0,
phase: Prompt.Phase = .none,
@@ -363,8 +364,8 @@ pub const Ops = struct {
// ---- input ----
key: *const fn (s: *State, k: plain.Key, out: *std.Io.Writer) error{WriteFailed}!void,
- mouse: *const fn (s: *State, buf: *[64]u8, action: MouseAction, button: ?MouseButton, mods: MouseMods, col: i32, row: i32, any_pressed: bool) []const u8,
- wheel: *const fn (s: *State, buf: *[64]u8, turn: MouseButton, col: u16, row: u16, mods: MouseMods) ?[]const u8,
+ mouse: *const fn (s: *State, last: *?Parts.Coordinate, buf: *[64]u8, action: MouseAction, button: ?MouseButton, mods: MouseMods, col: i32, row: i32, any_pressed: bool) []const u8,
+ wheel: *const fn (s: *State, last: *?Parts.Coordinate, buf: *[64]u8, turn: MouseButton, col: u16, row: u16, mods: MouseMods) ?[]const u8,
paste: *const fn (s: ?*const State, text: []u8) [3][]const u8,
modes: *const fn (s: ?*const State) Modes,
promptMoves: *const fn (s: *State, row: i32, col: i32) ?Moves,
@@ -406,8 +407,6 @@ pub const Ops = struct {
/// what it keeps to draw them is its own allocator's), and their
/// placeholder cells blanked in `frame` (`frame_cols` wide).
images: *const fn (s: *State, gpa: std.mem.Allocator, at: ImagesAt, out: *std.ArrayList(plain.Placement), frame: []plain.Cell, frame_cols: u16) void,
- petscii: *const fn (s: ?*const State) ?bool,
- togglePetscii: *const fn (s: *State) void,
hasImages: *const fn (s: ?*const State) bool,
// ---- its replicas ----