Lines Matching refs:result
92 WebKeyboardEvent result;
98 result.timeStampSeconds = GetMessageTime() / 1000.0;
100 result.windowsKeyCode = result.nativeKeyCode = static_cast<int>(wparam);
104 result.isSystemKey = true;
106 result.type = WebInputEvent::RawKeyDown;
109 result.isSystemKey = true;
111 result.type = WebInputEvent::KeyUp;
114 result.type = WebInputEvent::Char;
117 result.isSystemKey = true;
118 result.type = WebInputEvent::Char;
120 result.type = WebInputEvent::Char;
126 if (result.type == WebInputEvent::Char || result.type == WebInputEvent::RawKeyDown) {
127 result.text[0] = result.windowsKeyCode;
128 result.unmodifiedText[0] = result.windowsKeyCode;
130 if (result.type != WebInputEvent::Char)
131 result.setKeyIdentifierFromWindowsKeyCode();
134 result.modifiers |= WebInputEvent::ShiftKey;
136 result.modifiers |= WebInputEvent::ControlKey;
138 result.modifiers |= WebInputEvent::AltKey;
143 result.modifiers |= WebInputEvent::IsAutoRepeat;
145 result.modifiers |= WebInputEvent::IsKeyPad;
147 return result;
171 WebMouseEvent result; //(WebInputEvent::Uninitialized());
175 result.type = WebInputEvent::MouseMove;
177 result.button = WebMouseEvent::ButtonLeft;
179 result.button = WebMouseEvent::ButtonMiddle;
181 result.button = WebMouseEvent::ButtonRight;
183 result.button = WebMouseEvent::ButtonNone;
186 result.type = WebInputEvent::MouseLeave;
187 result.button = WebMouseEvent::ButtonNone;
194 result.type = WebInputEvent::MouseDown;
195 result.button = WebMouseEvent::ButtonLeft;
199 result.type = WebInputEvent::MouseDown;
200 result.button = WebMouseEvent::ButtonMiddle;
204 result.type = WebInputEvent::MouseDown;
205 result.button = WebMouseEvent::ButtonRight;
208 result.type = WebInputEvent::MouseUp;
209 result.button = WebMouseEvent::ButtonLeft;
212 result.type = WebInputEvent::MouseUp;
213 result.button = WebMouseEvent::ButtonMiddle;
216 result.type = WebInputEvent::MouseUp;
217 result.button = WebMouseEvent::ButtonRight;
227 result.timeStampSeconds = GetMessageTime() / 1000.0;
231 result.x = static_cast<short>(LOWORD(lparam));
232 result.y = static_cast<short>(HIWORD(lparam));
233 result.windowX = result.x;
234 result.windowY = result.y;
236 POINT globalPoint = { result.x, result.y };
239 result.globalX = globalPoint.x;
240 result.globalY = globalPoint.y;
250 double currentTime = result.timeStampSeconds;
252 (abs(lastClickPositionX - result.x) > (GetSystemMetrics(SM_CXDOUBLECLK) / 2))
253 || (abs(lastClickPositionY - result.y) > (GetSystemMetrics(SM_CYDOUBLECLK) / 2))
256 if (result.type == WebInputEvent::MouseDown) {
257 if (!cancelPreviousClick && (result.button == lastClickButton))
261 lastClickPositionX = result.x;
262 lastClickPositionY = result.y;
265 lastClickButton = result.button;
266 } else if (result.type == WebInputEvent::MouseMove
267 || result.type == WebInputEvent::MouseLeave) {
275 result.clickCount = gLastClickCount;
280 result.modifiers |= WebInputEvent::ControlKey;
282 result.modifiers |= WebInputEvent::ShiftKey;
284 result.modifiers |= WebInputEvent::AltKey;
286 result.modifiers |= WebInputEvent::LeftButtonDown;
288 result.modifiers |= WebInputEvent::MiddleButtonDown;
290 result.modifiers |= WebInputEvent::RightButtonDown;
292 return result;
300 WebMouseWheelEvent result; //(WebInputEvent::Uninitialized());
302 result.type = WebInputEvent::MouseWheel;
308 result.timeStampSeconds = GetMessageTime() / 1000.0;
310 result.button = WebMouseEvent::ButtonNone;
333 result.globalX = cursorPosition.x;
334 result.globalY = cursorPosition.y;
345 result.scrollByPage = true;
349 result.scrollByPage = true;
363 result.globalX = static_cast<short>(LOWORD(lparam));
364 result.globalY = static_cast<short>(HIWORD(lparam));
377 result.modifiers |= WebInputEvent::ShiftKey;
379 result.modifiers |= WebInputEvent::ControlKey;
381 result.modifiers |= WebInputEvent::AltKey;
383 result.modifiers |= WebInputEvent::LeftButtonDown;
385 result.modifiers |= WebInputEvent::MiddleButtonDown;
387 result.modifiers |= WebInputEvent::RightButtonDown;
390 POINT clientPoint = { result.globalX, result.globalY };
392 result.x = clientPoint.x;
393 result.y = clientPoint.y;
394 result.windowX = result.x;
395 result.windowY = result.y;
419 result.scrollByPage = true;
420 if (!result.scrollByPage)
427 result.deltaX = scrollDelta;
428 result.wheelTicksX = wheelDelta;
430 result.deltaY = scrollDelta;
431 result.wheelTicksY = wheelDelta;
434 return result;