net.minecraft.client.window

public final class Window

implements AutoCloseable

com.mojang.blaze3d.platform.Window
net.minecraft.class_1041
net.minecraft.client.window.Window

Field summary

Modifier and TypeField
private static final org.slf4j.Logger
LOGGER
field_5178
LOGGER
public static final int
MIN_WINDOW_WIDTH
field_1_8785
MIN_WIDTH
public static final int
MIN_WINDOW_HEIGHT
field_1_8784
MIN_HEIGHT
public static final int
BASE_WIDTH
field_52250
FRAMEBUFFER_WIDTH_SCALE
public static final int
BASE_HEIGHT
field_52251
FRAMEBUFFER_HEIGHT_SCALE
private final WindowEventHandler
eventHandler
field_5176
eventHandler
private final MonitorTracker
monitorManager
field_5195
monitorTracker
private final long
handle
field_5187
handle
private int
windowedX
field_5175
windowedX
private int
windowedY
field_5185
windowedY
private int
windowedWidth
field_5174
windowedWidth
private int
windowedHeight
field_5184
windowedHeight
private Optional<VideoMode>
preferredFullscreenVideoMode
field_5193
fullscreenVideoMode
private boolean
fullscreenRequested
field_5191
fullscreen
private boolean
fullscreen
field_5177
currentFullscreen
private int
x
field_5183
x
private int
y
field_5198
y
private int
width
field_5182
width
private int
height
field_5197
height
private int
framebufferWidth
field_5181
framebufferWidth
private int
framebufferHeight
field_5196
framebufferHeight
private int
guiScaledWidth
field_5180
scaledWidth
private int
guiScaledHeight
field_5194
scaledHeight
private int
guiScale
field_5179
scaleFactor
private String
errorSection
field_5192
phase
private boolean
dirty
field_5186
fullscreenVideoModeDirty
private boolean
iconified
field_55579
minimized
private boolean
focused
field_1_2592
focused
private boolean
shouldClose
field_52735
terminated
private Runnable
closeCallback
field_1_8786
closeCallback
private boolean
allowCursorChanges
field_62447
allowCursorChanges
private boolean
quitShortcuts
field_1_9531
enableQuitShortcuts
private Cursor
currentCursor
field_62448
cursor
private boolean
exclusiveFullscreen
field_1_7137
exclusiveFullscreen

Constructor summary

ModifierConstructor
public (WindowEventHandler eventHandler, WindowSettings settings, String fullscreenVideoMode, boolean exclusiveFullscreen, String title, MonitorTracker monitorTracker, WindowBackend backend)

Method summary

Modifier and TypeMethod
public static String
getPlatform()
method_60793()
getPlatform()
private static org.lwjgl.sdl.SDL_Surface
createIconSurface(NativeImage image)
method_1_8440(class_1011 arg0)
createSdlSurfaceFrom(NativeImage image)
private long
createWindow(GpuBackend backend, int width, int height, String title)
method_1_2662(class_1_11 arg0, int arg1, int arg2, String arg3)
createHandle(WindowBackend windowBackend, int width, int height, String title)
public VideoMode
getActiveVideoMode()
method_1_8442()
getVideoMode()
private org.lwjgl.sdl.SDL_DisplayMode
getActiveDisplayMode()
method_1_8441()
getSdlDisplayMode()
public void
show()
method_1_10227()
show()
public boolean
shouldClose()
method_61946()
isTerminated()
public void
handleEvent(org.lwjgl.sdl.SDL_Event event)
method_1_8445(org.lwjgl.sdl.SDL_Event arg0)
onEvent(org.lwjgl.sdl.SDL_Event event)
private void
onDisplayModeChanged(int displayId)
method_1_9393(int arg0)
onCurrentModeChanged(int displayId)
private void
onQuitRequested()
method_1_9166()
onQuit()
private void
updateFullscreenState()
method_1_8448()
onFullscreenChanged()
private void
requestClose()
method_1_8450()
onTerminate()
public void
setIcon(PackMetadataResources resources, IconSet iconSet)
method_4491(class_1_1068 arg0, class_8518 arg1)
setIcon(ResourceResolver resourceResolver, Icons icons)
private void
setIcon(List<IoSupplier<InputStream>> iconStreams)
method_1_8453(List<class_7367<InputStream>> arg0)
setIcon(List<InputSupplier<InputStream>> icons)
private static org.lwjgl.sdl.SDL_Surface
createIconSurface(IoSupplier<InputStream> iconStream, List<NativeImage> images)
method_1_9762(class_7367<InputStream> arg0, List<class_1011> arg1)
readAsSdlSurface(InputSupplier<InputStream> icon, List<NativeImage> imagesToCloseOut)
public String
getErrorSection()
method_1_8443()
getPhase()
public void
setErrorSection(String string)
method_4474(String arg0)
setPhase(String phase)
public void
close()
private void
onMove(int x, int y)
method_4478(int arg0, int arg1)
onWindowPosChanged(int x, int y)
private void
onResize(int newWidth, int newHeight)
method_4488(int arg0, int arg1)
onWindowSizeChanged(int width, int height)
private void
onFramebufferResize(int newWidth, int newHeight)
method_4504(int arg0, int arg1)
onFramebufferSizeChanged(int width, int height)
private void
refreshFramebufferSize()
method_4483()
updateFramebufferSize()
public Window$Size
queryFramebufferSize()
method_1_8449()
getSize()
private void
onFocus(boolean focused)
method_4494(boolean arg0)
onWindowFocusChanged(boolean focused)
private void
onIconified(boolean iconified)
method_61945(boolean arg0)
onMinimizeChanged(boolean minimized)
public void
updateFullscreenIfChanged()
method_1_2666()
updateFullscreenIfNeeded()
public Optional<VideoMode>
getPreferredFullscreenVideoMode()
method_4511()
getFullscreenVideoMode()
public void
setPreferredFullscreenVideoMode(Optional<VideoMode> preferredFullscreenVideoMode)
method_4505(Optional<class_319> arg0)
setFullscreenVideoMode(Optional<VideoMode> fullscreenVideoMode)
public void
changeFullscreenVideoMode()
method_4475()
applyFullscreenVideoMode()
private void
setMode()
method_4479()
updateWindowRegion()
private void
updateWindowMouseGrab()
method_1_10228()
updateWindowMouseGrab()
private boolean
isWindowFullscreen()
method_1_8447()
isWindowFullscreen()
private boolean
isRuntimeExclusiveFullscreen()
method_1_8446()
isWindowExclusiveFullscreen()
private boolean
applyFullscreen()
method_1_8437()
setFullscreen()
private boolean
applyFullscreenMode()
method_1_9165()
setFullscreenMode()
private boolean
applyExclusiveFullscreen()
method_1_8438()
setExclusiveFullscreen()
private boolean
applyWindowed()
method_1_8439()
setWindowed()
private boolean
applyBorderlessFullscreen()
method_1_8436()
setBorderlessFullscreen()
public void
setExclusiveFullscreen(boolean exclusiveFullscreen)
method_1_8451(boolean arg0)
setExclusiveFullscreen(boolean exclusiveFullscreen)
public void
setWindowed(int width, int height)
method_36813(int arg0, int arg1)
setWindowedSize(int width, int height)
public int
calculateScale(int maxScale, boolean enforceUnicode)
method_4476(int arg0, boolean arg1)
calculateScaleFactor(int guiScale, boolean forceUnicodeFont)
public void
setTitle(String title)
method_24286(String arg0)
setTitle(String title)
public void
setWindowMaxSize(int width, int height)
method_1_8454(int arg0, int arg1)
setMaximumSize(int width, int height)
public long
handle()
method_4490()
getHandle()
public boolean
isFullscreen()
method_4498()
isFullscreen()
public void
setFullscreen(boolean fullscreen)
method_1_8452(boolean arg0)
setFullscreen(boolean fullscreen)
public boolean
isIconified()
method_65966()
isMinimized()
public boolean
isFocused()
method_1_3138()
isFocused()
public int
getWidth()
method_4489()
getFramebufferWidth()
public void
setWidth(int width)
method_35642(int arg0)
setFramebufferWidth(int framebufferWidth)
public int
getHeight()
method_4506()
getFramebufferHeight()
public void
setHeight(int height)
method_35643(int arg0)
setFramebufferHeight(int framebufferHeight)
public int
getScreenWidth()
method_4480()
getWidth()
public int
getScreenHeight()
method_4507()
getHeight()
public int
getGuiScaledWidth()
method_4486()
getScaledWidth()
public int
getGuiScaledHeight()
method_4502()
getScaledHeight()
public int
getX()
method_4499()
getX()
public int
getY()
method_4477()
getY()
public int
getGuiScale()
method_4495()
getScaleFactor()
public void
setGuiScale(int guiScale)
method_15997(int arg0)
setScaleFactor(int scaleFactor)
public float
getPixelDensity()
method_1_8444()
getPixelDensity()
public Monitor
findBestMonitor()
method_20831()
getMonitor()
public void
setWindowCloseCallback(Runnable task)
method_61943(Runnable arg0)
setCloseCallback(Runnable callback)
public void
setAllowCursorChanges(boolean value)
method_74030(boolean arg0)
setAllowCursorChanges(boolean allowCursorChanges)
public void
setQuitShortcuts(boolean value)
method_1_9167(boolean arg0)
setEnableQuitShortcuts(boolean enableQuitShortcuts)
public void
selectCursor(CursorType cursor)
method_74029(class_11875 arg0)
setCursor(Cursor cursor)
public float
getAppropriateLineWidth()
method_75291()
getMinimumLineWidth()
private static int
allowedWindowMinSize(int size, int minSize)
method_1_3099(int arg0, int arg1)
clampToAtLeast(int value, int minimum)