mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-25 13:16:11 +03:00
apprt/gtk-ng: wip set clipboard
This commit is contained in:
@ -85,10 +85,11 @@ pub fn setClipboardString(
|
||||
clipboard_type: apprt.Clipboard,
|
||||
confirm: bool,
|
||||
) !void {
|
||||
_ = self;
|
||||
_ = val;
|
||||
_ = clipboard_type;
|
||||
_ = confirm;
|
||||
self.surface.setClipboardString(
|
||||
val,
|
||||
clipboard_type,
|
||||
confirm,
|
||||
);
|
||||
}
|
||||
|
||||
pub fn defaultTermioEnv(self: *Self) !std.process.EnvMap {
|
||||
|
@ -703,6 +703,20 @@ pub const Surface = extern struct {
|
||||
);
|
||||
}
|
||||
|
||||
pub fn setClipboardString(
|
||||
self: *Self,
|
||||
val: [:0]const u8,
|
||||
clipboard_type: apprt.Clipboard,
|
||||
confirm: bool,
|
||||
) void {
|
||||
Clipboard.set(
|
||||
self,
|
||||
val,
|
||||
clipboard_type,
|
||||
confirm,
|
||||
);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Virtual Methods
|
||||
|
||||
@ -1930,6 +1944,22 @@ const Clipboard = struct {
|
||||
};
|
||||
}
|
||||
|
||||
/// Set the clipboard contents.
|
||||
pub fn set(
|
||||
self: *Surface,
|
||||
val: [:0]const u8,
|
||||
clipboard_type: apprt.Clipboard,
|
||||
confirm: bool,
|
||||
) void {
|
||||
_ = self;
|
||||
_ = val;
|
||||
_ = clipboard_type;
|
||||
_ = confirm;
|
||||
}
|
||||
|
||||
/// Request data from the clipboard (read the clipboard). This
|
||||
/// completes asynchronously and will call the `completeClipboardRequest`
|
||||
/// core surface API when done.
|
||||
pub fn request(
|
||||
self: *Surface,
|
||||
clipboard_type: apprt.Clipboard,
|
||||
|
Reference in New Issue
Block a user