mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-04 00:46:33 +00:00
terminal/kitty-gfx: support "query", loading images, tests
This commit is contained in:
@@ -15,6 +15,7 @@ const ansi = @import("ansi.zig");
|
||||
const modes = @import("modes.zig");
|
||||
const charsets = @import("charsets.zig");
|
||||
const csi = @import("csi.zig");
|
||||
const kitty = @import("kitty.zig");
|
||||
const sgr = @import("sgr.zig");
|
||||
const Tabstops = @import("Tabstops.zig");
|
||||
const trace = @import("tracy").trace;
|
||||
@@ -1555,6 +1556,22 @@ pub fn getPwd(self: *const Terminal) ?[]const u8 {
|
||||
return self.pwd.items;
|
||||
}
|
||||
|
||||
/// Execute a kitty graphics command. The buf is used to populate with
|
||||
/// the response that should be sent as an APC sequence. The response will
|
||||
/// be a full, valid APC sequence.
|
||||
///
|
||||
/// If an error occurs, the caller should response to the pty that a
|
||||
/// an error occurred otherwise the behavior of the graphics protocol is
|
||||
/// undefined.
|
||||
pub fn kittyGraphics(
|
||||
self: *Terminal,
|
||||
alloc: Allocator,
|
||||
buf: []u8,
|
||||
cmd: *kitty.graphics.Command,
|
||||
) ?kitty.graphics.Response {
|
||||
return kitty.graphics.execute(alloc, self, buf, cmd);
|
||||
}
|
||||
|
||||
/// Full reset
|
||||
pub fn fullReset(self: *Terminal) void {
|
||||
self.primaryScreen(.{ .clear_on_exit = true, .cursor_save = true });
|
||||
|
Reference in New Issue
Block a user