VisualRef

public struct VisualRef : VisualProtocol, GWeakCapturing

The VisualRef type acts as a lightweight Swift reference to an underlying GdkVisual instance. It exposes methods that can operate on this data type through VisualProtocol conformance. Use VisualRef only as an unowned reference to an existing GdkVisual instance.

A GdkVisual contains information about a particular visual.

  • ptr
    Untyped pointer to the underlying `GdkVisual` instance.
    

    For type-safe access, use the generated, typed pointer visual_ptr property instead.

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!

Visual Class

  • Designated initialiser from the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafeMutablePointer<GdkVisual>)
  • Designated initialiser from a constant pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafePointer<GdkVisual>)
  • Conditional initialiser from an optional pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafeMutablePointer<GdkVisual>?)
  • Conditional initialiser from an optional, non-mutable pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafePointer<GdkVisual>?)
  • Conditional initialiser from an optional gpointer

    Declaration

    Swift

    @inlinable
    init!(gpointer g: gpointer?)
  • Conditional initialiser from an optional, non-mutable gconstpointer

    Declaration

    Swift

    @inlinable
    init!(gconstpointer g: gconstpointer?)
  • Reference intialiser for a related type that implements VisualProtocol

    Declaration

    Swift

    @inlinable
    init<T>(_ other: T) where T : VisualProtocol
  • This factory is syntactic sugar for setting weak pointers wrapped in GWeak<T>

    Declaration

    Swift

    @inlinable
    static func unowned<T>(_ other: T) -> VisualRef where T : VisualProtocol
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to VisualProtocol.

    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 VisualProtocol.

    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 VisualProtocol.

    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 VisualProtocol.

    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 VisualProtocol.

    Declaration

    Swift

    @inlinable
    init(opaquePointer: OpaquePointer)
  • Get the visual with the most available colors for the default
    

    GDK screen. The return value should not be freed.

    get_best is deprecated: Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    static func getBest() -> VisualRef!
  • Combines gdk_visual_get_best_with_depth() and gdk_visual_get_best_with_type().

    get_best_with_both is deprecated: Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    static func getBestWith(both depth: Int, visualType: GdkVisualType) -> VisualRef!
  • Get the best visual with depth depth for the default GDK screen. Color visuals and visuals with mutable colormaps are preferred over grayscale or fixed-colormap visuals. The return value should not be freed. nil may be returned if no visual supports depth.

    get_best_with_depth is deprecated: Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    static func getBestWith(depth: Int) -> VisualRef!
  • Get the best visual of the given visual_type for the default GDK screen. Visuals with higher color depths are considered better. The return value should not be freed. nil may be returned if no visual has type visual_type.

    get_best_with_type is deprecated: Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    static func getBestWith(type visualType: GdkVisualType) -> VisualRef!
  • Get the system’s default visual for the default GDK screen. This is the visual for the root window of the display. The return value should not be freed.

    get_system is deprecated: Use gdk_screen_get_system_visual (gdk_screen_get_default ()).

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    static func getSystem() -> VisualRef!