OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #if defined(SK_BUILD_FOR_MAC) | 8 #if defined(SK_BUILD_FOR_MAC) |
9 | 9 |
10 #import <Cocoa/Cocoa.h> | 10 #import <Cocoa/Cocoa.h> |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 } | 62 } |
63 | 63 |
64 void SkOSWindow::onUpdateMenu(const SkOSMenu* menu) { | 64 void SkOSWindow::onUpdateMenu(const SkOSMenu* menu) { |
65 [(SkNSView*)fHWND onUpdateMenu:menu]; | 65 [(SkNSView*)fHWND onUpdateMenu:menu]; |
66 } | 66 } |
67 | 67 |
68 bool SkOSWindow::attach(SkBackEndTypes attachType, int sampleCount, AttachmentIn
fo* info) { | 68 bool SkOSWindow::attach(SkBackEndTypes attachType, int sampleCount, AttachmentIn
fo* info) { |
69 return [(SkNSView*)fHWND attach:attachType withMSAASampleCount:sampleCount a
ndGetInfo:info]; | 69 return [(SkNSView*)fHWND attach:attachType withMSAASampleCount:sampleCount a
ndGetInfo:info]; |
70 } | 70 } |
71 | 71 |
72 void SkOSWindow::detach() { | 72 void SkOSWindow::release() { |
73 [(SkNSView*)fHWND detach]; | 73 [(SkNSView*)fHWND detach]; |
74 } | 74 } |
75 | 75 |
76 void SkOSWindow::present() { | 76 void SkOSWindow::present() { |
77 [(SkNSView*)fHWND present]; | 77 [(SkNSView*)fHWND present]; |
78 } | 78 } |
79 | 79 |
80 void SkOSWindow::closeWindow() { | 80 void SkOSWindow::closeWindow() { |
81 [[(SkNSView*)fHWND window] close]; | 81 [[(SkNSView*)fHWND window] close]; |
82 } | 82 } |
83 | 83 |
84 void SkOSWindow::setVsync(bool enable) { | 84 void SkOSWindow::setVsync(bool enable) { |
85 [(SkNSView*)fHWND setVSync:enable]; | 85 [(SkNSView*)fHWND setVSync:enable]; |
86 } | 86 } |
87 | 87 |
88 bool SkOSWindow::makeFullscreen() { | 88 bool SkOSWindow::makeFullscreen() { |
89 [(SkNSView*)fHWND enterFullScreenMode:[NSScreen mainScreen] withOptions:nil]
; | 89 [(SkNSView*)fHWND enterFullScreenMode:[NSScreen mainScreen] withOptions:nil]
; |
90 return true; | 90 return true; |
91 } | 91 } |
92 | 92 |
93 | 93 |
94 #endif | 94 #endif |
OLD | NEW |