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