aboutsummaryrefslogtreecommitdiffhomepage
path: root/example/mac/HelloWorldDelegate.mm
blob: f3c08107a2077e19d25eefc6c459567c4a23deff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#import "HelloWorldDelegate.h"

#include "SkApplication.h"

@implementation HelloWorldDelegate
@synthesize fWindow, fView, fOptions;

// for iOS
-(void) applicationDidFinishLaunching:(NSNotification *)aNotification {
    //Load specified skia views after launching
    fView.fOptionsDelegate = fOptions;
    [fWindow setAcceptsMouseMovedEvents:YES];
 // [fOptions registerMenus:fView.fWind->getMenus()];
}

- (IBAction)toiPadSize:(id)sender {
    NSRect frame = NSMakeRect(fWindow.frame.origin.x, fWindow.frame.origin.y, 768, 1024);
    [fWindow setFrame:frame display:YES animate:YES];
}

- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
    [fView freeNativeWind];
    application_term();
    return NSTerminateNow;
}

@end