/*========================================================================= Program: FusionViewer Module: $RCSfile: Cursor.cpp,v $ Language: C++ Date: $Date: 2006/08/10 17:38:46 $ Version: $Revision: 1.1.1.1 $ Copyright (c) Insightful Corporation. All rights reserved. See Copyright.txt for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* * Cursors are not working correctly with the 1.0 jogl release * on MacOS 10.3.4 and Java 1.4.2. This is a set of native functions * that provide cursors for Macs. */ #include "stdafx.h" #include "org_fusionviewer_ui_CursorControl.h" #if (__APPLE__) #include #endif #define CURSOR_NATIVE(func) Java_org_fusionviewer_ui_CursorControl_##func JNIEXPORT void JNICALL CURSOR_NATIVE(setArrowCursor) (JNIEnv *env, jclass cls) { #if (__APPLE__) ::SetThemeCursor(kThemeArrowCursor); #endif } JNIEXPORT void JNICALL CURSOR_NATIVE(setCrossCursor) (JNIEnv *env, jclass cls) { #if (__APPLE__) ::SetThemeCursor(kThemeCrossCursor); #endif } JNIEXPORT void JNICALL CURSOR_NATIVE(setHandCursor) (JNIEnv *env, jclass cls) { #if (__APPLE__) ::SetThemeCursor(kThemeOpenHandCursor); #endif } JNIEXPORT void JNICALL CURSOR_NATIVE(setResizeLeftRightCursor) (JNIEnv *env, jclass cls) { #if (__APPLE__) ::SetThemeCursor(kThemeResizeLeftRightCursor); #endif } JNIEXPORT void JNICALL CURSOR_NATIVE(setResizeUpDownCursor) (JNIEnv *env, jclass cls) { #if (__APPLE__) ::SetThemeCursor(kThemeResizeUpDownCursor); #endif } JNIEXPORT void JNICALL CURSOR_NATIVE(nativeHideCursor) (JNIEnv *env, jclass cls) { #if (__APPLE__) ::HideCursor(); #endif } JNIEXPORT void JNICALL CURSOR_NATIVE(nativeShowCursor) (JNIEnv *env, jclass cls) { #if (__APPLE__) ::ShowCursor(); #endif }