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).
-
Untyped pointer to the underlying
GdkToplevelLayout
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
toplevel_layout_ptr
Default implementationTyped 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)
-
copy()
Extension methodCreate a new
GdkToplevelLayout
and copy the contents oflayout
into it.Declaration
Swift
@inlinable func copy() -> ToplevelLayoutRef!
-
equal(other:
Extension method) Check whether
layout
andother
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 totrue
if it should go fullscreen, orfalse
, if it should go unfullscreen.Declaration
Swift
@inlinable func get(fullscreen: UnsafeMutablePointer<gboolean>!) -> Bool
-
getFullscreenMonitor()
Extension methodReturns 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 totrue
if it should go fullscreen, orfalse
, if it should go unmaximized.Declaration
Swift
@inlinable func get(maximized: UnsafeMutablePointer<gboolean>!) -> Bool
-
getResizable()
Extension methodReturns whether the layout should allow the user to resize the surface.
Declaration
Swift
@inlinable func getResizable() -> Bool
-
ref()
Extension methodIncreases the reference count of
layout
.Declaration
Swift
@discardableResult @inlinable func ref() -> ToplevelLayoutRef!
-
set(fullscreen:
Extension methodmonitor: ) 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:
Extension methodmonitor: ) 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 methodDecreases the reference count of
layout
.Declaration
Swift
@inlinable func unref()
-
fullscreenMonitor
Extension methodReturns the monitor that the layout is fullscreening the surface on.
Declaration
Swift
@inlinable var fullscreenMonitor: MonitorRef! { get }
-
resizable
Extension methodReturns whether the layout should allow the user to resize the surface.
Declaration
Swift
@inlinable var resizable: Bool { get nonmutating set }