< prev index next >
src/java.desktop/macosx/native/libosxapp/ThreadUtilities.h
Print this page
rev 54098 : 8260616: Removing remaining JNF dependencies in the java.desktop module
8259729: Missed JNFInstanceOf -> IsInstanceOf conversion
@@ -24,10 +24,12 @@
*/
#ifndef __THREADUTILITIES_H
#define __THREADUTILITIES_H
+#include "jni.h"
+
#import <pthread.h>
#import "AWT_debug.h"
@@ -121,20 +123,20 @@
#endif /* AWT_THREAD_ASSERTS */
// --------------------------------------------------------------------------
__attribute__((visibility("default")))
-@interface ThreadUtilities { }
+@interface ThreadUtilities : NSObject { } /* Extend NSObject so can call performSelectorOnMainThread */
+ (JNIEnv*)getJNIEnv;
+ (JNIEnv*)getJNIEnvUncached;
+ (void)detachCurrentThread;
+ (void)setAppkitThreadGroup:(jobject)group;
-//Wrappers for the corresponding JNFRunLoop methods with a check for main thread
+ (void)performOnMainThreadWaiting:(BOOL)wait block:(void (^)())block;
+ (void)performOnMainThread:(SEL)aSelector on:(id)target withObject:(id)arg waitUntilDone:(BOOL)wait;
++ (NSString*)javaRunLoopMode;
@end
void OSXAPP_SetJavaVM(JavaVM *vm);
#endif /* __THREADUTILITIES_H */
< prev index next >