diff options
| author | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2023-02-19 15:18:01 -0800 |
|---|---|---|
| committer | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2023-02-19 15:18:01 -0800 |
| commit | dff45003e1bd6493a98f088c4767f544bc193f4e (patch) | |
| tree | 75dd87c8bacda293baf6ef3adc9d5f070df47c9c /src/App.zig | |
| parent | 8889dd7de2cde3cdcd9b540d733aaa455b80e7db (diff) | |
macos: hook up clipboards
Diffstat (limited to 'src/App.zig')
| -rw-r--r-- | src/App.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/App.zig b/src/App.zig index 29d3fc617..4efbda3b2 100644 --- a/src/App.zig +++ b/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(); |
