3969N/A#import <AppKit/AppKit.h>
3969N/A+ (void) addDefaultHelpMenu;
3969N/A [[NSNotificationCenter defaultCenter] postNotificationName:CMenuBarDidReuseItemNotification object:theMainMenu];
3969N/A [theMainMenu removeItemAtIndex:[[removedMenuArray objectAtIndex:(removedIndex-1)] integerValue]];
3969N/A i = cmenuIndex;
3969N/A for (; i < newMenuListSize; i++) {
3969N/A NSArray *args = [NSArray arrayWithObjects:menubar->fHelpMenu, [NSNumber numberWithInt:-1], nil];
3969N/A-(void) deactivate {
3969N/A NSArray *args = [[NSArray alloc] initWithObjects:theMenu, [NSNumber numberWithInt:-1], nil];
3969N/A [ThreadUtilities performOnMainThread:@selector(nativeAddMenuAtIndex_OnAppKitThread:) on:self withObject:args waitUntilDone:YES];
// See ScreenMenuBar.java -- used to implement setVisible(boolean) by
@synchronized(self) {
[ThreadUtilities performOnMainThread:@selector(nativeAddMenuAtIndex_OnAppKitThread:) on:self withObject:args waitUntilDone:YES];
if (fHelpMenu) {
returnValue = i;
return returnValue;
[ThreadUtilities performOnMainThread:@selector(nativeDeleteMenu_OnAppKitThread:) on:self withObject:[NSNumber numberWithInt:index] waitUntilDone:YES];
@synchronized(self) {
@synchronized(self) {
+ (void) addDefaultHelpMenu {
@synchronized ([CMenuBar class]) {
if (!sSetupHelpMenu) {
if (sDefaultHelpMenu) {
@end
NSMutableArray *args = [[NSMutableArray alloc] initWithObjects:[NSValue valueWithBytes:&cPeerObjGlobal objCType:@encode(jobject)], nil];
[ThreadUtilities performOnMainThread:@selector(_create_OnAppKitThread:) on:[CMenuBar alloc] withObject:args waitUntilDone:YES];
if (aCMenuBar) {
[((CMenuBar *) jlong_to_ptr(menuBarObject)) javaAddMenu:(CMenu *) jlong_to_ptr(menuObject) atIndex:index];