ToplevelLayoutProtocol

public protocol ToplevelLayoutProtocol

The ToplevelLayoutProtocol protocol exposes the methods and properties of an underlying GdkToplevelLayout instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see ToplevelLayout. Alternatively, use ToplevelLayoutRef as a lighweight, unowned reference if you already have an instance you just want to use.

The GdkToplevelLayout struct contains information that is necessary to present a sovereign window on screen.

The GdkToplevelLayout struct is necessary for using [methodGdk.Toplevel.present].

Toplevel surfaces are sovereign windows that can be presented to the user in various states (maximized, on all workspaces, etc).

  • ptr

    Untyped pointer to the underlying GdkToplevelLayout instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • toplevel_layout_ptr Default implementation

    Typed pointer to the underlying GdkToplevelLayout instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the GdkToplevelLayout instance.

    Declaration

    Swift

    var toplevel_layout_ptr: UnsafeMutablePointer<GdkToplevelLayout>! { get }
  • Required Initialiser for types conforming to ToplevelLayoutProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

ToplevelLayout Record: ToplevelLayoutProtocol extension (methods and fields)

  • copy() Extension method

    Create a new GdkToplevelLayout and copy the contents of layout into it.

    Declaration

    Swift

    @inlinable
    func copy() -> ToplevelLayoutRef!
  • equal(other:) Extension method

    Check whether layout and other has identical layout properties.

    Declaration

    Swift

    @inlinable
    func equal<ToplevelLayoutT>(other: ToplevelLayoutT) -> Bool where ToplevelLayoutT : ToplevelLayoutProtocol
  • get(fullscreen:) Extension method

    If the layout specifies whether to the toplevel should go fullscreen, the value pointed to by fullscreen is set to true if it should go fullscreen, or false, if it should go unfullscreen.

    Declaration

    Swift

    @inlinable
    func get(fullscreen: UnsafeMutablePointer<gboolean>!) -> Bool
  • getFullscreenMonitor() Extension method

    Returns the monitor that the layout is fullscreening the surface on.

    Declaration

    Swift

    @inlinable
    func getFullscreenMonitor() -> MonitorRef!
  • get(maximized:) Extension method

    If the layout specifies whether to the toplevel should go maximized, the value pointed to by maximized is set to true if it should go fullscreen, or false, if it should go unmaximized.

    Declaration

    Swift

    @inlinable
    func get(maximized: UnsafeMutablePointer<gboolean>!) -> Bool
  • getResizable() Extension method

    Returns whether the layout should allow the user to resize the surface.

    Declaration

    Swift

    @inlinable
    func getResizable() -> Bool
  • ref() Extension method

    Increases the reference count of layout.

    Declaration

    Swift

    @discardableResult
    @inlinable
    func ref() -> ToplevelLayoutRef!
  • set(fullscreen:monitor:) Extension method

    Sets whether the layout should cause the surface to be fullscreen when presented.

    Declaration

    Swift

    @inlinable
    func set(fullscreen: Bool, monitor: MonitorRef? = nil)
  • set(fullscreen:monitor:) Extension method

    Sets whether the layout should cause the surface to be fullscreen when presented.

    Declaration

    Swift

    @inlinable
    func set<MonitorT>(fullscreen: Bool, monitor: MonitorT?) where MonitorT : MonitorProtocol
  • set(maximized:) Extension method

    Sets whether the layout should cause the surface to be maximized when presented.

    Declaration

    Swift

    @inlinable
    func set(maximized: Bool)
  • set(resizable:) Extension method

    Sets whether the layout should allow the user to resize the surface after it has been presented.

    Declaration

    Swift

    @inlinable
    func set(resizable: Bool)
  • unref() Extension method

    Decreases the reference count of layout.

    Declaration

    Swift

    @inlinable
    func unref()
  • fullscreenMonitor Extension method

    Returns the monitor that the layout is fullscreening the surface on.

    Declaration

    Swift

    @inlinable
    var fullscreenMonitor: MonitorRef! { get }
  • resizable Extension method

    Returns whether the layout should allow the user to resize the surface.

    Declaration

    Swift

    @inlinable
    var resizable: Bool { get nonmutating set }