mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-21 20:34:19 +00:00
apprt: add C API for detecting background transparency per surface
This commit is contained in:
@@ -470,6 +470,11 @@ pub const CAPI = struct {
|
||||
return surface.app;
|
||||
}
|
||||
|
||||
/// Returns ture if the surface has transparency set.
|
||||
export fn ghostty_surface_transparent(surface: *Surface) bool {
|
||||
return surface.app.config.@"background-opacity" < 1.0;
|
||||
}
|
||||
|
||||
/// Tell the surface that it needs to schedule a render
|
||||
export fn ghostty_surface_refresh(surface: *Surface) void {
|
||||
surface.refresh();
|
||||
|
||||
Reference in New Issue
Block a user