import Cocoa import SwiftUI import Foundation class PreferencesWindow: NSWindow { init() { super.init( contentRect: NSRect(x: 0, y: 0, width: 600, height: 600), styleMask: [.titled, .closable, .resizable, .fullSizeContentView], backing: .buffered, defer: false) super.center() self.isReleasedWhenClosed = false super.setFrameAutosaveName("Preferences Window") super.contentView = NSHostingView(rootView: PreferencesScreen()) super.makeKeyAndOrderFront(nil) } }