mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-29 18:43:56 +00:00
Add C API function to handle new surfaces of different types
This commit is contained in:
@@ -1551,8 +1551,24 @@ pub const CAPI = struct {
|
||||
}
|
||||
|
||||
/// Returns the config to use for surfaces that inherit from this one.
|
||||
/// Deprecated: Use ghostty_surface_inherited_config_window/tab/split instead.
|
||||
export fn ghostty_surface_inherited_config(surface: *Surface) Surface.Options {
|
||||
return surface.newSurfaceOptions();
|
||||
return surface.newSurfaceOptions(.window);
|
||||
}
|
||||
|
||||
/// Returns the config to use for new windows that inherit from this surface.
|
||||
export fn ghostty_surface_inherited_config_window(surface: *Surface) Surface.Options {
|
||||
return surface.newSurfaceOptions(.window);
|
||||
}
|
||||
|
||||
/// Returns the config to use for new tabs that inherit from this surface.
|
||||
export fn ghostty_surface_inherited_config_tab(surface: *Surface) Surface.Options {
|
||||
return surface.newSurfaceOptions(.tab);
|
||||
}
|
||||
|
||||
/// Returns the config to use for new splits that inherit from this surface.
|
||||
export fn ghostty_surface_inherited_config_split(surface: *Surface) Surface.Options {
|
||||
return surface.newSurfaceOptions(.split);
|
||||
}
|
||||
|
||||
/// Update the configuration to the provided config for only this surface.
|
||||
|
||||
Reference in New Issue
Block a user