Class BreakpointCondition

java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.adw.BreakpointCondition
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class BreakpointCondition extends ProxyInstance
Describes condition for an Breakpoint.
Since:
1.4
  • Constructor Details

    • BreakpointCondition

      public BreakpointCondition(MemorySegment address)
      Create a BreakpointCondition proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
  • Method Details

    • getType

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

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • and

      public static BreakpointCondition and(BreakpointCondition condition1, BreakpointCondition condition2)
      Creates a condition that triggers when condition1 and condition2 are both true.
      Parameters:
      condition1 - first condition
      condition2 - second condition
      Returns:
      the newly created condition
      Since:
      1.4
    • length

      public static BreakpointCondition length(BreakpointConditionLengthType type, double value, LengthUnit unit)
      Creates a condition that triggers on length changes.
      Parameters:
      type - the length type
      value - the length value
      unit - the length unit
      Returns:
      the newly created condition
      Since:
      1.4
    • or

      public static BreakpointCondition or(BreakpointCondition condition1, BreakpointCondition condition2)
      Creates a condition that triggers when either condition1 or condition2 is true.
      Parameters:
      condition1 - first condition
      condition2 - second condition
      Returns:
      the newly created condition
      Since:
      1.4
    • ratio

      public static BreakpointCondition ratio(BreakpointConditionRatioType type, int width, int height)

      Creates a condition that triggers on ratio changes.

      The ratio is represented as width divided by height.

      Parameters:
      type - the ratio type
      width - ratio width
      height - ratio height
      Returns:
      the newly created condition
      Since:
      1.4
    • parse

      public static BreakpointCondition parse(String str)

      Parses a condition from a string.

      Length conditions are specified as <type>: <value>[<unit>], where:

      • <type> can be min-width, max-width, min-height or max-height
      • <value> is a fractional number
      • <unit> can be px, pt or sp

      If the unit is omitted, px is assumed.

      See length(BreakpointConditionLengthType, double, LengthUnit).

      Examples:

      • min-width: 500px
      • min-height: 400pt
      • max-width: 100sp
      • max-height: 500

      Ratio conditions are specified as <type>: <width>[/<height>], where:

      • <type> can be min-aspect-ratio or max-aspect-ratio
      • <width> and <height> are integer numbers

      See ratio(BreakpointConditionRatioType, int, int).

      The ratio is represented as <width> divided by <height>.

      If <height> is omitted, it's assumed to be 1.

      Examples:

      • min-aspect-ratio: 4/3
      • max-aspect-ratio: 1

      The logical operators and, or can be used to compose a complex condition as follows:

      Examples:

      • min-width: 400px and max-aspect-ratio: 4/3
      • max-width: 360sp or max-width: 360px

      Conditions can be further nested using parentheses, for example:

      • min-width: 400px and (max-aspect-ratio: 4/3 or max-height: 400px)

      If parentheses are omitted, the first operator takes priority.

      Parameters:
      str - the string specifying the condition
      Returns:
      the parsed condition
      Since:
      1.4
    • copy

      public BreakpointCondition copy()
      Copies self.
      Returns:
      a copy of this BreakpointCondition
      Since:
      1.4
    • free

      public void free()
      Frees self.
      Since:
      1.4
    • toString

      public String toString()

      Returns a textual representation of self.

      The returned string can be parsed by parse(String).

      Overrides:
      toString in class Object
      Returns:
      A newly allocated text string
      Since:
      1.4