< prev index next >

src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m

Print this page
rev 54098 : 8260616: Removing remaining JNF dependencies in the java.desktop module
8259729: Missed JNFInstanceOf -> IsInstanceOf conversion

*** 26,36 **** #include "splashscreen_impl.h" #import <Cocoa/Cocoa.h> #import <objc/objc-auto.h> - #import <JavaNativeFoundation/JavaNativeFoundation.h> #import "NSApplicationAWT.h" #include <sys/time.h> #include <pthread.h> #include <iconv.h> --- 26,35 ----
*** 200,210 **** splash->screenFormat.byteOrder = 1 ? BYTE_ORDER_LSBFIRST : BYTE_ORDER_MSBFIRST; splash->screenFormat.depthBytes = 4; // If we are running SWT we should not start a runLoop if (!isSWTRunning()) { ! [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^() { [NSApplicationAWT runAWTLoopWithApp:[NSApplicationAWT sharedApplication]]; }]; } } --- 199,209 ---- splash->screenFormat.byteOrder = 1 ? BYTE_ORDER_LSBFIRST : BYTE_ORDER_MSBFIRST; splash->screenFormat.depthBytes = 4; // If we are running SWT we should not start a runLoop if (!isSWTRunning()) { ! [ThreadUtilities performOnMainThreadWaiting:NO block:^() { [NSApplicationAWT runAWTLoopWithApp:[NSApplicationAWT sharedApplication]]; }]; } }
*** 216,226 **** void SplashDonePlatform(Splash * splash) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; pthread_mutex_destroy(&splash->lock); ! [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){ if (splash->window) { [splash->window orderOut:nil]; [splash->window release]; } }]; --- 215,225 ---- void SplashDonePlatform(Splash * splash) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; pthread_mutex_destroy(&splash->lock); ! [ThreadUtilities performOnMainThreadWaiting:YES block:^(){ if (splash->window) { [splash->window orderOut:nil]; [splash->window release]; } }];
*** 255,265 **** void SplashRedrawWindow(Splash * splash) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; ! [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){ // drop the reference to the old view and image [splash->window setContentView: nil]; SplashUpdateScreenData(splash); // NSDeviceRGBColorSpace vs. NSCalibratedRGBColorSpace ? --- 254,264 ---- void SplashRedrawWindow(Splash * splash) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; ! [ThreadUtilities performOnMainThreadWaiting:YES block:^(){ // drop the reference to the old view and image [splash->window setContentView: nil]; SplashUpdateScreenData(splash); // NSDeviceRGBColorSpace vs. NSCalibratedRGBColorSpace ?
*** 314,324 **** } void SplashReconfigureNow(Splash * splash) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; ! [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){ SplashCenter(splash); if (!splash->window) { return; } --- 313,323 ---- } void SplashReconfigureNow(Splash * splash) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; ! [ThreadUtilities performOnMainThreadWaiting:YES block:^(){ SplashCenter(splash); if (!splash->window) { return; }
*** 403,413 **** pipe(splash->controlpipe); fcntl(splash->controlpipe[0], F_SETFL, fcntl(splash->controlpipe[0], F_GETFL, 0) | O_NONBLOCK); splash->time = SplashTime(); splash->currentFrame = 0; ! [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){ SplashCenter(splash); splash->window = (void*) [[NSWindow alloc] initWithContentRect: NSMakeRect(splash->x, splash->y, splash->width, splash->height) styleMask: NSBorderlessWindowMask --- 402,412 ---- pipe(splash->controlpipe); fcntl(splash->controlpipe[0], F_SETFL, fcntl(splash->controlpipe[0], F_GETFL, 0) | O_NONBLOCK); splash->time = SplashTime(); splash->currentFrame = 0; ! [ThreadUtilities performOnMainThreadWaiting:YES block:^(){ SplashCenter(splash); splash->window = (void*) [[NSWindow alloc] initWithContentRect: NSMakeRect(splash->x, splash->y, splash->width, splash->height) styleMask: NSBorderlessWindowMask
*** 418,428 **** [splash->window setOpaque: NO]; [splash->window setBackgroundColor: [NSColor clearColor]]; }]; fflush(stdout); if (splash->window) { ! [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){ [splash->window orderFrontRegardless]; }]; SplashRedrawWindow(splash); SplashEventLoop(splash); } --- 417,427 ---- [splash->window setOpaque: NO]; [splash->window setBackgroundColor: [NSColor clearColor]]; }]; fflush(stdout); if (splash->window) { ! [ThreadUtilities performOnMainThreadWaiting:YES block:^(){ [splash->window orderFrontRegardless]; }]; SplashRedrawWindow(splash); SplashEventLoop(splash); }
< prev index next >