mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-05-12 11:18:37 +03:00
21 lines
485 B
Swift
21 lines
485 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_NON_NATIVE:
|
|
.nonNative
|
|
|
|
case GHOSTTY_FULLSCREEN_NON_NATIVE_VISIBLE_MENU:
|
|
.nonNativeVisibleMenu
|
|
|
|
default:
|
|
nil
|
|
}
|
|
}
|
|
}
|