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

#import <Cocoa/Cocoa.h>
#import <jni.h>

@interface GlassMenubar : NSObject
{
@public
	
	NSMenu	*menu;
	
	jlong	_insertjMenuPtr;
	jint	_insertjPos;
	
	jlong	_removejMenuPtr;
	jint	_removejPos;
}

- (id)init;

- (void)_insert;
- (void)_remove;

@end

@interface GlassMenu : NSObject<NSMenuDelegate>
{
    jobject     jMenu;
@public
	
    jobject     jDelegate;
    jobject     jCallback;

    NSMenuItem  *item;
    NSMenu      *menu;
		
    jlong       _insertSubmenuPtr;
    jint        _insertPos;
	
    jlong       _removeSubmenuPtr;
    jint        _removePos;
	
    jstring     _setTitle;
	
    jchar       _setShortcutShortcut;
    jint        _setShortcutModifiers;
	
    jboolean	_setEnabled;
	
    jboolean	_setChecked;
	
    jobject     _setCallback;
   
    jobject     _setPixels;
}

// Menu
- (id)initWithJavajdelegate:(jobject)jdelegate 
                     jtitle:(jstring)jtitle 
                   jenabled:(jboolean)jenabled;

// MenuItem
- (id)initWithJavajdelegate:(jobject)jdelegate jtitle:(jstring)jtitle jshortcut:(jchar)jshortcut jmodifiers:(int)jmodifiers jicon:(jobject)jicon jenabled:(jboolean)jenabled jchecked:(jboolean)jchecked jcallback:(jobject)jcallback;

- (void)action:(id)sender;

- (void)_insert;
- (void)_remove;
- (void)_setTitle;
- (void)_setShortcut;
- (void)_setEnabled;
- (void)_setChecked;
- (void)_setCallback;
- (void)_setPixels;

@end
