net.minecraft.client.window

public final class Window

implements AutoCloseable

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

Constructor summary

ModifierConstructor
public (WindowEventHandler eventHandler, WindowSettings settings, String fullscreenVideoMode, boolean exclusiveFullscreen, String title, MonitorTracker monitorTracker, WindowBackend backend)
public (WindowEventHandler eventHandler, WindowSettings displayData, String fullscreenVideoModeString, boolean exclusiveFullscreen, String title, MonitorTracker monitorManager, WindowBackend backend, int maximumSize)

Method summary

Modifier and TypeMethod
public static String
getPlatform()
getPlatform()
method_60793()
getPlatform()
private static org.lwjgl.sdl.SDL_Surface
createIconSurface(NativeImage image)
createIconSurface(NativeImage image)
method_1_8440(class_1011 arg0)
createSdlSurfaceFrom(NativeImage image)
private long
createWindow(GpuBackend backend, int width, int height, String title)
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()
getActiveVideoMode()
method_1_8442()
getVideoMode()
private org.lwjgl.sdl.SDL_DisplayMode
getActiveDisplayMode()
getActiveDisplayMode()
method_1_8441()
getSdlDisplayMode()
public boolean
shouldClose()
shouldClose()
method_61946()
isTerminated()
public void
handleEvent(org.lwjgl.sdl.SDL_Event event)
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)
onDisplayModeChanged(int displayId)
method_1_9393(int arg0)
onCurrentModeChanged(int displayId)
private void
onQuitRequested()
onQuitRequested()
method_1_9166()
onQuit()
private void
updateFullscreenState()
updateFullscreenState()
method_1_8448()
onFullscreenChanged()
private void
requestClose()
requestClose()
method_1_8450()
onTerminate()
public void
setIcon(PackMetadataResources resources, IconSet iconSet)
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)
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)
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()
getErrorSection()
method_1_8443()
getPhase()
public void
setErrorSection(String string)
setErrorSection(String string)
method_4474(String arg0)
setPhase(String phase)
public void
close()
close()
private void
onMove(int x, int y)
onMove(int x, int y)
method_4478(int arg0, int arg1)
onWindowPosChanged(int x, int y)
private void
onResize(int newWidth, int newHeight)
onResize(int newWidth, int newHeight)
method_4488(int arg0, int arg1)
onWindowSizeChanged(int width, int height)
private void
onFramebufferResize(int newWidth, int newHeight)
onFramebufferResize(int newWidth, int newHeight)
method_4504(int arg0, int arg1)
onFramebufferSizeChanged(int width, int height)
private void
refreshFramebufferSize()
refreshFramebufferSize()
method_4483()
updateFramebufferSize()
private int
framebufferWidthPadding()
framebufferWidthPadding()
method_1_10452()
getReservedWidth()
public Window$Size
queryFramebufferSize()
queryFramebufferSize()
method_1_8449()
getSize()
private void
onFocus(boolean focused)
onFocus(boolean focused)
method_4494(boolean arg0)
onWindowFocusChanged(boolean focused)
private void
onIconified(boolean iconified)
onIconified(boolean iconified)
method_61945(boolean arg0)
onMinimizeChanged(boolean minimized)
public void
updateFullscreenIfChanged()
updateFullscreenIfChanged()
method_1_2666()
updateFullscreenIfNeeded()
public Optional<VideoMode>
getPreferredFullscreenVideoMode()
getPreferredFullscreenVideoMode()
method_4511()
getFullscreenVideoMode()
public void
setPreferredFullscreenVideoMode(Optional<VideoMode> preferredFullscreenVideoMode)
setPreferredFullscreenVideoMode(Optional<VideoMode> preferredFullscreenVideoMode)
method_4505(Optional<class_319> arg0)
setFullscreenVideoMode(Optional<VideoMode> fullscreenVideoMode)
public void
changeFullscreenVideoMode()
changeFullscreenVideoMode()
method_4475()
applyFullscreenVideoMode()
private void
setMode()
setMode()
method_4479()
updateWindowRegion()
private void
updateWindowMouseGrab()
updateWindowMouseGrab()
method_1_10228()
updateWindowMouseGrab()
private boolean
isWindowFullscreen()
isWindowFullscreen()
method_1_8447()
isWindowFullscreen()
public boolean
isExclusiveFullscreen()
isExclusiveFullscreen()
method_1_8446()
isWindowExclusiveFullscreen()
private boolean
applyFullscreen()
applyFullscreen()
method_1_8437()
setFullscreen()
private boolean
useBorderlessFullscreenWindow()
useBorderlessFullscreenWindow()
method_1_10455()
isFullscreenBorderless()
private boolean
applySdlBorderlessFullscreen()
applySdlBorderlessFullscreen()
method_1_10451()
setBorderlessFullscreenSdl()
private void
leaveBorderlessFullscreenWindow()
leaveBorderlessFullscreenWindow()
method_1_10453()
setWindowBordered()
private boolean
applyFullscreenMode()
applyFullscreenMode()
method_1_9165()
setFullscreenMode()
private boolean
applyExclusiveFullscreen()
applyExclusiveFullscreen()
method_1_8438()
setExclusiveFullscreen()
private boolean
applyWindowed()
applyWindowed()
method_1_8439()
setWindowed()
private boolean
applyBorderlessFullscreenWindow()
applyBorderlessFullscreenWindow()
method_1_10450()
setBorderlessFullscreen()
private void
restoreWindow()
restoreWindow()
method_1_10485()
restoreWindow()
private void
syncWindow()
syncWindow()
method_1_10486()
syncWindow()
private boolean
setWindowSizeAndPosition(int windowX, int windowY, int windowWidth, int windowHeight)
setWindowSizeAndPosition(int windowX, int windowY, int windowWidth, int windowHeight)
method_1_10454(int arg0, int arg1, int arg2, int arg3)
setWindowGeometry(int x, int y, int width, int height)
private boolean
applyBorderlessFullscreen()
applyBorderlessFullscreen()
method_1_8436()
setBorderlessFullscreenMode()
public void
setExclusiveFullscreen(boolean exclusiveFullscreen)
setExclusiveFullscreen(boolean exclusiveFullscreen)
method_1_8451(boolean arg0)
setExclusiveFullscreen(boolean exclusiveFullscreen)
public void
setWindowed(int width, int height)
setWindowed(int width, int height)
method_36813(int arg0, int arg1)
setWindowedSize(int width, int height)
public int
calculateScale(int maxScale, boolean enforceUnicode)
calculateScale(int maxScale, boolean enforceUnicode)
method_4476(int arg0, boolean arg1)
calculateScaleFactor(int guiScale, boolean forceUnicodeFont)
public void
setTitle(String title)
setTitle(String title)
method_24286(String arg0)
setTitle(String title)
public void
setWindowMaxSize(int width, int height)
setWindowMaxSize(int width, int height)
method_1_8454(int arg0, int arg1)
setMaximumSize(int width, int height)
public long
handle()
handle()
method_4490()
getHandle()
public void
setFullscreen(boolean fullscreen)
setFullscreen(boolean fullscreen)
method_1_8452(boolean arg0)
setFullscreen(boolean fullscreen)
public boolean
isIconified()
isIconified()
method_65966()
isMinimized()
public boolean
isFocused()
isFocused()
method_1_3138()
isFocused()
public int
getWidth()
getWidth()
method_4489()
getFramebufferWidth()
public void
setWidth(int width)
setWidth(int width)
method_35642(int arg0)
setFramebufferWidth(int framebufferWidth)
public int
getHeight()
getHeight()
method_4506()
getFramebufferHeight()
public void
setHeight(int height)
setHeight(int height)
method_35643(int arg0)
setFramebufferHeight(int framebufferHeight)
public int
getScreenWidth()
getScreenWidth()
method_4480()
getWidth()
public int
getScreenHeight()
getScreenHeight()
method_4507()
getHeight()
public int
getGuiScaledWidth()
getGuiScaledWidth()
method_4486()
getScaledWidth()
public int
getGuiScaledHeight()
getGuiScaledHeight()
method_4502()
getScaledHeight()
public int
getX()
getX()
method_4499()
getX()
public int
getY()
getY()
method_4477()
getY()
public int
getGuiScale()
getGuiScale()
method_4495()
getScaleFactor()
public void
setGuiScale(int guiScale)
setGuiScale(int guiScale)
method_15997(int arg0)
setScaleFactor(int scaleFactor)
public float
getPixelDensity()
getPixelDensity()
method_1_8444()
getPixelDensity()
public Monitor
findBestMonitor()
findBestMonitor()
method_20831()
getMonitor()
public void
setWindowCloseCallback(Runnable task)
setWindowCloseCallback(Runnable task)
method_61943(Runnable arg0)
setCloseCallback(Runnable callback)
public void
setAllowCursorChanges(boolean value)
setAllowCursorChanges(boolean value)
method_74030(boolean arg0)
setAllowCursorChanges(boolean allowCursorChanges)
public void
setQuitShortcuts(boolean value)
setQuitShortcuts(boolean value)
method_1_9167(boolean arg0)
setEnableQuitShortcuts(boolean enableQuitShortcuts)
public void
selectCursor(CursorType cursor)
selectCursor(CursorType cursor)
method_74029(class_11875 arg0)
setCursor(Cursor cursor)
public float
getAppropriateLineWidth()
getAppropriateLineWidth()
method_75291()
getMinimumLineWidth()
private static int
allowedWindowMinSize(int size, int minSize)
allowedWindowMinSize(int size, int minSize)
method_1_3099(int arg0, int arg1)
clampToAtLeast(int value, int minimum)