< prev index next >

src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m

Print this page




 454                 [AWTWindow synthesizeMouseEnteredExitedEvents:window withType:NSMouseEntered];
 455             } else if (!isUnderMouse && mouseIsOver) {
 456                 [AWTWindow synthesizeMouseEnteredExitedEvents:window withType:NSMouseExited];
 457             }
 458         }
 459     }
 460 }
 461 
 462 + (NSNumber *) getNSWindowDisplayID_AppKitThread:(NSWindow *)window {
 463     AWT_ASSERT_APPKIT_THREAD;
 464     NSScreen *screen = [window screen];
 465     NSDictionary *deviceDescription = [screen deviceDescription];
 466     return [deviceDescription objectForKey:@"NSScreenNumber"];
 467 }
 468 
 469 - (void) dealloc {
 470 AWT_ASSERT_APPKIT_THREAD;
 471 
 472     JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
 473     [self.javaPlatformWindow setJObject:nil withEnv:env];
 474 

 475     self.nsWindow = nil;
 476     self.ownerWindow = nil;
 477     [super dealloc];
 478 }
 479 
 480 // Tests whether window is blocked by modal dialog/window
 481 - (BOOL) isBlocked {
 482     BOOL isBlocked = NO;
 483 
 484     JNIEnv *env = [ThreadUtilities getJNIEnv];
 485     jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env];
 486     if (platformWindow != NULL) {
 487         static JNF_MEMBER_CACHE(jm_isBlocked, jc_CPlatformWindow, "isBlocked", "()Z");
 488         isBlocked = JNFCallBooleanMethod(env, platformWindow, jm_isBlocked) == JNI_TRUE ? YES : NO;
 489         (*env)->DeleteLocalRef(env, platformWindow);
 490     }
 491 
 492     return isBlocked;
 493 }
 494 




 454                 [AWTWindow synthesizeMouseEnteredExitedEvents:window withType:NSMouseEntered];
 455             } else if (!isUnderMouse && mouseIsOver) {
 456                 [AWTWindow synthesizeMouseEnteredExitedEvents:window withType:NSMouseExited];
 457             }
 458         }
 459     }
 460 }
 461 
 462 + (NSNumber *) getNSWindowDisplayID_AppKitThread:(NSWindow *)window {
 463     AWT_ASSERT_APPKIT_THREAD;
 464     NSScreen *screen = [window screen];
 465     NSDictionary *deviceDescription = [screen deviceDescription];
 466     return [deviceDescription objectForKey:@"NSScreenNumber"];
 467 }
 468 
 469 - (void) dealloc {
 470 AWT_ASSERT_APPKIT_THREAD;
 471 
 472     JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
 473     [self.javaPlatformWindow setJObject:nil withEnv:env];
 474     [self.javaPlatformWindow release];
 475     self.javaPlatformWindow = nil;
 476     self.nsWindow = nil;
 477     self.ownerWindow = nil;
 478     [super dealloc];
 479 }
 480 
 481 // Tests whether window is blocked by modal dialog/window
 482 - (BOOL) isBlocked {
 483     BOOL isBlocked = NO;
 484 
 485     JNIEnv *env = [ThreadUtilities getJNIEnv];
 486     jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env];
 487     if (platformWindow != NULL) {
 488         static JNF_MEMBER_CACHE(jm_isBlocked, jc_CPlatformWindow, "isBlocked", "()Z");
 489         isBlocked = JNFCallBooleanMethod(env, platformWindow, jm_isBlocked) == JNI_TRUE ? YES : NO;
 490         (*env)->DeleteLocalRef(env, platformWindow);
 491     }
 492 
 493     return isBlocked;
 494 }
 495 


< prev index next >