本文整理了Java中org.lwjgl.glfw.GLFW.glfwSetWindowCloseCallback()
方法的一些代码示例,展示了GLFW.glfwSetWindowCloseCallback()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GLFW.glfwSetWindowCloseCallback()
方法的具体详情如下:
包路径:org.lwjgl.glfw.GLFW
类名称:GLFW
方法名:glfwSetWindowCloseCallback
[英]Sets the close callback of the specified window, which is called when the user attempts to close the window, for example by clicking the close widget in the title bar.
The close flag is set before this callback is called, but you can modify it at any time with #glfwSetWindowShouldClose.
The close callback is not triggered by #glfwDestroyWindow.
代码示例来源:origin: libgdx/libgdx
void create(long windowHandle) {
this.windowHandle = windowHandle;
this.input = new Lwjgl3Input(this);
this.graphics = new Lwjgl3Graphics(this);
GLFW.glfwSetWindowFocusCallback(windowHandle, focusCallback);
GLFW.glfwSetWindowIconifyCallback(windowHandle, iconifyCallback);
GLFW.glfwSetWindowMaximizeCallback(windowHandle, maximizeCallback);
GLFW.glfwSetWindowCloseCallback(windowHandle, closeCallback);
GLFW.glfwSetDropCallback(windowHandle, dropCallback);
GLFW.glfwSetWindowRefreshCallback(windowHandle, refreshCallback);
if (windowListener != null) {
windowListener.created(this);
}
}
代码示例来源:origin: libgdx/libgdx
void create(long windowHandle) {
this.windowHandle = windowHandle;
this.input = new Lwjgl3Input(this);
this.graphics = new Lwjgl3Graphics(this);
GLFW.glfwSetWindowFocusCallback(windowHandle, focusCallback);
GLFW.glfwSetWindowIconifyCallback(windowHandle, iconifyCallback);
GLFW.glfwSetWindowMaximizeCallback(windowHandle, maximizeCallback);
GLFW.glfwSetWindowCloseCallback(windowHandle, closeCallback);
GLFW.glfwSetDropCallback(windowHandle, dropCallback);
GLFW.glfwSetWindowRefreshCallback(windowHandle, refreshCallback);
if (windowListener != null) {
windowListener.created(this);
}
}
代码示例来源:origin: libgdx/libgdx
@Override
public void dispose() {
listener.pause();
listener.dispose();
Lwjgl3Cursor.dispose(this);
graphics.dispose();
input.dispose();
GLFW.glfwSetWindowFocusCallback(windowHandle, null);
GLFW.glfwSetWindowIconifyCallback(windowHandle, null);
GLFW.glfwSetWindowCloseCallback(windowHandle, null);
GLFW.glfwSetDropCallback(windowHandle, null);
GLFW.glfwDestroyWindow(windowHandle);
focusCallback.free();
iconifyCallback.free();
maximizeCallback.free();
closeCallback.free();
dropCallback.free();
refreshCallback.free();
}
代码示例来源:origin: libgdx/libgdx
@Override
public void dispose() {
listener.pause();
listener.dispose();
Lwjgl3Cursor.dispose(this);
graphics.dispose();
input.dispose();
GLFW.glfwSetWindowFocusCallback(windowHandle, null);
GLFW.glfwSetWindowIconifyCallback(windowHandle, null);
GLFW.glfwSetWindowCloseCallback(windowHandle, null);
GLFW.glfwSetDropCallback(windowHandle, null);
GLFW.glfwDestroyWindow(windowHandle);
focusCallback.free();
iconifyCallback.free();
maximizeCallback.free();
closeCallback.free();
dropCallback.free();
refreshCallback.free();
}
代码示例来源:origin: org.lwjgl.osgi/org.lwjgl.glfw
/** See {@link GLFW#glfwSetWindowCloseCallback SetWindowCloseCallback}. */
public GLFWWindowCloseCallback set(long window) {
glfwSetWindowCloseCallback(window, this);
return this;
}
代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-lwjgl3
void create(long windowHandle) {
this.windowHandle = windowHandle;
this.input = new Lwjgl3Input(this);
this.graphics = new Lwjgl3Graphics(this);
GLFW.glfwSetWindowFocusCallback(windowHandle, focusCallback);
GLFW.glfwSetWindowIconifyCallback(windowHandle, iconifyCallback);
GLFW.glfwSetWindowMaximizeCallback(windowHandle, maximizeCallback);
GLFW.glfwSetWindowCloseCallback(windowHandle, closeCallback);
GLFW.glfwSetDropCallback(windowHandle, dropCallback);
GLFW.glfwSetWindowRefreshCallback(windowHandle, refreshCallback);
if (windowListener != null) {
windowListener.created(this);
}
}
代码示例来源:origin: sriharshachilakapati/SilenceEngine
glfwSetMouseButtonCallback(handle, glfwMouseButtonCallback);
glfwSetScrollCallback(handle, glfwScrollCallback);
glfwSetWindowCloseCallback(handle, glfwWindowCloseCallback);
glfwSetWindowFocusCallback(handle, glfwWindowFocusCallback);
glfwSetWindowIconifyCallback(handle, glfwWindowIconifyCallback);
代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-lwjgl3
@Override
public void dispose() {
listener.pause();
listener.dispose();
Lwjgl3Cursor.dispose(this);
graphics.dispose();
input.dispose();
GLFW.glfwSetWindowFocusCallback(windowHandle, null);
GLFW.glfwSetWindowIconifyCallback(windowHandle, null);
GLFW.glfwSetWindowCloseCallback(windowHandle, null);
GLFW.glfwSetDropCallback(windowHandle, null);
GLFW.glfwDestroyWindow(windowHandle);
focusCallback.free();
iconifyCallback.free();
maximizeCallback.free();
closeCallback.free();
dropCallback.free();
refreshCallback.free();
}
代码示例来源:origin: SpinyOwl/legui
/**
* Used to bind callbacks to OpenGL window. This method could be called only from main thread (Main OpenGL thread).
*
* @param window window to bind.
* @param keeper callback keeper with callbacks.
*/
static void registerCallbacks(long window, CallbackKeeper keeper) {
glfwSetCharCallback(window, keeper.getChainCharCallback());
glfwSetDropCallback(window, keeper.getChainDropCallback());
glfwSetKeyCallback(window, keeper.getChainKeyCallback());
glfwSetScrollCallback(window, keeper.getChainScrollCallback());
glfwSetCharModsCallback(window, keeper.getChainCharModsCallback());
glfwSetCursorEnterCallback(window, keeper.getChainCursorEnterCallback());
glfwSetFramebufferSizeCallback(window, keeper.getChainFramebufferSizeCallback());
glfwSetMouseButtonCallback(window, keeper.getChainMouseButtonCallback());
glfwSetCursorPosCallback(window, keeper.getChainCursorPosCallback());
glfwSetWindowCloseCallback(window, keeper.getChainWindowCloseCallback());
glfwSetWindowFocusCallback(window, keeper.getChainWindowFocusCallback());
glfwSetWindowIconifyCallback(window, keeper.getChainWindowIconifyCallback());
glfwSetWindowPosCallback(window, keeper.getChainWindowPosCallback());
glfwSetWindowRefreshCallback(window, keeper.getChainWindowRefreshCallback());
glfwSetWindowSizeCallback(window, keeper.getChainWindowSizeCallback());
}
内容来源于网络,如有侵权,请联系作者删除!