520 (*env)->ExceptionDescribe(env); 521 (*env)->ExceptionClear(env); 522 } 523 } 524 } else { 525 */ 526 static JNF_CLASS_CACHE(jc_CPlatformView, "sun/lwawt/macosx/CPlatformView"); 527 static JNF_MEMBER_CACHE(jm_deliverWindowDidExposeEvent, jc_CPlatformView, "deliverWindowDidExposeEvent", "()V"); 528 jobject jlocal = (*env)->NewLocalRef(env, m_cPlatformView); 529 if (!(*env)->IsSameObject(env, jlocal, NULL)) { 530 JNFCallVoidMethod(env, jlocal, jm_deliverWindowDidExposeEvent); 531 (*env)->DeleteLocalRef(env, jlocal); 532 } 533 /* 534 } 535 */ 536 } 537 } 538 539 -(BOOL) isCodePointInUnicodeBlockNeedingIMEvent: (unichar) codePoint { 540 if (((codePoint >= 0x3000) && (codePoint <= 0x303F)) || 541 ((codePoint >= 0xFF00) && (codePoint <= 0xFFEF))) { 542 // Code point is in 'CJK Symbols and Punctuation' or 543 // 'Halfwidth and Fullwidth Forms' Unicode block. 544 return YES; 545 } 546 return NO; 547 } 548 549 -(NSMutableString *) parseString : (id) complexString { 550 if ([complexString isKindOfClass:[NSString class]]) { 551 return [complexString mutableCopy]; 552 } 553 else { 554 return [complexString mutableString]; 555 } 556 } 557 558 // NSAccessibility support 559 - (jobject)awtComponent:(JNIEnv*)env 560 { 561 static JNF_CLASS_CACHE(jc_CPlatformView, "sun/lwawt/macosx/CPlatformView"); 562 static JNF_MEMBER_CACHE(jf_Peer, jc_CPlatformView, "peer", "Lsun/lwawt/LWWindowPeer;"); 563 if ((env == NULL) || (m_cPlatformView == NULL)) { | 520 (*env)->ExceptionDescribe(env); 521 (*env)->ExceptionClear(env); 522 } 523 } 524 } else { 525 */ 526 static JNF_CLASS_CACHE(jc_CPlatformView, "sun/lwawt/macosx/CPlatformView"); 527 static JNF_MEMBER_CACHE(jm_deliverWindowDidExposeEvent, jc_CPlatformView, "deliverWindowDidExposeEvent", "()V"); 528 jobject jlocal = (*env)->NewLocalRef(env, m_cPlatformView); 529 if (!(*env)->IsSameObject(env, jlocal, NULL)) { 530 JNFCallVoidMethod(env, jlocal, jm_deliverWindowDidExposeEvent); 531 (*env)->DeleteLocalRef(env, jlocal); 532 } 533 /* 534 } 535 */ 536 } 537 } 538 539 -(BOOL) isCodePointInUnicodeBlockNeedingIMEvent: (unichar) codePoint { 540 if ((codePoint == 0x0024) || (codePoint == 0x00A3) || 541 (codePoint == 0x00A5) || 542 ((codePoint >= 0x20A3) && (codePoint <= 0x20BF)) || 543 ((codePoint >= 0x3000) && (codePoint <= 0x303F)) || 544 ((codePoint >= 0xFF00) && (codePoint <= 0xFFEF))) { 545 // Code point is in 'CJK Symbols and Punctuation' or 546 // 'Halfwidth and Fullwidth Forms' Unicode block or 547 // currency symbols unicode 548 return YES; 549 } 550 return NO; 551 } 552 553 -(NSMutableString *) parseString : (id) complexString { 554 if ([complexString isKindOfClass:[NSString class]]) { 555 return [complexString mutableCopy]; 556 } 557 else { 558 return [complexString mutableString]; 559 } 560 } 561 562 // NSAccessibility support 563 - (jobject)awtComponent:(JNIEnv*)env 564 { 565 static JNF_CLASS_CACHE(jc_CPlatformView, "sun/lwawt/macosx/CPlatformView"); 566 static JNF_MEMBER_CACHE(jf_Peer, jc_CPlatformView, "peer", "Lsun/lwawt/LWWindowPeer;"); 567 if ((env == NULL) || (m_cPlatformView == NULL)) { |