diff options
Diffstat (limited to 'example/mac/HelloWorldNSView.mm')
-rw-r--r-- | example/mac/HelloWorldNSView.mm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/example/mac/HelloWorldNSView.mm b/example/mac/HelloWorldNSView.mm new file mode 100644 index 0000000000..dcc82e34dc --- /dev/null +++ b/example/mac/HelloWorldNSView.mm @@ -0,0 +1,27 @@ +/* + * Copyright 2015 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#import "HelloWorldNSView.h" + +#include "SkApplication.h" +#include <crt_externs.h> + +@implementation HelloWorldNSView + +- (id)initWithDefaults { + if ((self = [super initWithDefaults])) { + fWind = create_sk_window(self, *_NSGetArgc(), *_NSGetArgv()); + } + return self; +} + +- (void)dealloc { + delete fWind; + [super dealloc]; +} + +@end |