< prev index next >

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

Print this page




 885         return reinterpret_cast<LRESULT>(
 886             reinterpret_cast<void*>(ImmCreateContext()));
 887       }
 888       case WM_AWT_DESTROYCONTEXT: {
 889           ImmDestroyContext((HIMC)wParam);
 890           return 0;
 891       }
 892       case WM_AWT_ASSOCIATECONTEXT: {
 893           EnableNativeIMEStruct *data = (EnableNativeIMEStruct*)wParam;
 894 
 895           jobject peer = data->peer;
 896           jobject self = data->self;
 897           jint context = data->context;
 898           jboolean useNativeCompWindow = data->useNativeCompWindow;
 899 
 900           AwtComponent* comp = (AwtComponent*)JNI_GET_PDATA(peer);
 901           if (comp != NULL)
 902           {
 903               comp->SetInputMethod(self, useNativeCompWindow);
 904               comp->ImmAssociateContext((HIMC)context);



 905           }
 906 
 907           if (peer != NULL) {
 908               env->DeleteGlobalRef(peer);
 909           }
 910           if (self != NULL) {
 911               env->DeleteGlobalRef(self);
 912           }
 913 
 914           delete data;
 915           return 0;
 916       }
 917       case WM_AWT_GET_DEFAULT_IME_HANDLER: {
 918           LRESULT ret = (LRESULT)FALSE;
 919           jobject peer = (jobject)wParam;
 920 
 921           AwtComponent* comp = (AwtComponent*)JNI_GET_PDATA(peer);
 922           if (comp != NULL) {
 923               HWND defaultIMEHandler = ImmGetDefaultIMEWnd(comp->GetHWnd());
 924               if (defaultIMEHandler != NULL) {




 885         return reinterpret_cast<LRESULT>(
 886             reinterpret_cast<void*>(ImmCreateContext()));
 887       }
 888       case WM_AWT_DESTROYCONTEXT: {
 889           ImmDestroyContext((HIMC)wParam);
 890           return 0;
 891       }
 892       case WM_AWT_ASSOCIATECONTEXT: {
 893           EnableNativeIMEStruct *data = (EnableNativeIMEStruct*)wParam;
 894 
 895           jobject peer = data->peer;
 896           jobject self = data->self;
 897           jint context = data->context;
 898           jboolean useNativeCompWindow = data->useNativeCompWindow;
 899 
 900           AwtComponent* comp = (AwtComponent*)JNI_GET_PDATA(peer);
 901           if (comp != NULL)
 902           {
 903               comp->SetInputMethod(self, useNativeCompWindow);
 904               comp->ImmAssociateContext((HIMC)context);
 905               if (context) {
 906                   comp->WmImeStartComposition();
 907               }
 908           }
 909 
 910           if (peer != NULL) {
 911               env->DeleteGlobalRef(peer);
 912           }
 913           if (self != NULL) {
 914               env->DeleteGlobalRef(self);
 915           }
 916 
 917           delete data;
 918           return 0;
 919       }
 920       case WM_AWT_GET_DEFAULT_IME_HANDLER: {
 921           LRESULT ret = (LRESULT)FALSE;
 922           jobject peer = (jobject)wParam;
 923 
 924           AwtComponent* comp = (AwtComponent*)JNI_GET_PDATA(peer);
 925           if (comp != NULL) {
 926               HWND defaultIMEHandler = ImmGetDefaultIMEWnd(comp->GetHWnd());
 927               if (defaultIMEHandler != NULL) {


< prev index next >