CInputMethod.m revision 6055
4632N/A#import <Cocoa/Cocoa.h>
4632N/Astatic JNF_CTOR_CACHE(jm_localeCons, jc_localeClass, "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
4632N/Astatic JNF_MEMBER_CACHE(jm_listContains, jc_arrayListClass, "contains", "(Ljava/lang/Object;)Z");
4632N/A// NOTE: This returns a JNI Local Ref. Any code that calls must call DeleteLocalRef with the return value.
4632N/A jobject localeObj = JNFNewObject(env, jm_localeCons, langObj, ctryObj, vrntObj); // AWT_THREADING Safe (known object)
4632N/Astatic void initializeInputMethodController() {
4632N/A if (!inputMethodController) return;
4632N/A [inputMethodController performSelector:@selector(setCurrentInputMethodForLocale) withObject:theLocale];
4632N/A+ (void) _nativeNotifyPeerWithView:(AWTView *)view inputMethod:(JNFJObjectWrapper *) inputMethod {
4632N/A if (!inputMethod) return;
4632N/A return returnValue;
4632N/A JNFJObjectWrapper *inputMethodWrapper = [[JNFJObjectWrapper alloc] initWithJObject:inputMethod withEnv:env];
4632N/A isoAbbreviation = (NSString *) [inputMethodController performSelector:@selector(currentInputMethodLocale)];
4632N/A if (sLastKeyboardLocaleObj) {
4632N/A return returnValue;
4632N/AJNIEXPORT jobject JNICALL Java_sun_lwawt_macosx_CInputMethodDescriptor_nativeGetAvailableLocales
4632N/A selectableArray = (NSArray *)[inputMethodController performSelector:@selector(availableInputMethodLocales)];
4632N/A if (JNFCallBooleanMethod(env, returnValue, jm_listContains, localeObj) == JNI_FALSE) { // AWT_THREADING Safe (known object)
4632N/A JNFCallBooleanMethod(env, returnValue, jm_listAdd, localeObj); // AWT_THREADING Safe (known object)
4632N/A return returnValue;