Package xyz.gmitch215.socketmc.retriever
Class Window
java.lang.Object
xyz.gmitch215.socketmc.retriever.Window
- All Implemented Interfaces:
 Serializable
Utility class to represent the client's window information.
- See Also:
 
- 
Constructor Summary
ConstructorsConstructorDescriptionWindow()Creates a new, empty window.Window(long id, boolean fullscreen, int x, int y, int width, int height, int screenWidth, int screenHeight, int guiScaledWidth, int guiScaledHeight, double guiScale, int framerateLimit, String platform, int refreshRate) Creates a new window with the specified parameters. - 
Method Summary
Modifier and TypeMethodDescriptionintGets the framerate limit of the window.doubleGets the GUI scale of the window.intGets the height of the window, scaled by the GUI.intGets the width of the window, scaled by the GUI.intGets the height of the window.longgetId()Gets the window ID.Gets the platform this window is currently using.intGets the refresh rate (in Hz) for the window.intGets the height of the screen.intGets the width of the screen.intgetWidth()Gets the width of the window.intgetX()Gets the x position of the window.intgetY()Gets the y position of the window.booleanGets whether the window is in fullscreen mode. 
- 
Constructor Details
- 
Window
public Window()Creates a new, empty window. - 
Window
public Window(long id, boolean fullscreen, int x, int y, int width, int height, int screenWidth, int screenHeight, int guiScaledWidth, int guiScaledHeight, double guiScale, int framerateLimit, String platform, int refreshRate) Creates a new window with the specified parameters.- Parameters:
 id- Window IDfullscreen- Fullscreen Modex- X Positiony- Y Positionwidth- Widthheight- HeightscreenWidth- Screen WidthscreenHeight- Screen HeightguiScaledWidth- GUI Scaled WidthguiScaledHeight- GUI Scaled HeightguiScale- GUI ScaleframerateLimit- Framerate Limitplatform- Window PlatformrefreshRate- Refresh Rate
 
 - 
 - 
Method Details
- 
getId
public long getId()Gets the window ID.- Returns:
 - Window ID
 
 - 
isFullscreen
public boolean isFullscreen()Gets whether the window is in fullscreen mode.- Returns:
 - True if the window is in fullscreen mode, false otherwise.
 
 - 
getX
public int getX()Gets the x position of the window.- Returns:
 - Window X Position
 
 - 
getY
public int getY()Gets the y position of the window.- Returns:
 - Window Y Position
 
 - 
getWidth
public int getWidth()Gets the width of the window.- Returns:
 - Window Width
 
 - 
getHeight
public int getHeight()Gets the height of the window.- Returns:
 - Window Height
 
 - 
getScreenWidth
public int getScreenWidth()Gets the width of the screen.- Returns:
 - Screen Width
 
 - 
getScreenHeight
public int getScreenHeight()Gets the height of the screen.- Returns:
 - Screen Height
 
 - 
getGuiScaledWidth
public int getGuiScaledWidth()Gets the width of the window, scaled by the GUI.- Returns:
 - GUI Scaled Width
 
 - 
getGuiScaledHeight
public int getGuiScaledHeight()Gets the height of the window, scaled by the GUI.- Returns:
 - GUI Scaled Height
 
 - 
getGuiScale
public double getGuiScale()Gets the GUI scale of the window.- Returns:
 - GUI Scale
 
 - 
getFramerateLimit
public int getFramerateLimit()Gets the framerate limit of the window.- Returns:
 - Framerate Limit
 
 - 
getPlatform
Gets the platform this window is currently using.
Some potential values are:
win32if on Windowscocoaif on macOSx11orwaylandif on Unixnullif inaccessible<error>if can't fetch the valueunknownif not using a generally known windows API
- Returns:
 - Window Platform
 
 - 
getRefreshRate
public int getRefreshRate()Gets the refresh rate (in Hz) for the window.- Returns:
 - Refresh Rate
 
 
 -