OLD | NEW |
1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved. | 1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved. |
2 // limitations under the License. | 2 // limitations under the License. |
3 // See the License for the specific language governing permissions and | 3 // See the License for the specific language governing permissions and |
4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
5 // distributed under the License is distributed on an "AS-IS" BASIS, | 5 // distributed under the License is distributed on an "AS-IS" BASIS, |
6 // Unless required by applicable law or agreed to in writing, software | 6 // Unless required by applicable law or agreed to in writing, software |
7 // | 7 // |
8 // http://www.apache.org/licenses/LICENSE-2.0 | 8 // http://www.apache.org/licenses/LICENSE-2.0 |
9 // | 9 // |
10 // You may obtain a copy of the License at | 10 // You may obtain a copy of the License at |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 | 104 |
105 /** | 105 /** |
106 * The pointer event. | 106 * The pointer event. |
107 * | 107 * |
108 * @param {i18n.input.chrome.inputview.elements.Element} view . | 108 * @param {i18n.input.chrome.inputview.elements.Element} view . |
109 * @param {events.EventType} type . | 109 * @param {events.EventType} type . |
110 * @param {Node} target The event target. | 110 * @param {Node} target The event target. |
111 * @param {number} x . | 111 * @param {number} x . |
112 * @param {number} y . | 112 * @param {number} y . |
| 113 * @param {number} identifier . |
113 * @param {number=} opt_timestamp The timestamp of a pointer event. | 114 * @param {number=} opt_timestamp The timestamp of a pointer event. |
114 * @constructor | 115 * @constructor |
115 * @extends {goog.events.Event} | 116 * @extends {goog.events.Event} |
116 */ | 117 */ |
117 events.PointerEvent = function(view, type, target, x, y, opt_timestamp) { | 118 events.PointerEvent = function(view, type, target, x, y, identifier, |
| 119 opt_timestamp) { |
118 goog.base(this, type, target); | 120 goog.base(this, type, target); |
119 | 121 |
120 /** | 122 /** |
121 * The view. | 123 * The view. |
122 * | 124 * |
123 * @type {i18n.input.chrome.inputview.elements.Element} | 125 * @type {i18n.input.chrome.inputview.elements.Element} |
124 */ | 126 */ |
125 this.view = view; | 127 this.view = view; |
126 | 128 |
127 /** | 129 /** |
128 * The x-coordinate. | 130 * The x-coordinate. |
129 * | 131 * |
130 * @type {number} | 132 * @type {number} |
131 */ | 133 */ |
132 this.x = x; | 134 this.x = x; |
133 | 135 |
134 /** | 136 /** |
135 * The y-coordinate. | 137 * The y-coordinate. |
136 * | 138 * |
137 * @type {number} | 139 * @type {number} |
138 */ | 140 */ |
139 this.y = y; | 141 this.y = y; |
140 | 142 |
141 /** | 143 /** |
| 144 * The event identifier. |
| 145 * |
| 146 * @type {number} |
| 147 */ |
| 148 this.identifier = identifier; |
| 149 |
| 150 /** |
142 * The timestamp. | 151 * The timestamp. |
143 * | 152 * |
144 * @type {number} | 153 * @type {number} |
145 */ | 154 */ |
146 this.timestamp = opt_timestamp || 0; | 155 this.timestamp = opt_timestamp || 0; |
147 }; | 156 }; |
148 goog.inherits(events.PointerEvent, goog.events.Event); | 157 goog.inherits(events.PointerEvent, goog.events.Event); |
149 | 158 |
150 | 159 |
151 | 160 |
152 /** | 161 /** |
153 * The swipe event. | 162 * The swipe event. |
154 * | 163 * |
155 * @param {i18n.input.chrome.inputview.elements.Element} view . | 164 * @param {i18n.input.chrome.inputview.elements.Element} view . |
156 * @param {number} direction See SwipeDirection in pointer handler. | 165 * @param {number} direction See SwipeDirection in pointer handler. |
157 * @param {Node} target The event target. | 166 * @param {Node} target The event target. |
158 * @param {number} x . | 167 * @param {number} x . |
159 * @param {number} y . | 168 * @param {number} y . |
| 169 * @param {number} identifier . |
160 * @constructor | 170 * @constructor |
161 * @extends {events.PointerEvent} | 171 * @extends {events.PointerEvent} |
162 */ | 172 */ |
163 events.SwipeEvent = function(view, direction, target, x, y) { | 173 events.SwipeEvent = function(view, direction, target, x, y, identifier) { |
164 goog.base(this, view, events.EventType.SWIPE, | 174 goog.base(this, view, events.EventType.SWIPE, |
165 target, x, y); | 175 target, x, y, identifier); |
166 | 176 |
167 /** | 177 /** |
168 * The direction. | 178 * The direction. |
169 * | 179 * |
170 * @type {number} | 180 * @type {number} |
171 */ | 181 */ |
172 this.direction = direction; | 182 this.direction = direction; |
173 }; | 183 }; |
174 goog.inherits(events.SwipeEvent, events.PointerEvent); | 184 goog.inherits(events.SwipeEvent, events.PointerEvent); |
175 | 185 |
176 | 186 |
177 | 187 |
178 /** | 188 /** |
179 * The drag event. | 189 * The drag event. |
180 * | 190 * |
181 * @param {i18n.input.chrome.inputview.elements.Element} view . | 191 * @param {i18n.input.chrome.inputview.elements.Element} view . |
182 * @param {number} direction See SwipeDirection in pointer handler. | 192 * @param {number} direction See SwipeDirection in pointer handler. |
183 * @param {Node} target The event target. | 193 * @param {Node} target The event target. |
184 * @param {number} x . | 194 * @param {number} x . |
185 * @param {number} y . | 195 * @param {number} y . |
186 * @param {number} deltaX The drag distance of x-coordinate. | 196 * @param {number} deltaX The drag distance of x-coordinate. |
187 * @param {number} deltaY The drag distance of y-coordinate. | 197 * @param {number} deltaY The drag distance of y-coordinate. |
| 198 * @param {number} identifier . |
188 * @constructor | 199 * @constructor |
189 * @extends {events.PointerEvent} | 200 * @extends {events.PointerEvent} |
190 */ | 201 */ |
191 events.DragEvent = function(view, direction, target, x, y, deltaX, deltaY) { | 202 events.DragEvent = function(view, direction, target, x, y, deltaX, deltaY, |
| 203 identifier) { |
192 goog.base(this, view, events.EventType.DRAG, | 204 goog.base(this, view, events.EventType.DRAG, |
193 target, x, y); | 205 target, x, y, identifier); |
194 /** | 206 /** |
195 * The direction | 207 * The direction |
196 * | 208 * |
197 * @type {number} | 209 * @type {number} |
198 */ | 210 */ |
199 this.direction = direction; | 211 this.direction = direction; |
200 | 212 |
201 /** | 213 /** |
202 * The value of deltaX | 214 * The value of deltaX |
203 * | 215 * |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 264 |
253 /** @type {string} */ | 265 /** @type {string} */ |
254 this.compositionText = compositionText; | 266 this.compositionText = compositionText; |
255 | 267 |
256 /** @type {string} */ | 268 /** @type {string} */ |
257 this.committedText = committedText; | 269 this.committedText = committedText; |
258 }; | 270 }; |
259 goog.inherits(events.ContextUpdateEvent, goog.events.Event); | 271 goog.inherits(events.ContextUpdateEvent, goog.events.Event); |
260 | 272 |
261 }); // goog.scope | 273 }); // goog.scope |
OLD | NEW |