Class Window

java.lang.Object
net.minecraft.client.util.Window
All Implemented Interfaces:
AutoCloseable

@Environment(CLIENT)
public final class Window
extends Object
implements AutoCloseable
  • Field Details

    • LOGGER

      private static final Logger LOGGER
    • errorCallback

      private final GLFWErrorCallback errorCallback
    • eventHandler

      private final WindowEventHandler eventHandler
    • monitorTracker

      private final MonitorTracker monitorTracker
    • handle

      private final long handle
    • windowedX

      private int windowedX
    • windowedY

      private int windowedY
    • windowedWidth

      private int windowedWidth
    • windowedHeight

      private int windowedHeight
    • videoMode

      private Optional<VideoMode> videoMode
    • fullscreen

      private boolean fullscreen
    • currentFullscreen

      private boolean currentFullscreen
    • x

      private int x
    • y

      private int y
    • width

      private int width
    • height

      private int height
    • framebufferWidth

      private int framebufferWidth
    • framebufferHeight

      private int framebufferHeight
    • scaledWidth

      private int scaledWidth
    • scaledHeight

      private int scaledHeight
    • scaleFactor

      private double scaleFactor
    • phase

      private String phase
    • videoModeDirty

      private boolean videoModeDirty
    • framerateLimit

      private int framerateLimit
    • vsync

      private boolean vsync
  • Constructor Details

  • Method Details

    • getRefreshRate

      public int getRefreshRate()
    • shouldClose

      public boolean shouldClose()
    • acceptError

      public static void acceptError​(BiConsumer<Integer,​String> consumer)
    • setIcon

      public void setIcon​(InputStream icon16, InputStream icon32)
    • readImage

      @Nullable private ByteBuffer readImage​(InputStream in, IntBuffer x, IntBuffer y, IntBuffer channels) throws IOException
      Throws:
      IOException
    • setPhase

      public void setPhase​(String phase)
    • throwOnGlError

      private void throwOnGlError()
    • throwGlError

      private static void throwGlError​(int error, long description)
    • logGlError

      public void logGlError​(int error, long description)
    • logOnGlError

      public void logOnGlError()
    • setVsync

      public void setVsync​(boolean vsync)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • onWindowPosChanged

      private void onWindowPosChanged​(long window, int x, int y)
    • onFramebufferSizeChanged

      private void onFramebufferSizeChanged​(long window, int width, int height)
    • updateFramebufferSize

      private void updateFramebufferSize()
    • onWindowSizeChanged

      private void onWindowSizeChanged​(long window, int width, int height)
    • onWindowFocusChanged

      private void onWindowFocusChanged​(long window, boolean focused)
    • onCursorEnterChanged

      private void onCursorEnterChanged​(long window, boolean entered)
    • setFramerateLimit

      public void setFramerateLimit​(int framerateLimit)
    • getFramerateLimit

      public int getFramerateLimit()
    • swapBuffers

      public void swapBuffers()
    • getVideoMode

      public Optional<VideoMode> getVideoMode()
    • setVideoMode

      public void setVideoMode​(Optional<VideoMode> videoMode)
    • applyVideoMode

      public void applyVideoMode()
    • updateWindowRegion

      private void updateWindowRegion()
    • toggleFullscreen

      public void toggleFullscreen()
    • updateFullscreen

      private void updateFullscreen​(boolean vsync)
    • calculateScaleFactor

      public int calculateScaleFactor​(int guiScale, boolean forceUnicodeFont)
    • setScaleFactor

      public void setScaleFactor​(double scaleFactor)
    • setTitle

      public void setTitle​(String title)
    • getHandle

      public long getHandle()
    • isFullscreen

      public boolean isFullscreen()
    • getFramebufferWidth

      public int getFramebufferWidth()
    • getFramebufferHeight

      public int getFramebufferHeight()
    • getWidth

      public int getWidth()
    • getHeight

      public int getHeight()
    • getScaledWidth

      public int getScaledWidth()
    • getScaledHeight

      public int getScaledHeight()
    • getX

      public int getX()
    • getY

      public int getY()
    • getScaleFactor

      public double getScaleFactor()
    • getMonitor

      @Nullable public Monitor getMonitor()
    • setRawMouseMotion

      public void setRawMouseMotion​(boolean rawMouseMotion)