APIdia Launch Partner
Top Description Methods
com.badlogic.gdx.backends.lwjgl3

public Interface Lwjgl3WindowListener

Known Direct Implementers
com.badlogic.gdx.backends.lwjgl3.Lwjgl3WindowAdapter
Imports
com.badlogic.gdx.ApplicationListener

Receives notifications of various window events, such as iconification, focus loss and gain, and window close events. Can be set per window via Lwjgl3ApplicationConfiguration and Lwjgl3WindowConfiguration. Close events can be canceled by returning false.
Author
badlogic

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

whether the window should actually close
closeRequested
()

Called when the user requested to close the window, e.g. clicking the close button or pressing the window closing keyboard shortcut.

public void
created(Lwjgl3Window
the window instance
window
)

Called after the GLFW window is created.

public void
filesDropped(String[]
array with absolute paths to the files
files
)

Called when external files are dropped into the window, e.g from the Desktop.

public void
focusGained()

Called when the window gained focus.

public void
focusLost()

Called when the window lost focus to another window.

public void
iconified(boolean
True if window is iconified, false if it leaves the iconified state
isIconified
)

Called when the window is iconified (i.e. its minimize button was clicked), or when restored from the iconified state.

public void
maximized(boolean
true if window is maximized, false if it leaves the maximized state
isMaximized
)

Called when the window is maximized, or restored from the maximized state.

public void
refreshRequested()

Called when the window content is damaged and needs to be refreshed.

Method Detail

closeRequestedback to summary
public boolean closeRequested()

Called when the user requested to close the window, e.g. clicking the close button or pressing the window closing keyboard shortcut.

Returns:boolean

whether the window should actually close

createdback to summary
public void created(Lwjgl3Window window)

Called after the GLFW window is created. Before this callback is received, it's unsafe to use any Lwjgl3Window member functions which, for their part, involve calling GLFW functions. For the main window, this is an immediate callback from inside Lwjgl3Application#Lwjgl3Application(ApplicationListener, Lwjgl3ApplicationConfiguration).

Parameters
window:Lwjgl3Window

the window instance

See Also
Lwjgl3Application#newWindow(ApplicationListener, Lwjgl3WindowConfiguration)
filesDroppedback to summary
public void filesDropped(String[] files)

Called when external files are dropped into the window, e.g from the Desktop.

Parameters
files:String[]

array with absolute paths to the files

focusGainedback to summary
public void focusGained()

Called when the window gained focus.

focusLostback to summary
public void focusLost()

Called when the window lost focus to another window. The window's ApplicationListener will continue to be called.

iconifiedback to summary
public void iconified(boolean isIconified)

Called when the window is iconified (i.e. its minimize button was clicked), or when restored from the iconified state. When a window becomes iconified, its ApplicationListener will be paused, and when restored it will be resumed.

Parameters
isIconified:boolean

True if window is iconified, false if it leaves the iconified state

maximizedback to summary
public void maximized(boolean isMaximized)

Called when the window is maximized, or restored from the maximized state.

Parameters
isMaximized:boolean

true if window is maximized, false if it leaves the maximized state

refreshRequestedback to summary
public void refreshRequested()

Called when the window content is damaged and needs to be refreshed. When this occurs, Lwjgl3Graphics#requestRendering() is automatically called.