< prev index next >

src/java.desktop/windows/native/libawt/windows/awt_InputMethod.cpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -55,11 +55,11 @@
 Java_sun_awt_windows_WInputMethod_createNativeContext(JNIEnv *env, jobject self)
 {
     TRY;
 
     // use special message to call ImmCreateContext() in main thread.
-    return (jint)AwtToolkit::GetInstance().SendMessage(WM_AWT_CREATECONTEXT);
+    return (jint)AwtToolkit::GetInstance().InvokeInputMethodFunction(WM_AWT_CREATECONTEXT);
 
     CATCH_BAD_ALLOC_RET(0);
 }
 
 

@@ -72,11 +72,11 @@
 Java_sun_awt_windows_WInputMethod_destroyNativeContext(JNIEnv *env, jobject self, jint context)
 {
     TRY_NO_VERIFY;
 
     // use special message to call ImmDestroyContext() in main thread.
-    AwtToolkit::GetInstance().SendMessage(WM_AWT_DESTROYCONTEXT, context, 0);
+    AwtToolkit::GetInstance().InvokeInputMethodFunction(WM_AWT_DESTROYCONTEXT, context, 0);
 
     CATCH_BAD_ALLOC;
 }
 
 

@@ -99,11 +99,11 @@
     enis->self = selfGlobalRef;
     enis->peer = peerGlobalRef;
     enis->context = context;
     enis->useNativeCompWindow = useNativeCompWindow;
 
-    AwtToolkit::GetInstance().SendMessage(WM_AWT_ASSOCIATECONTEXT,
+    AwtToolkit::GetInstance().InvokeInputMethodFunction(WM_AWT_ASSOCIATECONTEXT,
                                           reinterpret_cast<WPARAM>(enis), (LPARAM)0);
     // global refs are deleted in message handler
 
     CATCH_BAD_ALLOC;
 }

@@ -126,11 +126,11 @@
     enis->self = NULL;
     enis->peer = peerGlobalRef;
     enis->context = NULL;
     enis->useNativeCompWindow = JNI_TRUE;
 
-    AwtToolkit::GetInstance().SendMessage(WM_AWT_ASSOCIATECONTEXT,
+    AwtToolkit::GetInstance().InvokeInputMethodFunction(WM_AWT_ASSOCIATECONTEXT,
                                           reinterpret_cast<WPARAM>(enis), (LPARAM)0);
     // global refs are deleted in message handler
 
     CATCH_BAD_ALLOC;
 }

@@ -203,11 +203,11 @@
     //       then input text should be committed. Otherwise, should be discarded.
     //
     // 10/29/98 - Changed to commit it according to the flag.
 
     // use special message to call ImmNotifyIME() in main thread.
-    AwtToolkit::GetInstance().SendMessage(WM_AWT_ENDCOMPOSITION, context,
+    AwtToolkit::GetInstance().InvokeInputMethodFunction(WM_AWT_ENDCOMPOSITION, context,
         (LPARAM)(flag != sun_awt_windows_WInputMethod_DISCARD_INPUT));
 
     CATCH_BAD_ALLOC;
 }
 

@@ -220,11 +220,11 @@
 Java_sun_awt_windows_WInputMethod_setConversionStatus(JNIEnv *env, jobject self, jint context, jint request)
 {
     TRY;
 
     // use special message to call ImmSetConversionStatus() in main thread.
-    AwtToolkit::GetInstance().SendMessage(WM_AWT_SETCONVERSIONSTATUS,
+    AwtToolkit::GetInstance().InvokeInputMethodFunction(WM_AWT_SETCONVERSIONSTATUS,
                                           context,
                                           MAKELPARAM((WORD)request, (WORD)0));
 
     CATCH_BAD_ALLOC;
 }

@@ -238,11 +238,11 @@
 Java_sun_awt_windows_WInputMethod_getConversionStatus(JNIEnv *env, jobject self, jint context)
 {
     TRY;
 
     // use special message to call ImmSetConversionStatus() in main thread.
-    return (jint) AwtToolkit::GetInstance().SendMessage(
+    return (jint) AwtToolkit::GetInstance().InvokeInputMethodFunction(
         WM_AWT_GETCONVERSIONSTATUS, context, 0);
 
     CATCH_BAD_ALLOC_RET(0);
 }
 

@@ -255,11 +255,11 @@
 Java_sun_awt_windows_WInputMethod_setOpenStatus(JNIEnv *env, jobject self, jint context, jboolean flag)
 {
     TRY;
 
     // use special message to call ImmSetConversionStatus() in main thread.
-    AwtToolkit::GetInstance().SendMessage(WM_AWT_SETOPENSTATUS,
+    AwtToolkit::GetInstance().InvokeInputMethodFunction(WM_AWT_SETOPENSTATUS,
                                           context, flag);
 
     CATCH_BAD_ALLOC;
 }
 

@@ -272,11 +272,11 @@
 Java_sun_awt_windows_WInputMethod_getOpenStatus(JNIEnv *env, jobject self, jint context)
 {
     TRY;
 
     // use special message to call ImmSetConversionStatus() in main thread.
-    return (jboolean)(AwtToolkit::GetInstance().SendMessage(
+    return (jboolean)(AwtToolkit::GetInstance().InvokeInputMethodFunction(
                                                        WM_AWT_GETOPENSTATUS,
                                                        context, 0));
     CATCH_BAD_ALLOC_RET(0);
 }
 

@@ -390,11 +390,11 @@
     if (defaultIMEHandler == NULL)
     {
         jobject peerGlobalRef = env->NewGlobalRef(peer);
 
         // use special message to access pData on the toolkit thread
-        LRESULT res = AwtToolkit::GetInstance().SendMessage(WM_AWT_GET_DEFAULT_IME_HANDLER,
+        LRESULT res = AwtToolkit::GetInstance().InvokeInputMethodFunction(WM_AWT_GET_DEFAULT_IME_HANDLER,
                                           reinterpret_cast<WPARAM>(peerGlobalRef), 0);
         // global ref is deleted in message handler
 
         if (res == TRUE) {
             defaultIMEHandler = AwtToolkit::GetInstance().GetInputMethodWindow();

@@ -429,11 +429,11 @@
     //   carefully extract right x and y values using GET_X_LPARAM and
     //   GET_Y_LPARAM, not LOWORD and HIWORD
     // See CR 4805862, AwtToolkit::WndProc
 
     // use special message to open candidate window in main thread.
-    AwtToolkit::GetInstance().SendMessage(WM_AWT_OPENCANDIDATEWINDOW,
+    AwtToolkit::GetInstance().InvokeInputMethodFunction(WM_AWT_OPENCANDIDATEWINDOW,
                                           (WPARAM)peerGlobalRef, MAKELONG(x, y));
     // global ref is deleted in message handler
 
     CATCH_BAD_ALLOC;
 }
< prev index next >