Enum Class AnchorHints

java.lang.Object
java.lang.Enum<AnchorHints>
org.gnome.gdk.AnchorHints
All Implemented Interfaces:
Serializable, Comparable<AnchorHints>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum AnchorHints extends Enum<AnchorHints> implements Enumeration

Positioning hints for aligning a surface relative to a rectangle.

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

For example, FLIP_X will replace Gravity.NORTH_WEST with Gravity.NORTH_EAST and vice versa if the surface extends beyond the left or right edges of the monitor.

If SLIDE_X is set, the surface can be shifted horizontally to fit on-screen. If RESIZE_X is set, the surface 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.

  • Enum Constant Details

    • FLIP_X

      public static final AnchorHints FLIP_X
      allow flipping anchors horizontally
    • FLIP_Y

      public static final AnchorHints FLIP_Y
      allow flipping anchors vertically
    • SLIDE_X

      public static final AnchorHints SLIDE_X
      allow sliding surface horizontally
    • SLIDE_Y

      public static final AnchorHints SLIDE_Y
      allow sliding surface vertically
    • RESIZE_X

      public static final AnchorHints RESIZE_X
      allow resizing surface horizontally
    • RESIZE_Y

      public static final AnchorHints RESIZE_Y
      allow resizing surface vertically
    • FLIP

      public static final AnchorHints FLIP
      allow flipping anchors on both axes
    • SLIDE

      public static final AnchorHints SLIDE
      allow sliding surface on both axes
    • RESIZE

      public static final AnchorHints RESIZE
      allow resizing surface on both axes
  • Method Details

    • values

      public static AnchorHints[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AnchorHints valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static Set<AnchorHints> of(int flags)
      Create a new EnumSet<AnchorHints> for the provided bitfield
      Parameters:
      flags - the AnchorHints bitfield
      Returns:
      the EnumSet for the provided bitfield
    • of

      public static Set<AnchorHints> of(MemorySegment address)
      Create a new EnumSet<AnchorHints> for the bitfield in the provided memory address.
      Parameters:
      address - the memory address holding a bitfield value
      Returns:
      the EnumSet for the bitfield in the provided memory address
    • getType

      public static @Nullable Type getType()
      Get the GType of the AnchorHints class.
      Returns:
      the GType