Index: experimental/SkiaExamples/SkSampleNSView.mm |
diff --git a/src/views/mac/SkSampleNSView.mm b/experimental/SkiaExamples/SkSampleNSView.mm |
similarity index 51% |
copy from src/views/mac/SkSampleNSView.mm |
copy to experimental/SkiaExamples/SkSampleNSView.mm |
index ce5f8aab0a0b24546bdb9fa0b809deb6d5624f29..af4989cba7532b2a1069d6497840a2554e6c9447 100644 |
--- a/src/views/mac/SkSampleNSView.mm |
+++ b/experimental/SkiaExamples/SkSampleNSView.mm |
@@ -7,13 +7,15 @@ |
*/ |
#import "SkSampleNSView.h" |
-#include "SampleApp.h" |
+ |
+#include "SkApplication.h" |
+ |
#include <crt_externs.h> |
@implementation SkSampleNSView |
- (id)initWithDefaults { |
if ((self = [super initWithDefaults])) { |
- fWind = new SampleWindow(self, *_NSGetArgc(), *_NSGetArgv(), NULL); |
+ fWind = create_sk_window(self, *_NSGetArgc(), *_NSGetArgv()); |
} |
return self; |
} |
@@ -22,15 +24,4 @@ |
delete fWind; |
[super dealloc]; |
} |
- |
-- (void)swipeWithEvent:(NSEvent *)event { |
- CGFloat x = [event deltaX]; |
- if (x < 0) |
- ((SampleWindow*)fWind)->previousSample(); |
- else if (x > 0) |
- ((SampleWindow*)fWind)->nextSample(); |
- else |
- ((SampleWindow*)fWind)->showOverview(); |
-} |
- |
@end |