WindowControlsRef

public struct WindowControlsRef : WindowControlsProtocol, GWeakCapturing

GtkWindowControls shows window frame controls.

Typical window frame controls are minimize, maximize and close buttons, and the window icon.

An example GtkWindowControls

GtkWindowControls only displays start or end side of the controls (see [propertyGtk.WindowControls:side]), so it’s intended to be always used in pair with another GtkWindowControls for the opposite side, for example:

<object class="GtkBox">
  <child>
    <object class="GtkWindowControls">
      <property name="side">start</property>
    </object>
  </child>

  ...

  <child>
    <object class="GtkWindowControls">
      <property name="side">end</property>
    </object>
  </child>
</object>

CSS nodes

windowcontrols
├── [image.icon]
├── [button.minimize]
├── [button.maximize]
╰── [button.close]

A GtkWindowControls‘ CSS node is called windowcontrols. It contains subnodes corresponding to each title button. Which of the title buttons exist and where they are placed exactly depends on the desktop environment and [propertyGtk.WindowControls:decoration-layout] value.

When [propertyGtk.WindowControls:empty] is true, it gets the .empty style class.

Accessibility

GtkWindowControls uses the GTK_ACCESSIBLE_ROLE_GROUP role.

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

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

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

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!

WindowControls Class

  • Designated initialiser from the underlying C data type

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafePointer<GtkWindowControls>?)
  • 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 WindowControlsProtocol

    Declaration

    Swift

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

    Declaration

    Swift

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

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

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

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

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

    Declaration

    Swift

    @inlinable
    init(opaquePointer: OpaquePointer)
  • Creates a new GtkWindowControls.

    Declaration

    Swift

    @inlinable
    init(side: GtkPackType)