portico/Sources/Portico/App/WindowConfig.swift

18 lines
765 B
Swift

/// Configuration for an ``ApplicationWindow`` scene collected by modifier methods
/// and applied at attach time.
@_spi(Portico) public struct WindowConfig {
/// The default window size in pixels, or `nil` for GTK's default.
@_spi(Portico) public var defaultSize: (width: Int32, height: Int32)? = nil
/// The window title, or `nil` for no title.
@_spi(Portico) public var title: String? = nil
/// Whether the window can be resized by the user, or `nil` for GTK's default.
@_spi(Portico) public var resizable: Bool? = nil
/// Whether the window should start in fullscreen mode.
@_spi(Portico) public var fullscreen: Bool = false
/// Creates an empty configuration with all defaults.
@_spi(Portico) public init() {}
}