diff --git a/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java b/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java index 31285affb..7af387239 100644 --- a/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java +++ b/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java @@ -493,6 +493,10 @@ public class GLFW /* volatile */ public static GLFWWindowPosCallback mGLFWWindowPosCallback; /* volatile */ public static GLFWWindowRefreshCallback mGLFWWindowRefreshCallback; + public static GLFWPreeditCallback mGLFWPreeditCallback; + public static GLFWIMEStatusCallback mGLFWIMEStatusCallback; + public static GLFWPreeditCandidateCallback mGLFWPreeditCandidateCallback; + // Store callback method references directly to avoid a roundtrip through // JNI when calling the default LWJGL callbacks. @Nullable public static GLFWFramebufferSizeCallbackI mGLFWFramebufferSizeCallbackI; @@ -794,6 +798,28 @@ public class GLFW return lastCallback; } + public static GLFWPreeditCallback glfwSetPreeditCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWpreeditfun") GLFWPreeditCallbackI cbfun) { + GLFWPreeditCallback lastCallback = mGLFWPreeditCallback; + if (cbfun == null) mGLFWPreeditCallback = null; + else mGLFWPreeditCallback = GLFWPreeditCallback.create(cbfun); + + return lastCallback; + } + public static GLFWIMEStatusCallback glfwSetIMEStatusCallback(@NativeType("GLFWwindow *") long window, @NativeType("GLFWimestatusfun") @Nullable GLFWIMEStatusCallbackI cbfun) { + GLFWIMEStatusCallback lastCallback = mGLFWIMEStatusCallback; + if (cbfun == null) mGLFWIMEStatusCallback = null; + else mGLFWIMEStatusCallback = GLFWIMEStatusCallback.create(cbfun); + + return lastCallback; + } + public static GLFWPreeditCandidateCallback glfwSetPreeditCandidateCallback(@NativeType("GLFWwindow *") long window, @NativeType("GLFWpreeditcandidatefun") @Nullable GLFWPreeditCandidateCallbackI cbfun) { + GLFWPreeditCandidateCallback lastCallback = mGLFWPreeditCandidateCallback; + if (cbfun == null) mGLFWPreeditCandidateCallback = null; + else mGLFWPreeditCandidateCallback = GLFWPreeditCandidateCallback.create(cbfun); + + return lastCallback; + } + public static GLFWWindowSizeCallback glfwSetWindowSizeCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowsizefun") GLFWWindowSizeCallbackI cbfun) { GLFWWindowSizeCallback previousCallback = null; if(mGLFWWindowSizeCallbackI != null) { @@ -832,6 +858,10 @@ public class GLFW return GLFW_PLATFORM_X11; } + public static boolean glfwPlatformSupported(int platform) { + return platform == GLFW_PLATFORM_X11; + } + @NativeType("GLFWwindow *") public static long glfwGetCurrentContext() { long __functionAddress = Functions.GetCurrentContext; @@ -1047,6 +1077,10 @@ public class GLFW nglfwSetShowingWindow(mGLFWWindowMap.size() == 0 ? 0 : mGLFWWindowMap.keyAt(mGLFWWindowMap.size() - 1)); } + public static String glfwGetWindowTitle(long window) { + return internalGetWindow(window).title.toString(); + } + public static void glfwDefaultWindowHints() { mGLFWWindowVisibleOnCreation = true; }