static OSStatus appCommandHandler(EventHandlerCallRef inCallRef, EventRef inEvent, void* userData) { HICommand command; OSStatus err = eventNotHandledErr; if (GetEventKind(inEvent) == kEventCommandProcess) { GetEventParameter( inEvent, kEventParamDirectObject, typeHICommand, NULL, sizeof(HICommand), NULL, &command ); switch ( command.commandID ) { case kOpenCocoaWindow: // call function to initialize Cocoa err = initializeCocoa(handleCommand); require_noerr(err, CantInitializeCocoa); // call function to show window err = orderWindowFront(); require_noerr(err, CantCallFunction); CantCallFunction: CantInitializeCocoa: break; default: break; } } return err; }
// --------------------------------------------------------------------------- // // ----------- void* bvDefPaletteHisto::ccinit(){ return(initializeCocoa(getapp(),this)); }
// --------------------------------------------------------------------------- // // ----------- void* bvDefPaletteQuickRaster::ccinit(){ return(initializeCocoa(getapp(),this)); }