Package com.lapissea.glfw
Class GlfwWindow
- java.lang.Object
-
- com.lapissea.glfw.GlfwWindow
-
public class GlfwWindow extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGlfwWindow.Cursorstatic classGlfwWindow.KeyboardEventRegistrystatic classGlfwWindow.SurfaceAPI
-
Field Summary
Fields Modifier and Type Field Description com.lapissea.util.event.change.ChangeRegistry<GlfwWindow.Cursor>cursorModecom.lapissea.util.event.change.ChangeRegistryBoolfocusedprotected longhandlecom.lapissea.util.event.change.ChangeRegistryBooliconifiedcom.lapissea.util.event.change.ChangeRegistryBoolmaximizedcom.lapissea.util.event.change.ChangeRegistry<GlfwMonitor>monitorcom.lapissea.vec.ChangeRegistryVec2imousePoscom.lapissea.vec.ChangeRegistryVec2iposGlfwWindow.KeyboardEventRegistryregistryKeyboardKeycom.lapissea.util.event.EventRegistry<GlfwMouseEvent>registryMouseButtoncom.lapissea.util.event.EventRegistry<GlfwMouseMoveEvent>registryMouseMovecom.lapissea.util.event.EventRegistry<com.lapissea.vec.Vec2f>registryMouseScrollcom.lapissea.vec.ChangeRegistryVec2isizecom.lapissea.util.event.change.ChangeRegistry<String>titlecom.lapissea.util.event.change.ChangeRegistryBoolvisible
-
Constructor Summary
Constructors Constructor Description GlfwWindow()
-
Method Summary
-
-
-
Field Detail
-
handle
protected long handle
-
title
public final com.lapissea.util.event.change.ChangeRegistry<String> title
-
maximized
public final com.lapissea.util.event.change.ChangeRegistryBool maximized
-
visible
public final com.lapissea.util.event.change.ChangeRegistryBool visible
-
size
public final com.lapissea.vec.ChangeRegistryVec2i size
-
pos
public final com.lapissea.vec.ChangeRegistryVec2i pos
-
iconified
public final com.lapissea.util.event.change.ChangeRegistryBool iconified
-
monitor
public final com.lapissea.util.event.change.ChangeRegistry<GlfwMonitor> monitor
-
mousePos
public final com.lapissea.vec.ChangeRegistryVec2i mousePos
-
focused
public final com.lapissea.util.event.change.ChangeRegistryBool focused
-
registryKeyboardKey
public final GlfwWindow.KeyboardEventRegistry registryKeyboardKey
-
registryMouseButton
public final com.lapissea.util.event.EventRegistry<GlfwMouseEvent> registryMouseButton
-
registryMouseMove
public final com.lapissea.util.event.EventRegistry<GlfwMouseMoveEvent> registryMouseMove
-
registryMouseScroll
public final com.lapissea.util.event.EventRegistry<com.lapissea.vec.Vec2f> registryMouseScroll
-
cursorMode
public final com.lapissea.util.event.change.ChangeRegistry<GlfwWindow.Cursor> cursorMode
-
-
Method Detail
-
init
public GlfwWindow init()
-
init
public GlfwWindow init(boolean resizeable, boolean decorated)
-
init
public GlfwWindow init(boolean resizeable)
-
init
public GlfwWindow init(GlfwWindow.SurfaceAPI api)
-
init
public GlfwWindow init(GlfwWindow.SurfaceAPI api, boolean resizeable)
-
init
public GlfwWindow init(GlfwWindow.SurfaceAPI api, boolean resizeable, boolean decorated, boolean transparent)
-
isFullScreen
public boolean isFullScreen()
-
initProps
protected void initProps()
-
isKeyDown
public boolean isKeyDown(int key)
-
isMouseKeyDown
public boolean isMouseKeyDown(int key)
-
setUserPointer
public GlfwWindow setUserPointer(org.lwjgl.PointerBuffer pointer)
-
setUserPointer
public GlfwWindow setUserPointer(long pointer)
-
getUserPointer
public long getUserPointer()
-
setIcon
public void setIcon(BufferedImage... images)
-
setIcon
public void setIcon(org.lwjgl.glfw.GLFWImage... images)
-
isCreated
public boolean isCreated()
-
pollEvents
public void pollEvents()
-
waitEvents
public void waitEvents()
-
shouldClose
public boolean shouldClose()
-
destroy
public void destroy()
-
hide
public void hide()
-
show
public void show()
-
isVisible
public boolean isVisible()
-
swapBuffers
public void swapBuffers()
-
loadState
public GlfwWindow loadState(String data)
-
loadState
public GlfwWindow loadState(File file)
-
loadState
public GlfwWindow loadState(Reader data)
-
loadState
public GlfwWindow loadState(Map<String,com.google.gson.internal.LinkedTreeMap> data)
-
saveState
public GlfwWindow saveState(File file)
-
saveState
public GlfwWindow saveState(Writer out)
-
saveState
public String saveState()
-
saveState
public com.google.gson.JsonObject saveState(com.google.gson.JsonObject json)
-
setAutoFullScreen
public void setAutoFullScreen()
-
requestClose
public void requestClose()
-
isFocused
public boolean isFocused()
-
focus
public void focus()
-
toggleFullScreen
public void toggleFullScreen()
-
whileOpen
public CompletableFuture<Void> whileOpen(Runnable run, String name)
-
whileOpen
public CompletableFuture<Void> whileOpen(Runnable run, String name, BiFunction<Runnable,String,Thread> newThread)
-
whileOpen
public void whileOpen(Runnable run)
-
centerMouse
public void centerMouse()
-
useThisThread
public void useThisThread()
-
centerWindow
public void centerWindow()
-
pollEventsWhileOpen
public void pollEventsWhileOpen()
-
autoHandleStateSaving
public void autoHandleStateSaving(File saveFile)
-
autoHandleStateSaving
public void autoHandleStateSaving(File saveFile, int timeoutInterval)
-
autoF11Toggle
public void autoF11Toggle()
-
getHandle
public long getHandle()
-
onDestroy
public void onDestroy(Runnable event)
-
isIconified
public boolean isIconified()
-
grabContext
public void grabContext()
-
-