mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-18 05:20:29 +00:00
* ensure that `ghostty.h` compiles during basic Zig tests * ensure that non-exhaustive enums are kept synchronized between `ghostty.h` and their respective Zig counterpart. * adjust some enums that varied from established conventions
24 lines
599 B
Swift
24 lines
599 B
Swift
import GhosttyKit
|
|
|
|
extension FullscreenMode {
|
|
/// Initialize from a Ghostty fullscreen action.
|
|
static func from(ghostty: ghostty_action_fullscreen_e) -> Self? {
|
|
return switch ghostty {
|
|
case GHOSTTY_FULLSCREEN_NATIVE:
|
|
.native
|
|
|
|
case GHOSTTY_FULLSCREEN_MACOS_NON_NATIVE:
|
|
.nonNative
|
|
|
|
case GHOSTTY_FULLSCREEN_MACOS_NON_NATIVE_VISIBLE_MENU:
|
|
.nonNativeVisibleMenu
|
|
|
|
case GHOSTTY_FULLSCREEN_MACOS_NON_NATIVE_PADDED_NOTCH:
|
|
.nonNativePaddedNotch
|
|
|
|
default:
|
|
nil
|
|
}
|
|
}
|
|
}
|