terminal: expose kitty clipboard protocol (OSC 5522) for stream dispatch

This commit is contained in:
Mitchell Hashimoto
2026-08-21 12:15:07 -07:00
parent 6f007e7678
commit f2d4b32be3
2 changed files with 7 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
const build_options = @import("terminal_options");
const key = @import("kitty/key.zig");
pub const clipboard = @import("kitty/clipboard.zig");
pub const color = @import("kitty/color.zig");
pub const graphics = if (build_options.kitty_graphics) @import("kitty/graphics.zig") else struct {};

View File

@@ -22,6 +22,12 @@ pub const OSC = struct {
/// The terminator that was used in case we need to send a response.
terminator: Terminator,
pub const C = void;
pub fn cval(_: OSC) C {
return {};
}
/// Decode an option from the metadata.
pub fn readOption(self: OSC, comptime key: Option) ?key.Type() {
return key.read(self.metadata);