aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/terminal/clipboard.zig
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-07-16 23:28:05 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-07-16 23:29:28 +0300
commit4a3302d19a2baa3a33e910e0088c24e780905b90 (patch)
treedcaf76fae1c82102d933c9225b17ca7ac5d3a847 /vendor/libghostty-vt/src/terminal/clipboard.zig
parent550e9f8cc085f428429f5cf2da0bb2dba897e8b8 (diff)
chore: update vendored libghostty-vt
refs #276
Diffstat (limited to 'vendor/libghostty-vt/src/terminal/clipboard.zig')
-rw-r--r--vendor/libghostty-vt/src/terminal/clipboard.zig36
1 files changed, 36 insertions, 0 deletions
diff --git a/vendor/libghostty-vt/src/terminal/clipboard.zig b/vendor/libghostty-vt/src/terminal/clipboard.zig
new file mode 100644
index 00000000..554ca984
--- /dev/null
+++ b/vendor/libghostty-vt/src/terminal/clipboard.zig
@@ -0,0 +1,36 @@
+/// The clipboard destination for a write.
+pub const Location = enum(c_int) {
+ standard = 0,
+ selection = 1,
+ primary = 2,
+ _,
+};
+
+/// A single representation of clipboard data.
+///
+/// The MIME type and data are borrowed and only valid for the duration of a
+/// clipboard write callback. Data is binary-safe.
+pub const Content = struct {
+ mime: []const u8,
+ data: []const u8,
+};
+
+/// One atomic clipboard write.
+///
+/// Contents are borrowed and only valid for the duration of a clipboard write
+/// callback. An empty contents slice clears the destination.
+pub const Write = struct {
+ location: Location,
+ contents: []const Content,
+};
+
+/// The result of a clipboard write.
+pub const WriteResult = enum(c_int) {
+ success = 0,
+ denied = 1,
+ unsupported = 2,
+ busy = 3,
+ invalid_data = 4,
+ io_error = 5,
+ _,
+};