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 shownminimized- whether it is minimized; alwaysfalseunder Wayland, where a window is not toldmaximized- whether it is maximizedfullscreen- whether it is in fullscreenbounds- its content's place and size in native screen coordinates, the onesNativeWindow.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 Summary
ConstructorsConstructorDescriptionWindowState(boolean visible, boolean minimized, boolean maximized, boolean fullscreen, ScreenRect bounds) Checks the bounds. -
Method Summary
Modifier and TypeMethodDescriptionbounds()Returns the value of theboundsrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefullscreenrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of themaximizedrecord component.booleanReturns the value of theminimizedrecord component.final StringtoString()Returns a string representation of this record class.booleanvisible()Returns the value of thevisiblerecord component.
-
Constructor Details
-
WindowState
public WindowState(boolean visible, boolean minimized, boolean maximized, boolean fullscreen, ScreenRect bounds) Checks the bounds.
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
visible
public boolean visible()Returns the value of thevisiblerecord component.- Returns:
- the value of the
visiblerecord component
-
minimized
public boolean minimized()Returns the value of theminimizedrecord component.- Returns:
- the value of the
minimizedrecord component
-
maximized
public boolean maximized()Returns the value of themaximizedrecord component.- Returns:
- the value of the
maximizedrecord component
-
fullscreen
public boolean fullscreen()Returns the value of thefullscreenrecord component.- Returns:
- the value of the
fullscreenrecord component
-
bounds
Returns the value of theboundsrecord component.- Returns:
- the value of the
boundsrecord component
-