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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 PlatformGestureEventBuilder(WebCore::Widget*, const WebGestureEvent&); | 75 PlatformGestureEventBuilder(WebCore::Widget*, const WebGestureEvent&); |
76 }; | 76 }; |
77 | 77 |
78 class PlatformKeyboardEventBuilder : public WebCore::PlatformKeyboardEvent { | 78 class PlatformKeyboardEventBuilder : public WebCore::PlatformKeyboardEvent { |
79 public: | 79 public: |
80 PlatformKeyboardEventBuilder(const WebKeyboardEvent&); | 80 PlatformKeyboardEventBuilder(const WebKeyboardEvent&); |
81 void setKeyType(Type); | 81 void setKeyType(Type); |
82 bool isCharacterKey() const; | 82 bool isCharacterKey() const; |
83 }; | 83 }; |
84 | 84 |
| 85 #if ENABLE(TOUCH_EVENTS) |
85 // Converts a WebTouchPoint to a WebCore::PlatformTouchPoint. | 86 // Converts a WebTouchPoint to a WebCore::PlatformTouchPoint. |
86 class PlatformTouchPointBuilder : public WebCore::PlatformTouchPoint { | 87 class PlatformTouchPointBuilder : public WebCore::PlatformTouchPoint { |
87 public: | 88 public: |
88 PlatformTouchPointBuilder(WebCore::Widget*, const WebTouchPoint&); | 89 PlatformTouchPointBuilder(WebCore::Widget*, const WebTouchPoint&); |
89 }; | 90 }; |
90 | 91 |
91 // Converts a WebTouchEvent to a WebCore::PlatformTouchEvent. | 92 // Converts a WebTouchEvent to a WebCore::PlatformTouchEvent. |
92 class PlatformTouchEventBuilder : public WebCore::PlatformTouchEvent { | 93 class PlatformTouchEventBuilder : public WebCore::PlatformTouchEvent { |
93 public: | 94 public: |
94 PlatformTouchEventBuilder(WebCore::Widget*, const WebTouchEvent&); | 95 PlatformTouchEventBuilder(WebCore::Widget*, const WebTouchEvent&); |
95 }; | 96 }; |
| 97 #endif |
96 | 98 |
97 // Converts a WebCore::MouseEvent to a corresponding WebMouseEvent. | 99 // Converts a WebCore::MouseEvent to a corresponding WebMouseEvent. |
98 // NOTE: This is only implemented for mousemove, mouseover, mouseout, | 100 // NOTE: This is only implemented for mousemove, mouseover, mouseout, |
99 // mousedown and mouseup. If the event mapping fails, the event type will | 101 // mousedown and mouseup. If the event mapping fails, the event type will |
100 // be set to Undefined. | 102 // be set to Undefined. |
101 class WebMouseEventBuilder : public WebMouseEvent { | 103 class WebMouseEventBuilder : public WebMouseEvent { |
102 public: | 104 public: |
103 WebMouseEventBuilder(const WebCore::Widget*, const WebCore::RenderObject*, c
onst WebCore::MouseEvent&); | 105 WebMouseEventBuilder(const WebCore::Widget*, const WebCore::RenderObject*, c
onst WebCore::MouseEvent&); |
104 WebMouseEventBuilder(const WebCore::Widget*, const WebCore::RenderObject*, c
onst WebCore::TouchEvent&); | 106 WebMouseEventBuilder(const WebCore::Widget*, const WebCore::RenderObject*, c
onst WebCore::TouchEvent&); |
105 }; | 107 }; |
106 | 108 |
107 // Converts a WebCore::WheelEvent to a corresponding WebMouseWheelEvent. | 109 // Converts a WebCore::WheelEvent to a corresponding WebMouseWheelEvent. |
108 // If the event mapping fails, the event type will be set to Undefined. | 110 // If the event mapping fails, the event type will be set to Undefined. |
109 class WebMouseWheelEventBuilder : public WebMouseWheelEvent { | 111 class WebMouseWheelEventBuilder : public WebMouseWheelEvent { |
110 public: | 112 public: |
111 WebMouseWheelEventBuilder(const WebCore::Widget*, const WebCore::RenderObjec
t*, const WebCore::WheelEvent&); | 113 WebMouseWheelEventBuilder(const WebCore::Widget*, const WebCore::RenderObjec
t*, const WebCore::WheelEvent&); |
112 }; | 114 }; |
113 | 115 |
114 // Converts a WebCore::KeyboardEvent to a corresponding WebKeyboardEvent. | 116 // Converts a WebCore::KeyboardEvent to a corresponding WebKeyboardEvent. |
115 // NOTE: This is only implemented for keydown and keyup. If the event mapping | 117 // NOTE: This is only implemented for keydown and keyup. If the event mapping |
116 // fails, the event type will be set to Undefined. | 118 // fails, the event type will be set to Undefined. |
117 class WebKeyboardEventBuilder : public WebKeyboardEvent { | 119 class WebKeyboardEventBuilder : public WebKeyboardEvent { |
118 public: | 120 public: |
119 WebKeyboardEventBuilder(const WebCore::KeyboardEvent&); | 121 WebKeyboardEventBuilder(const WebCore::KeyboardEvent&); |
120 }; | 122 }; |
121 | 123 |
| 124 #if ENABLE(TOUCH_EVENTS) |
122 // Converts a WebCore::TouchEvent to a corresponding WebTouchEvent. | 125 // Converts a WebCore::TouchEvent to a corresponding WebTouchEvent. |
123 // NOTE: WebTouchEvents have a cap on the number of WebTouchPoints. Any points | 126 // NOTE: WebTouchEvents have a cap on the number of WebTouchPoints. Any points |
124 // exceeding that cap will be dropped. | 127 // exceeding that cap will be dropped. |
125 class WebTouchEventBuilder : public WebTouchEvent { | 128 class WebTouchEventBuilder : public WebTouchEvent { |
126 public: | 129 public: |
127 WebTouchEventBuilder(const WebCore::Widget*, const WebCore::RenderObject*, c
onst WebCore::TouchEvent&); | 130 WebTouchEventBuilder(const WebCore::Widget*, const WebCore::RenderObject*, c
onst WebCore::TouchEvent&); |
128 }; | 131 }; |
| 132 #endif // ENABLE(TOUCH_EVENTS) |
129 | 133 |
130 // Converts WebCore::GestureEvent to a corresponding WebGestureEvent. | 134 // Converts WebCore::GestureEvent to a corresponding WebGestureEvent. |
131 // NOTE: If event mapping fails, the type will be set to Undefined. | 135 // NOTE: If event mapping fails, the type will be set to Undefined. |
132 class WebGestureEventBuilder : public WebGestureEvent { | 136 class WebGestureEventBuilder : public WebGestureEvent { |
133 public: | 137 public: |
134 WebGestureEventBuilder(const WebCore::Widget*, const WebCore::RenderObject*,
const WebCore::GestureEvent&); | 138 WebGestureEventBuilder(const WebCore::Widget*, const WebCore::RenderObject*,
const WebCore::GestureEvent&); |
135 }; | 139 }; |
136 | 140 |
137 } // namespace WebKit | 141 } // namespace WebKit |
138 | 142 |
139 #endif | 143 #endif |
OLD | NEW |