/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#import <Cocoa/Cocoa.h>
#import "sun_lwawt_macosx_CInputMethod.h"
#import "sun_lwawt_macosx_CInputMethodDescriptor.h"
#import "ThreadUtilities.h"
#import "AWTView.h"
#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
static JNF_CTOR_CACHE(jm_localeCons, jc_localeClass, "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
//
// NOTE: This returns a JNI Local Ref. Any code that calls must call DeleteLocalRef with the return value.
//
{
// Break apart the string into its components.
// First, duplicate the NSString into a C string, since we're going to modify it.
char * country;
char * variant;
// Convert _ to NULL -- this gives us three null terminated strings in place.
if (*country == '_') {
*country++ = '\0';
if (*variant == '_') {
*variant++ = '\0';
}
} else {
}
// Create the java.util.Locale object
jobject localeObj = JNFNewObject(env, jm_localeCons, langObj, ctryObj, vrntObj); // AWT_THREADING Safe (known object)
// Clean up and return.
return localeObj;
}
static void initializeInputMethodController() {
if (jrsInputMethodController != nil) {
}
}
}
@interface CInputMethod : NSObject {}
@end
{
if (!inputMethodController) return;
[inputMethodController performSelector:@selector(setCurrentInputMethodForLocale) withObject:theLocale];
}
if (!view) return;
if (!inputMethod) return;
}
[view abandonInput];
}
@end
/*
* Class: sun_lwawt_macosx_CInputMethod
* Method: nativeInit
* Signature: ();
*/
{
}
/*
* Class: sun_lwawt_macosx_CInputMethod
* Method: nativeGetCurrentInputMethodInfo
*/
{
if (!inputMethodController) return NULL;
}];
return returnValue;
}
/*
* Class: sun_lwawt_macosx_CInputMethod
* Method: nativeActivate
* Signature: (JLsun/lwawt/macosx/CInputMethod;)V
*/
{
JNFJObjectWrapper *inputMethodWrapper = [[JNFJObjectWrapper alloc] initWithJObject:inputMethod withEnv:env];
}];
}
/*
* Class: sun_lwawt_macosx_CInputMethod
* Method: nativeEndComposition
* Signature: (J)V
*/
{
}];
}
/*
* Class: sun_lwawt_macosx_CInputMethod
* Method: getNativeLocale
*/
{
if (!inputMethodController) return NULL;
isoAbbreviation = (NSString *) [inputMethodController performSelector:@selector(currentInputMethodLocale)];
}];
if (sLastKeyboardLocaleObj) {
}
}
return returnValue;
}
/*
* Class: sun_lwawt_macosx_CInputMethod
* Method: setNativeLocale
*/
{
}];
return JNI_TRUE;
}
/*
* Class: sun_lwawt_macosx_CInputMethodDescriptor
* Method: nativeInit
* Signature: ();
*/
{
}
/*
* Class: sun_lwawt_macosx_CInputMethodDescriptor
* Method: nativeGetAvailableLocales
*/
{
if (!inputMethodController) return NULL;
selectableArray = (NSArray *)[inputMethodController performSelector:@selector(availableInputMethodLocales)];
}];
// Create an ArrayList to return back to the caller.
if (JNFCallBooleanMethod(env, returnValue, jm_listContains, localeObj) == JNI_FALSE) { // AWT_THREADING Safe (known object)
}
}
return returnValue;
}