Package limn.backend

Record Class WindowState

java.lang.Object
java.lang.Record
limn.backend.WindowState
Record Components:
visible - whether the window is shown, as opposed to hidden; a minimized window is still shown
minimized - whether it is minimized; always false under Wayland, where a window is not told
maximized - whether it is maximized
fullscreen - whether it is in fullscreen
bounds - its content's place and size in native screen coordinates, the ones NativeWindow.setScreenPosition(int, int) takes; under Wayland a window is not told its place, and the place is the origin

public record WindowState(boolean visible, boolean minimized, boolean maximized, boolean fullscreen, ScreenRect bounds) extends Record
Where a window is, how large and in which state, as one value: what NativeWindow.state() answers and what NativeWindow.observeState(java.util.function.Consumer<limn.backend.WindowState>) hands a listener each time any part of it changes.
  • Constructor Details

    • WindowState

      public WindowState(boolean visible, boolean minimized, boolean maximized, boolean fullscreen, ScreenRect bounds)
      Checks the bounds.
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • visible

      public boolean visible()
      Returns the value of the visible record component.
      Returns:
      the value of the visible record component
    • minimized

      public boolean minimized()
      Returns the value of the minimized record component.
      Returns:
      the value of the minimized record component
    • maximized

      public boolean maximized()
      Returns the value of the maximized record component.
      Returns:
      the value of the maximized record component
    • fullscreen

      public boolean fullscreen()
      Returns the value of the fullscreen record component.
      Returns:
      the value of the fullscreen record component
    • bounds

      public ScreenRect bounds()
      Returns the value of the bounds record component.
      Returns:
      the value of the bounds record component