| OLD | NEW |
| 1 #import "SampleAppDelegate.h" | 1 #import "HelloWorldDelegate.h" |
| 2 | 2 |
| 3 #include "SkApplication.h" | 3 #include "SkApplication.h" |
| 4 | 4 |
| 5 @implementation SampleAppDelegate | 5 @implementation HelloWorldDelegate |
| 6 @synthesize fWindow, fView, fOptions; | 6 @synthesize fWindow, fView, fOptions; |
| 7 | 7 |
| 8 // for iOS |
| 8 -(void) applicationDidFinishLaunching:(NSNotification *)aNotification { | 9 -(void) applicationDidFinishLaunching:(NSNotification *)aNotification { |
| 9 //Load specified skia views after launching | 10 //Load specified skia views after launching |
| 10 fView.fOptionsDelegate = fOptions; | 11 fView.fOptionsDelegate = fOptions; |
| 11 [fWindow setAcceptsMouseMovedEvents:YES]; | 12 [fWindow setAcceptsMouseMovedEvents:YES]; |
| 12 [fOptions registerMenus:fView.fWind->getMenus()]; | 13 // [fOptions registerMenus:fView.fWind->getMenus()]; |
| 13 } | 14 } |
| 14 | 15 |
| 15 - (IBAction)toiPadSize:(id)sender { | 16 - (IBAction)toiPadSize:(id)sender { |
| 16 NSRect frame = NSMakeRect(fWindow.frame.origin.x, fWindow.frame.origin.y, 76
8, 1024); | 17 NSRect frame = NSMakeRect(fWindow.frame.origin.x, fWindow.frame.origin.y, 76
8, 1024); |
| 17 [fWindow setFrame:frame display:YES animate:YES]; | 18 [fWindow setFrame:frame display:YES animate:YES]; |
| 18 } | 19 } |
| 19 | 20 |
| 20 - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sende
r { | 21 - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sende
r { |
| 21 [fView freeNativeWind]; | 22 [fView freeNativeWind]; |
| 22 application_term(); | 23 application_term(); |
| 23 return NSTerminateNow; | 24 return NSTerminateNow; |
| 24 } | 25 } |
| 25 | 26 |
| 26 @end | 27 @end |
| OLD | NEW |