| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006-2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006-2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 WebMouseEvent result; //(WebInputEvent::Uninitialized()); | 163 WebMouseEvent result; //(WebInputEvent::Uninitialized()); |
| 164 | 164 |
| 165 switch (message) { | 165 switch (message) { |
| 166 case WM_MOUSEMOVE: | 166 case WM_MOUSEMOVE: |
| 167 result.type = WebInputEvent::MouseMove; | 167 result.type = WebInputEvent::MouseMove; |
| 168 if (wparam & MK_LBUTTON) | 168 if (wparam & MK_LBUTTON) |
| 169 result.button = WebMouseEvent::ButtonLeft; | 169 result.button = WebMouseEvent::ButtonLeft; |
| 170 else if (wparam & MK_MBUTTON) | 170 else if (wparam & MK_MBUTTON) |
| 171 result.button = WebMouseEvent::ButtonMiddle; | 171 result.button = WebMouseEvent::ButtonMiddle; |
| 172 else if (wparam & MK_RBUTTON) | 172 else if (wparam & MK_RBUTTON) |
| 173 result.button = WebMouseEvent::ButtonMiddle; | 173 result.button = WebMouseEvent::ButtonRight; |
| 174 else | 174 else |
| 175 result.button = WebMouseEvent::ButtonNone; | 175 result.button = WebMouseEvent::ButtonNone; |
| 176 break; | 176 break; |
| 177 case WM_MOUSELEAVE: | 177 case WM_MOUSELEAVE: |
| 178 result.type = WebInputEvent::MouseLeave; | 178 result.type = WebInputEvent::MouseLeave; |
| 179 result.button = WebMouseEvent::ButtonNone; | 179 result.button = WebMouseEvent::ButtonNone; |
| 180 // set the current mouse position (relative to the client area of the | 180 // set the current mouse position (relative to the client area of the |
| 181 // current window) since none is specified for this event | 181 // current window) since none is specified for this event |
| 182 lparam = GetRelativeCursorPos(hwnd); | 182 lparam = GetRelativeCursorPos(hwnd); |
| 183 break; | 183 break; |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 result.wheelTicksX = wheelDelta; | 395 result.wheelTicksX = wheelDelta; |
| 396 } else { | 396 } else { |
| 397 result.deltaY = scrollDelta; | 397 result.deltaY = scrollDelta; |
| 398 result.wheelTicksY = wheelDelta; | 398 result.wheelTicksY = wheelDelta; |
| 399 } | 399 } |
| 400 | 400 |
| 401 return result; | 401 return result; |
| 402 } | 402 } |
| 403 | 403 |
| 404 } // namespace WebKit | 404 } // namespace WebKit |
| OLD | NEW |