Class MainWindow

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public final class MainWindow
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Field Detail

      • LOGGER

        private static final org.apache.logging.log4j.Logger LOGGER
      • defaultErrorCallback

        private final org.lwjgl.glfw.GLFWErrorCallback defaultErrorCallback
      • window

        private final long window
      • windowedX

        private int windowedX
      • windowedY

        private int windowedY
      • windowedWidth

        private int windowedWidth
      • windowedHeight

        private int windowedHeight
      • preferredFullscreenVideoMode

        private java.util.Optional<VideoMode> preferredFullscreenVideoMode
      • fullscreen

        private boolean fullscreen
      • actuallyFullscreen

        private boolean actuallyFullscreen
      • x

        private int x
      • y

        private int y
      • width

        private int width
      • height

        private int height
      • framebufferWidth

        private int framebufferWidth
      • framebufferHeight

        private int framebufferHeight
      • guiScaledWidth

        private int guiScaledWidth
      • guiScaledHeight

        private int guiScaledHeight
      • guiScale

        private double guiScale
      • errorSection

        private java.lang.String errorSection
      • dirty

        private boolean dirty
      • framerateLimit

        private int framerateLimit
      • vsync

        private boolean vsync
    • Method Detail

      • getRefreshRate

        public int getRefreshRate()
      • shouldClose

        public boolean shouldClose()
      • checkGlfwError

        public static void checkGlfwError​(java.util.function.BiConsumer<java.lang.Integer,​java.lang.String> p_211162_0_)
      • setIcon

        public void setIcon​(java.io.InputStream p_216529_1_,
                            java.io.InputStream p_216529_2_)
      • readIconPixels

        @Nullable
        private java.nio.ByteBuffer readIconPixels​(java.io.InputStream p_198111_1_,
                                                   java.nio.IntBuffer p_198111_2_,
                                                   java.nio.IntBuffer p_198111_3_,
                                                   java.nio.IntBuffer p_198111_4_)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • setErrorSection

        public void setErrorSection​(java.lang.String p_227799_1_)
      • setBootErrorCallback

        private void setBootErrorCallback()
      • bootCrash

        private static void bootCrash​(int p_208034_0_,
                                      long p_208034_1_)
      • defaultErrorCallback

        public void defaultErrorCallback​(int p_198084_1_,
                                         long p_198084_2_)
      • setDefaultErrorCallback

        public void setDefaultErrorCallback()
      • updateVsync

        public void updateVsync​(boolean p_216523_1_)
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • onMove

        private void onMove​(long p_198080_1_,
                            int p_198080_3_,
                            int p_198080_4_)
      • onFramebufferResize

        private void onFramebufferResize​(long p_198102_1_,
                                         int p_198102_3_,
                                         int p_198102_4_)
      • refreshFramebufferSize

        private void refreshFramebufferSize()
      • onResize

        private void onResize​(long p_198089_1_,
                              int p_198089_3_,
                              int p_198089_4_)
      • onFocus

        private void onFocus​(long p_198095_1_,
                             boolean p_198095_3_)
      • onEnter

        private void onEnter​(long p_241553_1_,
                             boolean p_241553_3_)
      • setFramerateLimit

        public void setFramerateLimit​(int p_216526_1_)
      • getFramerateLimit

        public int getFramerateLimit()
      • updateDisplay

        public void updateDisplay()
      • getPreferredFullscreenVideoMode

        public java.util.Optional<VideoMode> getPreferredFullscreenVideoMode()
      • setPreferredFullscreenVideoMode

        public void setPreferredFullscreenVideoMode​(java.util.Optional<VideoMode> p_224797_1_)
      • changeFullscreenVideoMode

        public void changeFullscreenVideoMode()
      • setMode

        private void setMode()
      • toggleFullScreen

        public void toggleFullScreen()
      • updateFullscreen

        private void updateFullscreen​(boolean p_216527_1_)
      • calculateScale

        public int calculateScale​(int p_216521_1_,
                                  boolean p_216521_2_)
      • setGuiScale

        public void setGuiScale​(double p_216525_1_)
      • setTitle

        public void setTitle​(java.lang.String p_230148_1_)
      • getWindow

        public long getWindow()
      • isFullscreen

        public boolean isFullscreen()
      • getWidth

        public int getWidth()
      • getHeight

        public int getHeight()
      • getScreenWidth

        public int getScreenWidth()
      • getScreenHeight

        public int getScreenHeight()
      • getGuiScaledWidth

        public int getGuiScaledWidth()
      • getGuiScaledHeight

        public int getGuiScaledHeight()
      • getX

        public int getX()
      • getY

        public int getY()
      • getGuiScale

        public double getGuiScale()
      • findBestMonitor

        @Nullable
        public Monitor findBestMonitor()
      • updateRawMouseInput

        public void updateRawMouseInput​(boolean p_224798_1_)