本文整理了Java中org.lwjgl.glfw.GLFW.glfwSetCharModsCallback()
方法的一些代码示例,展示了GLFW.glfwSetCharModsCallback()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GLFW.glfwSetCharModsCallback()
方法的具体详情如下:
包路径:org.lwjgl.glfw.GLFW
类名称:GLFW
方法名:glfwSetCharModsCallback
[英]Sets the character with modifiers callback of the specified window, which is called when a Unicode character is input regardless of what modifier keys are used.
The character with modifiers callback is intended for implementing custom Unicode character input. For regular Unicode text input, see #glfwSetCharCallback. Like the character callback, the character with modifiers callback deals with characters and is keyboard layout dependent. Characters do not map 1:1 to physical keys, as a key may produce zero, one or more characters. If you want to know whether a specific physical key was pressed or released, see #glfwSetKeyCallback instead.
This function must only be called from the main thread.
Deprecared: scheduled for removal in version 4.0.
[中]设置指定窗口的“带修饰符的字符”回调,在输入Unicode字符时调用该回调,而不管使用什么修饰符键。
带修饰符的字符回调用于实现自定义Unicode字符输入。有关常规Unicode文本输入,请参见#glfwSetCharCallback。与字符回调一样,带有修改器的字符回调处理字符,并且依赖于键盘布局。字符不以1:1映射到物理键,因为键可能产生零个、一个或多个字符。如果您想知道是否按下或释放了特定的物理键,请参阅#glfwSetKeyCallback。
只能从主线程调用此函数。
已删除:计划在版本4.0中删除。
代码示例来源:origin: org.lwjgl.osgi/org.lwjgl.glfw
/** See {@link GLFW#glfwSetCharModsCallback SetCharModsCallback}. */
public GLFWCharModsCallback set(long window) {
glfwSetCharModsCallback(window, this);
return this;
}
代码示例来源:origin: sriharshachilakapati/SilenceEngine
glfwSetCharModsCallback(handle, glfwCharModsCallback);
glfwSetCursorEnterCallback(handle, glfwCursorEnterCallback);
glfwSetCursorPosCallback(handle, glfwCursorPosCallback);
代码示例来源: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());
}
内容来源于网络,如有侵权,请联系作者删除!