OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "SkTypes.h" | 8 #include "SkTypes.h" |
9 | 9 |
10 #if defined(SK_BUILD_FOR_WIN) | 10 #if defined(SK_BUILD_FOR_WIN) |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 SkKey key = winToskKey(wParam); | 140 SkKey key = winToskKey(wParam); |
141 if (kNONE_SkKey != key) { | 141 if (kNONE_SkKey != key) { |
142 this->handleKeyUp(key); | 142 this->handleKeyUp(key); |
143 return true; | 143 return true; |
144 } | 144 } |
145 } break; | 145 } break; |
146 case WM_UNICHAR: | 146 case WM_UNICHAR: |
147 this->handleChar((SkUnichar) wParam); | 147 this->handleChar((SkUnichar) wParam); |
148 return true; | 148 return true; |
149 case WM_CHAR: { | 149 case WM_CHAR: { |
150 this->handleChar(SkUTF8_ToUnichar((char*)&wParam)); | 150 const uint16_t* c = reinterpret_cast<uint16_t*>(&wParam); |
| 151 this->handleChar(SkUTF16_NextUnichar(&c)); |
151 return true; | 152 return true; |
152 } break; | 153 } break; |
153 case WM_SIZE: { | 154 case WM_SIZE: { |
154 INT width = LOWORD(lParam); | 155 INT width = LOWORD(lParam); |
155 INT height = HIWORD(lParam); | 156 INT height = HIWORD(lParam); |
156 this->resize(width, height); | 157 this->resize(width, height); |
157 break; | 158 break; |
158 } | 159 } |
159 case WM_PAINT: { | 160 case WM_PAINT: { |
160 PAINTSTRUCT ps; | 161 PAINTSTRUCT ps; |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 } | 771 } |
771 | 772 |
772 void SkOSWindow::closeWindow() { | 773 void SkOSWindow::closeWindow() { |
773 DestroyWindow((HWND)fHWND); | 774 DestroyWindow((HWND)fHWND); |
774 if (fFullscreen) { | 775 if (fFullscreen) { |
775 DestroyWindow((HWND)fSavedWindowState.fHWND); | 776 DestroyWindow((HWND)fSavedWindowState.fHWND); |
776 } | 777 } |
777 gHwndToOSWindowMap.remove(fHWND); | 778 gHwndToOSWindowMap.remove(fHWND); |
778 } | 779 } |
779 #endif | 780 #endif |
OLD | NEW |