#import "AppDelegate.h" @interface AppDelegate () @property(weak) IBOutlet NSWindow *window; @end @implementation AppDelegate - (void)applicationDidFinishLaunching:(NSNotification*)n{ self.window.title=@"大鱼调色";[self.window setContentSize:NSMakeSize(540,280)];[self.window center]; NSView*v=[[[NSView alloc]initWithFrame:NSMakeRect(0,0,540,280)]autorelease];v.wantsLayer=YES;v.layer.backgroundColor=[NSColor colorWithSRGBRed:.025 green:.08 blue:.13 alpha:1].CGColor;self.window.contentView=v; NSTextField*title=[NSTextField labelWithString:@"大鱼调色"];title.font=[NSFont boldSystemFontOfSize:28];title.textColor=[NSColor colorWithSRGBRed:.3 green:.75 blue:1 alpha:1];title.frame=NSMakeRect(32,212,460,42);[v addSubview:title]; NSTextField*body=[NSTextField wrappingLabelWithString:@"已安装原生 FxPlug 调色效果。\n\n在 Final Cut Pro 的「效果 → 大鱼调色」中应用,或在 Motion 的滤镜中选择「大鱼调色」。\n\n输入转换、光影、曲线、HSL、色轮与 LUT 均在宿主检查器中编辑。"];body.font=[NSFont systemFontOfSize:14];body.textColor=[NSColor colorWithWhite:.86 alpha:1];body.frame=NSMakeRect(34,65,470,140);[v addSubview:body]; NSButton*b=[NSButton buttonWithTitle:@"打开 Final Cut Pro" target:self action:@selector(openHost:)];b.frame=NSMakeRect(30,20,170,32);[v addSubview:b];[self.window makeKeyAndOrderFront:nil]; } - (void)openHost:(id)sender{NSURL*u=[NSWorkspace.sharedWorkspace URLForApplicationWithBundleIdentifier:@"com.apple.FinalCut"];if(u)[NSWorkspace.sharedWorkspace openApplicationAtURL:u configuration:NSWorkspaceOpenConfiguration.configuration completionHandler:nil];} - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)app{return YES;} @end