OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 15 matching lines...) Expand all Loading... |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebTouchAction_h | 31 #ifndef WebTouchAction_h |
32 #define WebTouchAction_h | 32 #define WebTouchAction_h |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
36 // Flags for permitted touch actions, specified in http://w3c.github.io/pointere
vents/#the-touch-action-css-property. | 36 // Flags for permitted touch actions, specified in |
| 37 // http://w3c.github.io/pointerevents/#the-touch-action-css-property. |
37 enum WebTouchAction { | 38 enum WebTouchAction { |
38 WebTouchActionNone = 0x0, | 39 WebTouchActionNone = 0x0, |
39 WebTouchActionPanLeft = 0x1, | 40 WebTouchActionPanLeft = 0x1, |
40 WebTouchActionPanRight = 0x2, | 41 WebTouchActionPanRight = 0x2, |
41 WebTouchActionPanX = WebTouchActionPanLeft | WebTouchActionPanRight, | 42 WebTouchActionPanX = WebTouchActionPanLeft | WebTouchActionPanRight, |
42 WebTouchActionPanUp = 0x4, | 43 WebTouchActionPanUp = 0x4, |
43 WebTouchActionPanDown = 0x8, | 44 WebTouchActionPanDown = 0x8, |
44 WebTouchActionPanY = WebTouchActionPanUp | WebTouchActionPanDown, | 45 WebTouchActionPanY = WebTouchActionPanUp | WebTouchActionPanDown, |
45 WebTouchActionPan = WebTouchActionPanX | WebTouchActionPanY, | 46 WebTouchActionPan = WebTouchActionPanX | WebTouchActionPanY, |
46 WebTouchActionPinchZoom = 0x10, | 47 WebTouchActionPinchZoom = 0x10, |
(...skipping 10 matching lines...) Expand all Loading... |
57 inline WebTouchAction operator&(WebTouchAction a, WebTouchAction b) { | 58 inline WebTouchAction operator&(WebTouchAction a, WebTouchAction b) { |
58 return static_cast<WebTouchAction>(int(a) & int(b)); | 59 return static_cast<WebTouchAction>(int(a) & int(b)); |
59 } | 60 } |
60 inline WebTouchAction& operator&=(WebTouchAction& a, WebTouchAction b) { | 61 inline WebTouchAction& operator&=(WebTouchAction& a, WebTouchAction b) { |
61 return a = a & b; | 62 return a = a & b; |
62 } | 63 } |
63 | 64 |
64 } // namespace blink | 65 } // namespace blink |
65 | 66 |
66 #endif | 67 #endif |
OLD | NEW |