/* * OpenClonk, http://www.openclonk.org * * Copyright (c) 2006-2007, Julian Raschke * Copyright (c) 2010-2016, The OpenClonk Team and contributors * * Distributed under the terms of the ISC license; see accompanying file * "COPYING" for details. * * "Clonk" is a registered trademark of Matthes Bender, used with permission. * See accompanying file "TRADEMARK" for details. * * To redistribute this file separately, substitute the full license texts * for the above references. */ /* SDLMain.m - main entry point for our Cocoa-ized SDL app Initial Version: Darrell Walisser Non-NIB-Code & other changes: Max Horn Feel free to customize this file to suit your needs */ #include "C4Include.h" #include "gui/C4KeyboardInput.h" #import #ifdef USE_COCOA #import "editor/C4EditorWindowController.h" #endif @interface C4AppDelegate: NSObject { NSMutableArray *gatheredArguments; NSString *addonSupplied; #ifdef USE_COCOA C4EditorWindowController *editorWindowController; C4WindowController *gameWindowController; #endif BOOL running; std::vector args; } - (BOOL) argsLookLikeItShouldBeInstallation; - (void)makeFakeArgs; - (BOOL)installAddOn; - (void)terminate:(NSApplication*)sender; + (C4AppDelegate*) instance; + (BOOL) isEditorAndGameRunning; #ifdef USE_COCOA @property(weak, readonly) NSMenuItem* addViewportForPlayerMenuItem; @property(weak, readonly) NSMenuItem* kickPlayerMenuItem; @property(readwrite, strong) C4EditorWindowController* editorWindowController; @property(readwrite, strong) C4WindowController* gameWindowController; @property(weak, readonly) NSMenuItem* recordMenuItem; @property(weak, readonly) NSMenuItem* netMenu; @property(weak) NSMenuItem* toggleFullScreen; #endif @end