< prev index next >

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

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 437,447 **** * NSEvent keyCodes and translate to the Java virtual key code. */ static void NsCharToJavaVirtualKeyCode(unichar ch, BOOL isDeadChar, NSUInteger flags, unsigned short key, ! jint *keyCode, jint *keyLocation, BOOL *postsTyped, unichar *deadChar) { static size_t size = sizeof(keyTable) / sizeof(struct _key); NSInteger offset; if (isDeadChar) { --- 437,448 ---- * NSEvent keyCodes and translate to the Java virtual key code. */ static void NsCharToJavaVirtualKeyCode(unichar ch, BOOL isDeadChar, NSUInteger flags, unsigned short key, ! jint *keyCode, jint *keyLocation, BOOL *postsTyped, ! unichar *deadChar) { static size_t size = sizeof(keyTable) / sizeof(struct _key); NSInteger offset; if (isDeadChar) {
*** 705,724 **** jint modifierFlags = data[2]; jshort keyCode = (jshort)data[3]; jint jkeyCode = java_awt_event_KeyEvent_VK_UNDEFINED; jint jkeyLocation = java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN; ! jchar testDeadChar = 0; NsCharToJavaVirtualKeyCode((unichar)testChar, isDeadChar, (NSUInteger)modifierFlags, (unsigned short)keyCode, ! &jkeyCode, &jkeyLocation, &postsTyped, &testDeadChar); ! // out = [jkeyCode, jkeyLocation]; (*env)->SetIntArrayRegion(env, outData, 0, 1, &jkeyCode); (*env)->SetIntArrayRegion(env, outData, 1, 1, &jkeyLocation); ! (*env)->SetIntArrayRegion(env, outData, 2, 1, (jint *)&testDeadChar); (*env)->ReleaseIntArrayElements(env, inData, data, 0); JNF_COCOA_EXIT(env); --- 706,726 ---- jint modifierFlags = data[2]; jshort keyCode = (jshort)data[3]; jint jkeyCode = java_awt_event_KeyEvent_VK_UNDEFINED; jint jkeyLocation = java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN; ! jint testDeadChar = 0; NsCharToJavaVirtualKeyCode((unichar)testChar, isDeadChar, (NSUInteger)modifierFlags, (unsigned short)keyCode, ! &jkeyCode, &jkeyLocation, &postsTyped, ! (unichar *) &testDeadChar); ! // out = [jkeyCode, jkeyLocation, deadChar]; (*env)->SetIntArrayRegion(env, outData, 0, 1, &jkeyCode); (*env)->SetIntArrayRegion(env, outData, 1, 1, &jkeyLocation); ! (*env)->SetIntArrayRegion(env, outData, 2, 1, &testDeadChar); (*env)->ReleaseIntArrayElements(env, inData, data, 0); JNF_COCOA_EXIT(env);
< prev index next >