DisplayRef
public struct DisplayRef : DisplayProtocol, GWeakCapturing
The DisplayRef type acts as a lightweight Swift reference to an underlying GdkDisplay instance.
It exposes methods that can operate on this data type through DisplayProtocol conformance.
Use DisplayRef only as an unowned reference to an existing GdkDisplay instance.
GdkDisplay objects purpose are two fold:
To manage and provide information about input devices (pointers and keyboards)
To manage and provide information about the available
GdkScreens
GdkDisplay objects are the GDK representation of an X Display,
which can be described as a workstation consisting of
a keyboard, a pointing device (such as a mouse) and one or more
screens.
It is used to open and keep track of various GdkScreen objects
currently instantiated by the application. It is also used to
access the keyboard(s) and mouse pointer(s) of the display.
Most of the input device handling has been factored out into
the separate GdkDeviceManager object. Every display has a
device manager, which you can obtain using
gdk_display_get_device_manager().
-
Untyped pointer to the underlying `GdkDisplay` instance.For type-safe access, use the generated, typed pointer
display_ptrproperty instead.Declaration
Swift
public let ptr: UnsafeMutableRawPointer!
-
Designated initialiser from the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<GdkDisplay>) -
Designated initialiser from a constant pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<GdkDisplay>) -
Conditional initialiser from an optional pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<GdkDisplay>?) -
Conditional initialiser from an optional, non-mutable pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafePointer<GdkDisplay>?) -
Conditional initialiser from an optional
gpointerDeclaration
Swift
@inlinable init!(gpointer g: gpointer?) -
Conditional initialiser from an optional, non-mutable
gconstpointerDeclaration
Swift
@inlinable init!(gconstpointer g: gconstpointer?) -
Reference intialiser for a related type that implements
DisplayProtocolDeclaration
Swift
@inlinable init<T>(_ other: T) where T : DisplayProtocol -
This factory is syntactic sugar for setting weak pointers wrapped in
GWeak<T>Declaration
Swift
@inlinable static func unowned<T>(_ other: T) -> DisplayRef where T : DisplayProtocol -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
DisplayProtocol.Declaration
Swift
@inlinable init<T>(cPointer: UnsafeMutablePointer<T>) -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
DisplayProtocol.Declaration
Swift
@inlinable init<T>(constPointer: UnsafePointer<T>) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
DisplayProtocol.Declaration
Swift
@inlinable init(mutating raw: UnsafeRawPointer) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
DisplayProtocol.Declaration
Swift
@inlinable init(raw: UnsafeMutableRawPointer) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
DisplayProtocol.Declaration
Swift
@inlinable init(opaquePointer: OpaquePointer) -
Gets the default `GdkDisplay`. This is a conveniencefunction for:
gdk_display_manager_get_default_display (gdk_display_manager_get ()).Declaration
Swift
@inlinable static func getDefault() -> DisplayRef! -
Opens a display.
Declaration
Swift
@inlinable static func open(displayName: UnsafePointer<gchar>!) -> DisplayRef! -
Opens the default display specified by command line arguments or environment variables, sets it as the default display, and returns it.
gdk_parse_args()must have been called first. If the default display has previously been set, simply returns that. An internal function that should not be used by applications.open_default_libgtk_only is deprecated: This symbol was never meant to be used outside of GTK+
Declaration
Swift
@available(*, deprecated) @inlinable static func openDefaultLibgtkOnly() -> DisplayRef!
View on GitHub
Install in Dash
DisplayRef Structure Reference