< prev index next >

modules/javafx.graphics/src/main/native-glass/mac/GlassWindow.m

Print this page




 633 
 634 #pragma mark --- JNI
 635 
 636 /*
 637  * Class:     com_sun_glass_ui_mac_MacWindow
 638  * Method:    _initIDs
 639  * Signature: ()V
 640  */
 641 JNIEXPORT void JNICALL Java_com_sun_glass_ui_mac_MacWindow__1initIDs
 642 (JNIEnv *env, jclass jClass)
 643 {
 644     LOG("Java_com_sun_glass_ui_mac_MacWindow__1initIDs");
 645 
 646     if (jWindowClass == NULL)
 647     {
 648         jWindowClass = (*env)->NewGlobalRef(env, jClass);
 649     }
 650 
 651     if (jMenuBarDelegateClass == NULL)
 652     {
 653         jMenuBarDelegateClass = (*env)->NewGlobalRef(env, [GlassHelper ClassForName:"com.sun.glass.ui.mac.MacMenuBarDelegate" withEnv:env]);




 654     }
 655 
 656     if (jViewClass == NULL)
 657     {
 658         jViewClass = (*env)->NewGlobalRef(env, [GlassHelper ClassForName:"com.sun.glass.ui.View" withEnv:env]);




 659     }
 660 
 661     if (jScreenClass == NULL)
 662     {
 663         jScreenClass = (*env)->NewGlobalRef(env, [GlassHelper ClassForName:"com.sun.glass.ui.Screen" withEnv:env]);




 664     }
 665 
 666     if (jWindowNotifyMove == NULL)
 667     {
 668         jWindowNotifyMove = (*env)->GetMethodID(env, jWindowClass, "notifyMove", "(IIZ)V");
 669         if ((*env)->ExceptionCheck(env)) return;
 670     }
 671 
 672     if (jWindowNotifyResize == NULL)
 673     {
 674         jWindowNotifyResize = (*env)->GetMethodID(env, jWindowClass, "notifyResize", "(III)V");
 675         if ((*env)->ExceptionCheck(env)) return;
 676     }
 677 
 678     if (jWindowNotifyMoveToAnotherScreen == NULL)
 679     {
 680         jWindowNotifyMoveToAnotherScreen = (*env)->GetMethodID(env, jWindowClass, "notifyMoveToAnotherScreen", "(Lcom/sun/glass/ui/Screen;)V");
 681         if ((*env)->ExceptionCheck(env)) return;
 682     }
 683 




 633 
 634 #pragma mark --- JNI
 635 
 636 /*
 637  * Class:     com_sun_glass_ui_mac_MacWindow
 638  * Method:    _initIDs
 639  * Signature: ()V
 640  */
 641 JNIEXPORT void JNICALL Java_com_sun_glass_ui_mac_MacWindow__1initIDs
 642 (JNIEnv *env, jclass jClass)
 643 {
 644     LOG("Java_com_sun_glass_ui_mac_MacWindow__1initIDs");
 645 
 646     if (jWindowClass == NULL)
 647     {
 648         jWindowClass = (*env)->NewGlobalRef(env, jClass);
 649     }
 650 
 651     if (jMenuBarDelegateClass == NULL)
 652     {
 653         jclass cls = [GlassHelper ClassForName:"com.sun.glass.ui.mac.MacMenuBarDelegate" withEnv:env];
 654         if (!cls) {
 655             return;
 656         }
 657         jMenuBarDelegateClass = (*env)->NewGlobalRef(env, cls);
 658     }
 659 
 660     if (jViewClass == NULL)
 661     {
 662         jclass cls = [GlassHelper ClassForName:"com.sun.glass.ui.View" withEnv:env];
 663         if (!cls) {
 664             return;
 665         }
 666         jViewClass = (*env)->NewGlobalRef(env, cls);
 667     }
 668 
 669     if (jScreenClass == NULL)
 670     {
 671         jclass cls = [GlassHelper ClassForName:"com.sun.glass.ui.Screen" withEnv:env];
 672         if (!cls) {
 673             return;
 674         }
 675         jScreenClass = (*env)->NewGlobalRef(env, cls);
 676     }
 677 
 678     if (jWindowNotifyMove == NULL)
 679     {
 680         jWindowNotifyMove = (*env)->GetMethodID(env, jWindowClass, "notifyMove", "(IIZ)V");
 681         if ((*env)->ExceptionCheck(env)) return;
 682     }
 683 
 684     if (jWindowNotifyResize == NULL)
 685     {
 686         jWindowNotifyResize = (*env)->GetMethodID(env, jWindowClass, "notifyResize", "(III)V");
 687         if ((*env)->ExceptionCheck(env)) return;
 688     }
 689 
 690     if (jWindowNotifyMoveToAnotherScreen == NULL)
 691     {
 692         jWindowNotifyMoveToAnotherScreen = (*env)->GetMethodID(env, jWindowClass, "notifyMoveToAnotherScreen", "(Lcom/sun/glass/ui/Screen;)V");
 693         if ((*env)->ExceptionCheck(env)) return;
 694     }
 695 


< prev index next >