1
// Copyright (C) 2005-2006 Etienne Petitjean
2
// Copyright (C) 2007-2011 Christian Stehno
3
// This file is part of the "Irrlicht Engine".
4
// For conditions of distribution and use, see copyright notice in Irrlicht.h
6
#import "AppDelegate.h"
8
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
10
@implementation AppDelegate
12
- (id)initWithDevice:(irr::CIrrDeviceMacOSX *)device
15
if (self) _device = device;
19
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
24
- (void)orderFrontStandardAboutPanel:(id)sender
26
[NSApp orderFrontStandardAboutPanel:sender];
29
- (void)unhideAllApplications:(id)sender
31
[NSApp unhideAllApplications:sender];
34
- (void)hide:(id)sender
39
- (void)hideOtherApplications:(id)sender
41
[NSApp hideOtherApplications:sender];
44
- (void)terminate:(id)sender
49
- (void)windowWillClose:(id)sender
54
- (NSSize)windowWillResize:(NSWindow *)window toSize:(NSSize)proposedFrameSize
56
if (_device->isResizable())
57
return proposedFrameSize;
59
return [window frame].size;
62
- (void)windowDidResize:(NSNotification *)aNotification
67
window = [aNotification object];
68
frame = [window frame];
69
_device->setResize((int)frame.size.width,(int)frame.size.height);
79
#endif // _IRR_COMPILE_WITH_OSX_DEVICE_