Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Unified Diff: trunk/src/views/win/SkOSWindow_win.cpp

Issue 12706010: Add SkTypeface* parameter to SkScalerContext (and its callers) (Closed) Base URL: http://skia.googlecode.com/svn/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: trunk/src/views/win/SkOSWindow_win.cpp
===================================================================
--- trunk/src/views/win/SkOSWindow_win.cpp (revision 8166)
+++ trunk/src/views/win/SkOSWindow_win.cpp (working copy)
@@ -104,7 +104,23 @@
}
static unsigned getModifiers(UINT message) {
- return 0; // TODO
+ static const struct {
bungeman-skia 2013/03/15 16:12:44 Not sure what this has to do with this change, but
reed1 2013/03/15 17:46:44 Accidentally picked up when I editing on my win ma
+ int fVKey;
+ unsigned fSkMask;
+ } gModi[] = {
+ { VK_SHIFT, kShift_SkModifierKey },
+ { VK_CONTROL, kControl_SkModifierKey },
+ { VK_MENU, kOption_SkModifierKey },
+ };
+
+ unsigned modi = 0;
+ for (size_t i = 0; i < SK_ARRAY_COUNT(gModi); ++i) {
+ // check the high-bit of the returned ushort
+ if (GetKeyState(gModi[i].fVKey) & 0x8000) {
+ modi |= gModi[i].fSkMask;
+ }
+ }
+ return modi;
}
bool SkOSWindow::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
« trunk/src/ports/SkFontHost_win_dw.cpp ('K') | « trunk/src/ports/SkFontHost_win_dw.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698