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