| 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 */ | 248 */ |
| 249 this.deltaY = deltaY; | 249 this.deltaY = deltaY; |
| 250 }; | 250 }; |
| 251 goog.inherits(events.DragEvent, events.PointerEvent); | 251 goog.inherits(events.DragEvent, events.PointerEvent); |
| 252 | 252 |
| 253 | 253 |
| 254 | 254 |
| 255 /** | 255 /** |
| 256 * The event when the surrounding text is changed. | 256 * The event when the surrounding text is changed. |
| 257 * | 257 * |
| 258 * @param {string} text The surrounding text. | 258 * @param {string} textBeforeCursor The surrounding text before the cursor. |
| 259 * @param {number} anchor . | 259 * @param {number} anchor . |
| 260 * @param {number} focus . | 260 * @param {number} focus . |
| 261 * @param {number} offset . |
| 261 * @constructor | 262 * @constructor |
| 262 * @extends {goog.events.Event} | 263 * @extends {goog.events.Event} |
| 263 */ | 264 */ |
| 264 events.SurroundingTextChangedEvent = function(text, anchor, focus) { | 265 events.SurroundingTextChangedEvent = function(textBeforeCursor, |
| 266 anchor, focus, offset) { |
| 265 goog.base(this, events.EventType.SURROUNDING_TEXT_CHANGED); | 267 goog.base(this, events.EventType.SURROUNDING_TEXT_CHANGED); |
| 266 | 268 |
| 267 /** @type {string} */ | 269 /** @type {string} */ |
| 268 this.text = text; | 270 this.textBeforeCursor = textBeforeCursor; |
| 269 /** @type {number} */ | 271 /** @type {number} */ |
| 270 this.anchor = anchor; | 272 this.anchor = anchor; |
| 271 /** @type {number} */ | 273 /** @type {number} */ |
| 272 this.focus = focus; | 274 this.focus = focus; |
| 275 /** @type {number} */ |
| 276 this.offset = offset; |
| 273 }; | 277 }; |
| 274 goog.inherits(events.SurroundingTextChangedEvent, goog.events.Event); | 278 goog.inherits(events.SurroundingTextChangedEvent, goog.events.Event); |
| 275 | 279 |
| 276 | 280 |
| 277 | 281 |
| 278 /** | 282 /** |
| 279 * The event when context is updated. | 283 * The event when context is updated. |
| 280 * | 284 * |
| 281 * @param {string} compositionText . | 285 * @param {string} compositionText . |
| 282 * @param {string} committedText . | 286 * @param {string} committedText . |
| 283 * @constructor | 287 * @constructor |
| 284 * @extends {goog.events.Event} | 288 * @extends {goog.events.Event} |
| 285 */ | 289 */ |
| 286 events.ContextUpdateEvent = function(compositionText, committedText) { | 290 events.ContextUpdateEvent = function(compositionText, committedText) { |
| 287 goog.base(this, events.EventType.CONTEXT_UPDATE); | 291 goog.base(this, events.EventType.CONTEXT_UPDATE); |
| 288 | 292 |
| 289 /** @type {string} */ | 293 /** @type {string} */ |
| 290 this.compositionText = compositionText; | 294 this.compositionText = compositionText; |
| 291 | 295 |
| 292 /** @type {string} */ | 296 /** @type {string} */ |
| 293 this.committedText = committedText; | 297 this.committedText = committedText; |
| 294 }; | 298 }; |
| 295 goog.inherits(events.ContextUpdateEvent, goog.events.Event); | 299 goog.inherits(events.ContextUpdateEvent, goog.events.Event); |
| 296 | 300 |
| 297 }); // goog.scope | 301 }); // goog.scope |
| OLD | NEW |