APIdia Launch Partner
Top Fields Constructors Methods
com.badlogic.gdx.backends.lwjgl3

public Class Lwjgl3WindowConfiguration

extends Object
Class Inheritance
Known Direct Subclasses
com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration
Imports
java.util.Arrays, com.badlogic.gdx.Files.FileType, .Graphics, .Graphics.DisplayMode, com.badlogic.gdx.backends.lwjgl3.Lwjgl3Graphics.Lwjgl3DisplayMode, com.badlogic.gdx.graphics.Color

Field Summary

Modifier and TypeField and Description
pack-priv boolean
pack-priv Lwjgl3Graphics.Lwjgl3DisplayMode
pack-priv Color
pack-priv boolean
pack-priv Lwjgl3Graphics.Lwjgl3Monitor
pack-priv String
pack-priv boolean
pack-priv boolean
pack-priv int
pack-priv Files.FileType
pack-priv String[]
pack-priv Lwjgl3WindowListener
pack-priv int
pack-priv boolean
pack-priv int
pack-priv int
pack-priv int
pack-priv boolean
pack-priv int
pack-priv int
pack-priv int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
setAutoIconify(boolean
whether the window should automatically iconify and restore previous video mode on input focus loss. (default true) Does nothing in windowed mode.
autoIconify
)

public void
setDecorated(boolean
whether the windowed mode window is decorated, i.e. displaying the title bars (default true)
decorated
)

public void
setFullscreenMode(Graphics.DisplayMode mode)

Sets the app to use fullscreen mode.

public void
setInitialBackgroundColor(Color color)

Sets the initial background color.

public void
setInitialVisible(boolean
whether the window will be visible on creation. (default true)
visibility
)

public void
setMaximized(boolean
whether the window starts maximized. Ignored if the window is full screen. (default false)
maximized
)

public void
setMaximizedMonitor(Graphics.Monitor
what monitor the window should maximize to
monitor
)

public void
setResizable(boolean
whether the windowed mode window is resizable (default true)
resizable
)

public void
setTitle(String title)

Sets the window title.

pack-priv void
public void
setWindowedMode(int
the width of the window (default 640)
width
,
int
the height of the window (default 480)
height
)

Sets the app to use windowed mode.

public void
setWindowIcon(String...
One or more internal image paths. Must be JPEG, PNG, or BMP format. The one closest to the system's desired size will be scaled. Good sizes include 16x16, 32x32 and 48x48.
filePaths
)

Sets the icon that will be used in the window's title bar.

public void
setWindowIcon(Files.FileType
The type of file handle the paths are relative to.
fileType
,
String...
One or more image paths, relative to the given FileType. Must be JPEG, PNG, or BMP format. The one closest to the system's desired size will be scaled. Good sizes include 16x16, 32x32 and 48x48.
filePaths
)

Sets the icon that will be used in the window's title bar.

public void
setWindowListener(Lwjgl3WindowListener windowListener)

Sets the Lwjgl3WindowListener which will be informed about iconficiation, focus loss and window close events.

public void
setWindowPosition(int x, int y)

Sets the position of the window in windowed mode.

public void
setWindowSizeLimits(int minWidth, int minHeight, int maxWidth, int maxHeight)

Sets minimum and maximum size limits for the window.

public void
useVsync(boolean vsync)

Sets whether to use vsync.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

autoIconifyback to summary
pack-priv boolean autoIconify
fullscreenModeback to summary
pack-priv Lwjgl3Graphics.Lwjgl3DisplayMode fullscreenMode
initialBackgroundColorback to summary
pack-priv Color initialBackgroundColor
initialVisibleback to summary
pack-priv boolean initialVisible
maximizedMonitorback to summary
pack-priv Lwjgl3Graphics.Lwjgl3Monitor maximizedMonitor
titleback to summary
pack-priv String title
vSyncEnabledback to summary
pack-priv boolean vSyncEnabled
windowDecoratedback to summary
pack-priv boolean windowDecorated
windowHeightback to summary
pack-priv int windowHeight
windowIconFileTypeback to summary
pack-priv Files.FileType windowIconFileType
windowIconPathsback to summary
pack-priv String[] windowIconPaths
windowListenerback to summary
pack-priv Lwjgl3WindowListener windowListener
windowMaxHeightback to summary
pack-priv int windowMaxHeight
windowMaximizedback to summary
pack-priv boolean windowMaximized
windowMaxWidthback to summary
pack-priv int windowMaxWidth
windowMinHeightback to summary
pack-priv int windowMinHeight
windowMinWidthback to summary
pack-priv int windowMinWidth
windowResizableback to summary
pack-priv boolean windowResizable
windowWidthback to summary
pack-priv int windowWidth
windowXback to summary
pack-priv int windowX
windowYback to summary
pack-priv int windowY

Constructor Detail

Lwjgl3WindowConfigurationback to summary
public Lwjgl3WindowConfiguration()

Method Detail

setAutoIconifyback to summary
public void setAutoIconify(boolean autoIconify)
Parameters
autoIconify:boolean

whether the window should automatically iconify and restore previous video mode on input focus loss. (default true) Does nothing in windowed mode.

setDecoratedback to summary
public void setDecorated(boolean decorated)
Parameters
decorated:boolean

whether the windowed mode window is decorated, i.e. displaying the title bars (default true)

setFullscreenModeback to summary
public void setFullscreenMode(Graphics.DisplayMode mode)

Sets the app to use fullscreen mode. Use the static methods like Lwjgl3ApplicationConfiguration#getDisplayMode() on this class to enumerate connected monitors and their fullscreen display modes.

setInitialBackgroundColorback to summary
public void setInitialBackgroundColor(Color color)

Sets the initial background color. Defaults to black.

setInitialVisibleback to summary
public void setInitialVisible(boolean visibility)
Parameters
visibility:boolean

whether the window will be visible on creation. (default true)

setMaximizedback to summary
public void setMaximized(boolean maximized)
Parameters
maximized:boolean

whether the window starts maximized. Ignored if the window is full screen. (default false)

setMaximizedMonitorback to summary
public void setMaximizedMonitor(Graphics.Monitor monitor)
Parameters
monitor:Graphics.Monitor

what monitor the window should maximize to

setResizableback to summary
public void setResizable(boolean resizable)
Parameters
resizable:boolean

whether the windowed mode window is resizable (default true)

setTitleback to summary
public void setTitle(String title)

Sets the window title. If null, the application listener's class name is used.

setWindowConfigurationback to summary
pack-priv void setWindowConfiguration(Lwjgl3WindowConfiguration config)
setWindowedModeback to summary
public void setWindowedMode(int width, int height)

Sets the app to use windowed mode.

Parameters
width:int

the width of the window (default 640)

height:int

the height of the window (default 480)

setWindowIconback to summary
public void setWindowIcon(String... filePaths)

Sets the icon that will be used in the window's title bar. Has no effect in macOS, which doesn't use window icons.

Parameters
filePaths:String[]

One or more internal image paths. Must be JPEG, PNG, or BMP format. The one closest to the system's desired size will be scaled. Good sizes include 16x16, 32x32 and 48x48.

setWindowIconback to summary
public void setWindowIcon(Files.FileType fileType, String... filePaths)

Sets the icon that will be used in the window's title bar. Has no effect in macOS, which doesn't use window icons.

Parameters
fileType:Files.FileType

The type of file handle the paths are relative to.

filePaths:String[]

One or more image paths, relative to the given FileType. Must be JPEG, PNG, or BMP format. The one closest to the system's desired size will be scaled. Good sizes include 16x16, 32x32 and 48x48.

setWindowListenerback to summary
public void setWindowListener(Lwjgl3WindowListener windowListener)

Sets the Lwjgl3WindowListener which will be informed about iconficiation, focus loss and window close events.

setWindowPositionback to summary
public void setWindowPosition(int x, int y)

Sets the position of the window in windowed mode. Default -1 for both coordinates for centered on primary monitor.

setWindowSizeLimitsback to summary
public void setWindowSizeLimits(int minWidth, int minHeight, int maxWidth, int maxHeight)

Sets minimum and maximum size limits for the window. If the window is full screen or not resizable, these limits are ignored. The default for all four parameters is -1, which means unrestricted.

useVsyncback to summary
public void useVsync(boolean vsync)

Sets whether to use vsync. This setting can be changed anytime at runtime via Graphics#setVSync(boolean). For multi-window applications, only one (the main) window should enable vsync. Otherwise, every window will wait for the vertical blank on swap individually, effectively cutting the frame rate to (refreshRate / numberOfWindows).