/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
#import "CMenu.h"
#import "CMenuBar.h"
#import "ThreadUtilities.h"
#import "sun_lwawt_macosx_CMenu.h"
// Create the new NSMenu
if (self) {
}
return self;
}
- (void)dealloc {
[super dealloc];
}
//- (void)finalize { [super finalize]; }
[ThreadUtilities performOnMainThread:@selector(addNativeItem_OnAppKitThread:) on:self withObject:submenu waitUntilDone:YES];
}
[ThreadUtilities performOnMainThread:@selector(addNativeItem_OnAppKitThread:) on:self withObject:theMenuItem waitUntilDone:YES];
}
}
if (title) {
[ThreadUtilities performOnMainThread:@selector(setNativeMenuTitle_OnAppKitThread:) on:self withObject:title waitUntilDone:YES];
}
}
// If we are a submenu we need to set our name in the parent menu's menu item.
if (parent) {
}
}
- (void)addSeparator {
// Nothing calls this, which is good because we need a CMenuItem here.
}
[ThreadUtilities performOnMainThread:@selector(deleteNativeJavaItem_OnAppKitThread:) on:self withObject:[NSNumber numberWithInt:index] waitUntilDone:YES];
}
}
}
}
}
@synchronized(self) {
}
}
- (NSString *)description {
}
@end
// We use an array here only to be able to get a return value
NSMutableArray *args = [[NSMutableArray alloc] initWithObjects:[NSValue valueWithBytes:&cPeerObjGlobal objCType:@encode(jobject)], nil];
[ThreadUtilities performOnMainThread:@selector(_create_OnAppKitThread:) on:[CMenu alloc] withObject:args waitUntilDone:YES];
return 0L;
}
return aCMenu;
}
/*
* Class: sun_lwawt_macosx_CMenu
* Method: nativeCreateSubMenu
* Signature: (J)J
*/
{
// Add it to the parent menu
if (aCMenu) {
}
return ptr_to_jlong(aCMenu);
}
/*
* Class: sun_lwawt_macosx_CMenu
* Method: nativeCreateMenu
* Signature: (JZ)J
*/
{
// Add it to the menu bar.
// If the menu is already the help menu (because we are creating an entire
// menu bar) we need to note that now, because we can't rely on
// setHelpMenu() being called again.
if (isHelpMenu == JNI_TRUE) {
}
if (aCMenu) {
}
return ptr_to_jlong(aCMenu);
}
/*
* Class: sun_lwawt_macosx_CMenu
* Method: nativeSetMenuTitle
*/
{
// Set the menu's title.
}
/*
* Class: sun_lwawt_macosx_CMenu
* Method: nativeAddSeparator
* Signature: (J)V
*/
{
// Add a separator item.
}
/*
* Class: sun_lwawt_macosx_CMenu
* Method: nativeDeleteItem
* Signature: (JI)V
*/
{
// Remove the specified item.
}
/*
* Class: sun_lwawt_macosx_CMenu
* Method: nativeGetNSMenu
* Signature: (J)J
*/
{
// Strong retain this menu; it'll get released in Java_apple_laf_ScreenMenu_addMenuListeners
if (nsMenu) {
}
return ptr_to_jlong(nsMenu);
}