AnchorHints

public struct AnchorHints : OptionSet

Positioning hints for aligning a window relative to a rectangle.

These hints determine how the window should be positioned in the case that the window would fall off-screen if placed in its ideal position.

For example, GDK_ANCHOR_FLIP_X will replace GDK_GRAVITY_NORTH_WEST with GDK_GRAVITY_NORTH_EAST and vice versa if the window extends beyond the left or right edges of the monitor.

If GDK_ANCHOR_SLIDE_X is set, the window can be shifted horizontally to fit on-screen. If GDK_ANCHOR_RESIZE_X is set, the window can be shrunken horizontally to fit.

In general, when multiple flags are set, flipping should take precedence over sliding, which should take precedence over resizing.

  • The corresponding value of the raw type

    Declaration

    Swift

    public var rawValue: UInt32
  • The equivalent raw Int value

    Declaration

    Swift

    @inlinable
    public var intValue: Int { get set }
  • int

    The equivalent raw gint value

    Declaration

    Swift

    @inlinable
    public var int: gint { get set }
  • The equivalent underlying GdkAnchorHints enum value

    Declaration

    Swift

    @inlinable
    public var value: GdkAnchorHints { get set }
  • Creates a new instance with the specified raw value

    Declaration

    Swift

    @inlinable
    public init(rawValue: UInt32)
  • Creates a new instance with the specified GdkAnchorHints enum value

    Declaration

    Swift

    @inlinable
    public init(_ enumValue: GdkAnchorHints)
  • Creates a new instance with the specified Int value

    Declaration

    Swift

    @inlinable
    public init<I>(_ intValue: I) where I : BinaryInteger
  • allow flipping anchors horizontally

    Declaration

    Swift

    public static let flipX: AnchorHints
  • allow flipping anchors vertically

    Declaration

    Swift

    public static let flipY: AnchorHints
  • allow sliding window horizontally

    Declaration

    Swift

    public static let slideX: AnchorHints
  • allow sliding window vertically

    Declaration

    Swift

    public static let slideY: AnchorHints
  • allow resizing window horizontally

    Declaration

    Swift

    public static let resizeX: AnchorHints
  • allow resizing window vertically

    Declaration

    Swift

    public static let resizeY: AnchorHints
  • allow flipping anchors on both axes

    Declaration

    Swift

    public static let flip: AnchorHints
  • allow sliding window on both axes

    Declaration

    Swift

    public static let slide: AnchorHints
  • allow resizing window on both axes

    Declaration

    Swift

    public static let resize: AnchorHints