aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/views/win
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-08 16:17:50 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-08 16:17:50 +0000
commit4d5c26de0a24f86c37c1da8b0e30d11a550ea67b (patch)
treeae6412d266668e9f7ca91e9ef56d65ddb3b6e9ac /src/views/win
parent9aaf36de60c2a2e7a6b441bb7db9521a4fd59e08 (diff)
pass modifier keys to click events (e.g. control | shift etc.)
Review URL: https://codereview.appspot.com/7062054 git-svn-id: http://skia.googlecode.com/svn/trunk@7082 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/views/win')
-rw-r--r--src/views/win/SkOSWindow_win.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/views/win/SkOSWindow_win.cpp b/src/views/win/SkOSWindow_win.cpp
index 150be6aa70..5ae00cbc48 100644
--- a/src/views/win/SkOSWindow_win.cpp
+++ b/src/views/win/SkOSWindow_win.cpp
@@ -103,6 +103,10 @@ static SkKey winToskKey(WPARAM vk) {
return kNONE_SkKey;
}
+static unsigned getModifiers(UINT message) {
+ return 0; // TODO
+}
+
bool SkOSWindow::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
switch (message) {
case WM_KEYDOWN: {
@@ -146,15 +150,18 @@ bool SkOSWindow::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
} break;
case WM_LBUTTONDOWN:
- this->handleClick(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), Click::kDown_State);
+ this->handleClick(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam),
+ Click::kDown_State, getModifiers(message));
return true;
case WM_MOUSEMOVE:
- this->handleClick(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), Click::kMoved_State);
+ this->handleClick(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam),
+ Click::kMoved_State, getModifiers(message));
return true;
case WM_LBUTTONUP:
- this->handleClick(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), Click::kUp_State);
+ this->handleClick(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam),
+ Click::kUp_State, getModifiers(message));
return true;
case WM_EVENT_CALLBACK: