/*
 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 */

#import <Cocoa/Cocoa.h>

@interface NSApplication (NiblessAdditions)

-(void)setAppleMenu:(NSMenu *)aMenu;

@end

@interface GlassApplication : NSObject <NSApplicationDelegate>
{
    BOOL			started;

    jobject			jApplication;
    jobject			jLaunchable;
    jobjectArray		jLaunchableArgs;
    jboolean			jEmbedded;
    jlong                       jshareContextPtr;
}

- (id)initWithEnv:(JNIEnv*)env application:(jobject)application launchable:(jobject)launchable args:(jobjectArray)launchableArgs embedded:(jboolean)isEmbedded classLoader:(jobject)classLoader shareContextPtr:(jlong)shareContextPtr;
- (void)runLoop:(id)selector;
- (BOOL)started;
+ (NSOpenGLContext*)getShareContext;

+ (jobject)enterNestedEventLoopWithEnv:(JNIEnv*)env;
+ (void)leaveNestedEventLoopWithEnv:(JNIEnv*)env retValue:(jobject)retValue;

@end
