From f9158592e1478b2013afc7041d9ed041cf2d2f4a Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 13 Jan 2014 19:47:58 +1000 Subject: Update Irrlicht to 1.8.1. Include actual change markers this time. lol --- .../source/Irrlicht/MacOSX/AppDelegate.mm | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 libraries/irrlicht-1.8.1/source/Irrlicht/MacOSX/AppDelegate.mm (limited to 'libraries/irrlicht-1.8.1/source/Irrlicht/MacOSX/AppDelegate.mm') diff --git a/libraries/irrlicht-1.8.1/source/Irrlicht/MacOSX/AppDelegate.mm b/libraries/irrlicht-1.8.1/source/Irrlicht/MacOSX/AppDelegate.mm new file mode 100644 index 0000000..14a7f86 --- /dev/null +++ b/libraries/irrlicht-1.8.1/source/Irrlicht/MacOSX/AppDelegate.mm @@ -0,0 +1,79 @@ +// Copyright (C) 2005-2006 Etienne Petitjean +// Copyright (C) 2007-2012 Christian Stehno +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in Irrlicht.h + +#import "AppDelegate.h" + +#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ + +@implementation AppDelegate + +- (id)initWithDevice:(irr::CIrrDeviceMacOSX *)device +{ + self = [super init]; + if (self) _device = device; + return (self); +} + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification +{ + _quit = FALSE; +} + +- (void)orderFrontStandardAboutPanel:(id)sender +{ + [NSApp orderFrontStandardAboutPanel:sender]; +} + +- (void)unhideAllApplications:(id)sender +{ + [NSApp unhideAllApplications:sender]; +} + +- (void)hide:(id)sender +{ + [NSApp hide:sender]; +} + +- (void)hideOtherApplications:(id)sender +{ + [NSApp hideOtherApplications:sender]; +} + +- (void)terminate:(id)sender +{ + _quit = TRUE; +} + +- (void)windowWillClose:(id)sender +{ + _quit = TRUE; +} + +- (NSSize)windowWillResize:(NSWindow *)window toSize:(NSSize)proposedFrameSize +{ + if (_device->isResizable()) + return proposedFrameSize; + else + return [window frame].size; +} + +- (void)windowDidResize:(NSNotification *)aNotification +{ + NSWindow *window; + NSRect frame; + + window = [aNotification object]; + frame = [window frame]; + _device->setResize((int)frame.size.width,(int)frame.size.height); +} + +- (BOOL)isQuit +{ + return (_quit); +} + +@end + +#endif // _IRR_COMPILE_WITH_OSX_DEVICE_ -- cgit v1.1