< prev index next >

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

Print this page
rev 54096 : 8259651: [macOS] Replace JNF_COCOA_ENTER/EXIT macros
rev 54098 : 8260616: Removing remaining JNF dependencies in the java.desktop module
8259729: Missed JNFInstanceOf -> IsInstanceOf conversion

*** 21,33 **** * 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 "jni_util.h" - #import <JavaNativeFoundation/JavaNativeFoundation.h> #import <ApplicationServices/ApplicationServices.h> #import "CRobotKeyCode.h" #import "LWCToolkit.h" #import "sun_lwawt_macosx_CRobot.h" --- 21,32 ---- * 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 "JNIUtilities.h" #import <ApplicationServices/ApplicationServices.h> #import "CRobotKeyCode.h" #import "LWCToolkit.h" #import "sun_lwawt_macosx_CRobot.h"
*** 166,176 **** JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CRobot_mouseEvent (JNIEnv *env, jobject peer, jint mouseLastX, jint mouseLastY, jint buttonsState, jboolean isButtonsDownState, jboolean isMouseMove) { ! JNF_COCOA_ENTER(env); autoDelay(isMouseMove); // This is the native method called when Robot mouse events occur. // The CRobot tracks the mouse position, and which button was // pressed. The peer also tracks the mouse button desired state, --- 165,175 ---- JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CRobot_mouseEvent (JNIEnv *env, jobject peer, jint mouseLastX, jint mouseLastY, jint buttonsState, jboolean isButtonsDownState, jboolean isMouseMove) { ! JNI_COCOA_ENTER(env); autoDelay(isMouseMove); // This is the native method called when Robot mouse events occur. // The CRobot tracks the mouse position, and which button was // pressed. The peer also tracks the mouse button desired state,
*** 252,262 **** eventNumber = gsButtonEventNumber[button]; } PostMouseEvent(point, button, type, clickCount, eventNumber); ! JNF_COCOA_EXIT(env); } /* * Class: sun_lwawt_macosx_CRobot * Method: mouseWheel --- 251,261 ---- eventNumber = gsButtonEventNumber[button]; } PostMouseEvent(point, button, type, clickCount, eventNumber); ! JNI_COCOA_EXIT(env); } /* * Class: sun_lwawt_macosx_CRobot * Method: mouseWheel
*** 314,324 **** JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CRobot_nativeGetScreenPixels (JNIEnv *env, jobject peer, jint x, jint y, jint width, jint height, jdouble scale, jintArray pixels) { ! JNF_COCOA_ENTER(env); jint picX = x; jint picY = y; jint picWidth = width; jint picHeight = height; --- 313,323 ---- JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CRobot_nativeGetScreenPixels (JNIEnv *env, jobject peer, jint x, jint y, jint width, jint height, jdouble scale, jintArray pixels) { ! JNI_COCOA_ENTER(env); jint picX = x; jint picY = y; jint picWidth = width; jint picHeight = height;
*** 360,370 **** CGImageRelease(screenPixelsImage); // release the Java int array back up to the JVM (*env)->ReleasePrimitiveArrayCritical(env, pixels, jPixelData, 0); ! JNF_COCOA_EXIT(env); } /**************************************************** * Helper methods ****************************************************/ --- 359,369 ---- CGImageRelease(screenPixelsImage); // release the Java int array back up to the JVM (*env)->ReleasePrimitiveArrayCritical(env, pixels, jPixelData, 0); ! JNI_COCOA_EXIT(env); } /**************************************************** * Helper methods ****************************************************/
< prev index next >