Package com.badlogic.gdx.backends.lwjgl3
Class Lwjgl3WindowAdapter
- java.lang.Object
-
- com.badlogic.gdx.backends.lwjgl3.Lwjgl3WindowAdapter
-
- All Implemented Interfaces:
Lwjgl3WindowListener
public class Lwjgl3WindowAdapter extends java.lang.Object implements Lwjgl3WindowListener
Convenience implementation ofLwjgl3WindowListener. Derive from this class and only overwrite the methods you are interested in.
-
-
Constructor Summary
Constructors Constructor Description Lwjgl3WindowAdapter()
-
Method Summary
All Methods Instance Methods Concrete 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
public void created(Lwjgl3Window window)
Description copied from interface:Lwjgl3WindowListenerCalled 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).- Specified by:
createdin interfaceLwjgl3WindowListener- Parameters:
window- the window instance- See Also:
Lwjgl3Application.newWindow(ApplicationListener, Lwjgl3WindowConfiguration)
-
iconified
public void iconified(boolean isIconified)
Description copied from interface:Lwjgl3WindowListenerCalled 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.- Specified by:
iconifiedin interfaceLwjgl3WindowListener- Parameters:
isIconified- True if window is iconified, false if it leaves the iconified state
-
maximized
public void maximized(boolean isMaximized)
Description copied from interface:Lwjgl3WindowListenerCalled when the window is maximized, or restored from the maximized state.- Specified by:
maximizedin interfaceLwjgl3WindowListener- Parameters:
isMaximized- true if window is maximized, false if it leaves the maximized state
-
focusLost
public void focusLost()
Description copied from interface:Lwjgl3WindowListenerCalled when the window lost focus to another window. The window'sApplicationListenerwill continue to be called.- Specified by:
focusLostin interfaceLwjgl3WindowListener
-
focusGained
public void focusGained()
Description copied from interface:Lwjgl3WindowListenerCalled when the window gained focus.- Specified by:
focusGainedin interfaceLwjgl3WindowListener
-
closeRequested
public boolean closeRequested()
Description copied from interface:Lwjgl3WindowListenerCalled when the user requested to close the window, e.g. clicking the close button or pressing the window closing keyboard shortcut.- Specified by:
closeRequestedin interfaceLwjgl3WindowListener- Returns:
- whether the window should actually close
-
filesDropped
public void filesDropped(java.lang.String[] files)
Description copied from interface:Lwjgl3WindowListenerCalled when external files are dropped into the window, e.g from the Desktop.- Specified by:
filesDroppedin interfaceLwjgl3WindowListener- Parameters:
files- array with absolute paths to the files
-
refreshRequested
public void refreshRequested()
Description copied from interface:Lwjgl3WindowListenerCalled when the window content is damaged and needs to be refreshed. When this occurs,Lwjgl3Graphics.requestRendering()is automatically called.- Specified by:
refreshRequestedin interfaceLwjgl3WindowListener
-
-