Package com.badlogic.gdx.backends.lwjgl3
Interface Lwjgl3WindowListener
-
- All Known Implementing Classes:
Lwjgl3WindowAdapter
public interface Lwjgl3WindowListenerReceives notifications of various window events, such as iconification, focus loss and gain, and window close events. Can be set per window viaLwjgl3ApplicationConfigurationandLwjgl3WindowConfiguration. Close events can be canceled by returning false.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancloseRequested()Called when the user requested to close the window, e.g.voidcreated(Lwjgl3Window window)Called after the GLFW window is created.voidfilesDropped(java.lang.String[] files)Called when external files are dropped into the window, e.g from the Desktop.voidfocusGained()Called when the window gained focus.voidfocusLost()Called when the window lost focus to another window.voidiconified(boolean isIconified)Called when the window is iconified (i.e.voidmaximized(boolean isMaximized)Called when the window is maximized, or restored from the maximized state.voidrefreshRequested()Called when the window content is damaged and needs to be refreshed.
-
-
-
Method Detail
-
created
void created(Lwjgl3Window window)
Called after the GLFW window is created. Before this callback is received, it's unsafe to use anyLwjgl3Windowmember functions which, for their part, involve calling GLFW functions. For the main window, this is an immediate callback from insideLwjgl3Application(ApplicationListener, Lwjgl3ApplicationConfiguration).- Parameters:
window- the window instance- See Also:
Lwjgl3Application.newWindow(ApplicationListener, Lwjgl3WindowConfiguration)
-
iconified
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, itsApplicationListenerwill be paused, and when restored it will be resumed.- Parameters:
isIconified- True if window is iconified, false if it leaves the iconified state
-
maximized
void maximized(boolean isMaximized)
Called when the window is maximized, or restored from the maximized state.- Parameters:
isMaximized- true if window is maximized, false if it leaves the maximized state
-
focusLost
void focusLost()
Called when the window lost focus to another window. The window'sApplicationListenerwill continue to be called.
-
focusGained
void focusGained()
Called when the window gained focus.
-
closeRequested
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:
- whether the window should actually close
-
filesDropped
void filesDropped(java.lang.String[] files)
Called when external files are dropped into the window, e.g from the Desktop.- Parameters:
files- array with absolute paths to the files
-
refreshRequested
void refreshRequested()
Called when the window content is damaged and needs to be refreshed. When this occurs,Lwjgl3Graphics.requestRendering()is automatically called.
-
-