| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 // Toggle modifiers for all events. Danger: these are not reflected | 160 // Toggle modifiers for all events. Danger: these are not reflected |
| 161 // into WebCore, so round-tripping from WebInputEvent to a WebCore | 161 // into WebCore, so round-tripping from WebInputEvent to a WebCore |
| 162 // event and back will not preserve these flags. | 162 // event and back will not preserve these flags. |
| 163 CapsLockOn = 1 << 9, | 163 CapsLockOn = 1 << 9, |
| 164 NumLockOn = 1 << 10, | 164 NumLockOn = 1 << 10, |
| 165 | 165 |
| 166 // Left/right modifiers for keyboard events. | 166 // Left/right modifiers for keyboard events. |
| 167 IsLeft = 1 << 11, | 167 IsLeft = 1 << 11, |
| 168 IsRight = 1 << 12, | 168 IsRight = 1 << 12, |
| 169 | |
| 170 // Last input event to be sent for the current vsync interval. If this | |
| 171 // flag is set, the sender guarantees that no more input events will be | |
| 172 // delivered until the next vsync and the receiver can schedule | |
| 173 // rendering accordingly. If it isn't set, the receiver should not make | |
| 174 // any assumptions about the delivery times of future input events | |
| 175 // w.r.t. vsync. | |
| 176 IsLastInputEventForCurrentVSync = 1 << 13, | |
| 177 }; | 169 }; |
| 178 | 170 |
| 179 static const int InputModifiers = ShiftKey | ControlKey | AltKey | MetaKey; | 171 static const int InputModifiers = ShiftKey | ControlKey | AltKey | MetaKey; |
| 180 | 172 |
| 181 double timeStampSeconds; // Seconds since epoch. | 173 double timeStampSeconds; // Seconds since epoch. |
| 182 unsigned size; // The size of this structure, for serialization. | 174 unsigned size; // The size of this structure, for serialization. |
| 183 Type type; | 175 Type type; |
| 184 int modifiers; | 176 int modifiers; |
| 185 | 177 |
| 186 // Returns true if the WebInputEvent |type| is a mouse event. | 178 // Returns true if the WebInputEvent |type| is a mouse event. |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 | 489 |
| 498 unsigned touchesLength; | 490 unsigned touchesLength; |
| 499 // List of all touches, regardless of state. | 491 // List of all touches, regardless of state. |
| 500 WebTouchPoint touches[touchesLengthCap]; | 492 WebTouchPoint touches[touchesLengthCap]; |
| 501 | 493 |
| 502 // Whether the event can be canceled (with preventDefault). If true then the
browser | 494 // Whether the event can be canceled (with preventDefault). If true then the
browser |
| 503 // must wait for an ACK for this event. If false then no ACK IPC is expected
. | 495 // must wait for an ACK for this event. If false then no ACK IPC is expected
. |
| 504 // See comment at the top for why an int is used here instead of a bool. | 496 // See comment at the top for why an int is used here instead of a bool. |
| 505 int cancelable; | 497 int cancelable; |
| 506 | 498 |
| 499 // Whether the event will produce scroll-inducing events if uncanceled. This |
| 500 // will be true for touchmove events after the platform slop region has been |
| 501 // exceeded and fling-generating touchend events. Note that this doesn't |
| 502 // necessarily mean content will scroll, only that scroll events will be |
| 503 // generated. |
| 504 // See comment at the top for why an int is used here instead of a bool. |
| 505 int causesScrollingIfUncanceled; |
| 506 |
| 507 WebTouchEvent() | 507 WebTouchEvent() |
| 508 : WebInputEvent(sizeof(WebTouchEvent)) | 508 : WebInputEvent(sizeof(WebTouchEvent)) |
| 509 , touchesLength(0) | 509 , touchesLength(0) |
| 510 , cancelable(true) | 510 , cancelable(true) |
| 511 , causesScrollingIfUncanceled(false) |
| 511 { | 512 { |
| 512 } | 513 } |
| 513 }; | 514 }; |
| 514 | 515 |
| 515 #pragma pack(pop) | 516 #pragma pack(pop) |
| 516 | 517 |
| 517 } // namespace blink | 518 } // namespace blink |
| 518 | 519 |
| 519 #endif | 520 #endif |
| OLD | NEW |