mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-06-08 12:54:28 +00:00
macos: hook up clipboards
This commit is contained in:
10
src/App.zig
10
src/App.zig
@@ -368,6 +368,11 @@ pub const CAPI = struct {
|
||||
};
|
||||
}
|
||||
|
||||
/// Return the userdata associated with the app.
|
||||
export fn ghostty_app_userdata(v: *App) ?*anyopaque {
|
||||
return v.runtime.opts.userdata;
|
||||
}
|
||||
|
||||
export fn ghostty_app_free(ptr: ?*App) void {
|
||||
if (ptr) |v| {
|
||||
v.destroy();
|
||||
@@ -400,6 +405,11 @@ pub const CAPI = struct {
|
||||
if (ptr) |v| v.app.closeWindow(v);
|
||||
}
|
||||
|
||||
/// Returns the app associated with a surface.
|
||||
export fn ghostty_surface_app(win: *Window) *App {
|
||||
return win.app;
|
||||
}
|
||||
|
||||
/// Tell the surface that it needs to schedule a render
|
||||
export fn ghostty_surface_refresh(win: *Window) void {
|
||||
win.window.refresh();
|
||||
|
||||
Reference in New Issue
Block a user