aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/MacOSX/AppDelegate.mm
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/MacOSX/AppDelegate.mm158
1 files changed, 79 insertions, 79 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/MacOSX/AppDelegate.mm b/libraries/irrlicht-1.8/source/Irrlicht/MacOSX/AppDelegate.mm
index 14a7f86..a8b2915 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/MacOSX/AppDelegate.mm
+++ b/libraries/irrlicht-1.8/source/Irrlicht/MacOSX/AppDelegate.mm
@@ -1,79 +1,79 @@
1// Copyright (C) 2005-2006 Etienne Petitjean 1// Copyright (C) 2005-2006 Etienne Petitjean
2// Copyright (C) 2007-2012 Christian Stehno 2// Copyright (C) 2007-2012 Christian Stehno
3// This file is part of the "Irrlicht Engine". 3// This file is part of the "Irrlicht Engine".
4// For conditions of distribution and use, see copyright notice in Irrlicht.h 4// For conditions of distribution and use, see copyright notice in Irrlicht.h
5 5
6#import "AppDelegate.h" 6#import "AppDelegate.h"
7 7
8#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ 8#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
9 9
10@implementation AppDelegate 10@implementation AppDelegate
11 11
12- (id)initWithDevice:(irr::CIrrDeviceMacOSX *)device 12- (id)initWithDevice:(irr::CIrrDeviceMacOSX *)device
13{ 13{
14 self = [super init]; 14 self = [super init];
15 if (self) _device = device; 15 if (self) _device = device;
16 return (self); 16 return (self);
17} 17}
18 18
19- (void)applicationDidFinishLaunching:(NSNotification *)aNotification 19- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
20{ 20{
21 _quit = FALSE; 21 _quit = FALSE;
22} 22}
23 23
24- (void)orderFrontStandardAboutPanel:(id)sender 24- (void)orderFrontStandardAboutPanel:(id)sender
25{ 25{
26 [NSApp orderFrontStandardAboutPanel:sender]; 26 [NSApp orderFrontStandardAboutPanel:sender];
27} 27}
28 28
29- (void)unhideAllApplications:(id)sender 29- (void)unhideAllApplications:(id)sender
30{ 30{
31 [NSApp unhideAllApplications:sender]; 31 [NSApp unhideAllApplications:sender];
32} 32}
33 33
34- (void)hide:(id)sender 34- (void)hide:(id)sender
35{ 35{
36 [NSApp hide:sender]; 36 [NSApp hide:sender];
37} 37}
38 38
39- (void)hideOtherApplications:(id)sender 39- (void)hideOtherApplications:(id)sender
40{ 40{
41 [NSApp hideOtherApplications:sender]; 41 [NSApp hideOtherApplications:sender];
42} 42}
43 43
44- (void)terminate:(id)sender 44- (void)terminate:(id)sender
45{ 45{
46 _quit = TRUE; 46 _quit = TRUE;
47} 47}
48 48
49- (void)windowWillClose:(id)sender 49- (void)windowWillClose:(id)sender
50{ 50{
51 _quit = TRUE; 51 _quit = TRUE;
52} 52}
53 53
54- (NSSize)windowWillResize:(NSWindow *)window toSize:(NSSize)proposedFrameSize 54- (NSSize)windowWillResize:(NSWindow *)window toSize:(NSSize)proposedFrameSize
55{ 55{
56 if (_device->isResizable()) 56 if (_device->isResizable())
57 return proposedFrameSize; 57 return proposedFrameSize;
58 else 58 else
59 return [window frame].size; 59 return [window frame].size;
60} 60}
61 61
62- (void)windowDidResize:(NSNotification *)aNotification 62- (void)windowDidResize:(NSNotification *)aNotification
63{ 63{
64 NSWindow *window; 64 NSWindow *window;
65 NSRect frame; 65 NSRect frame;
66 66
67 window = [aNotification object]; 67 window = [aNotification object];
68 frame = [window frame]; 68 frame = [window frame];
69 _device->setResize((int)frame.size.width,(int)frame.size.height); 69 _device->setResize((int)frame.size.width,(int)frame.size.height);
70} 70}
71 71
72- (BOOL)isQuit 72- (BOOL)isQuit
73{ 73{
74 return (_quit); 74 return (_quit);
75} 75}
76 76
77@end 77@end
78 78
79#endif // _IRR_COMPILE_WITH_OSX_DEVICE_ 79#endif // _IRR_COMPILE_WITH_OSX_DEVICE_