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> |
11 #include "SkOSWindow_Mac.h" | 11 #include "SkOSWindow_Mac.h" |
12 #include "SkOSMenu.h" | 12 #include "SkOSMenu.h" |
13 #include "SkTypes.h" | 13 #include "SkTypes.h" |
14 #include "SkWindow.h" | 14 #include "SkWindow.h" |
15 #import "SkNSView.h" | 15 #import "SkNSView.h" |
16 #import "SkEventNotifier.h" | 16 #import "SkEventNotifier.h" |
17 #define kINVAL_NSVIEW_EventType "inval-nsview" | 17 #define kINVAL_NSVIEW_EventType "inval-nsview" |
18 | 18 |
19 SK_COMPILE_ASSERT(SK_SUPPORT_GPU, not_implemented_for_non_gpu_build); | 19 static_assert(SK_SUPPORT_GPU, "not_implemented_for_non_gpu_build"); |
20 | 20 |
21 SkOSWindow::SkOSWindow(void* hWnd) : fHWND(hWnd) { | 21 SkOSWindow::SkOSWindow(void* hWnd) : fHWND(hWnd) { |
22 fInvalEventIsPending = false; | 22 fInvalEventIsPending = false; |
23 fGLContext = NULL; | 23 fGLContext = NULL; |
24 fNotifier = [[SkEventNotifier alloc] init]; | 24 fNotifier = [[SkEventNotifier alloc] init]; |
25 } | 25 } |
26 SkOSWindow::~SkOSWindow() { | 26 SkOSWindow::~SkOSWindow() { |
27 [(SkEventNotifier*)fNotifier release]; | 27 [(SkEventNotifier*)fNotifier release]; |
28 } | 28 } |
29 | 29 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |