| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 /** | 4 /** |
| 5 * @interface | 5 * @interface |
| 6 */ | 6 */ |
| 7 UI.TextEditorFactory = function() {}; | 7 UI.TextEditorFactory = function() {}; |
| 8 | 8 |
| 9 UI.TextEditorFactory.prototype = { | 9 UI.TextEditorFactory.prototype = { |
| 10 /** | 10 /** |
| 11 * @param {!UI.TextEditor.Options} options | 11 * @param {!UI.TextEditor.Options} options |
| 12 * @return {!UI.TextEditor} | 12 * @return {!UI.TextEditor} |
| 13 */ | 13 */ |
| 14 createEditor: function(options) {} | 14 createEditor(options) {} |
| 15 }; | 15 }; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * @interface | 18 * @interface |
| 19 */ | 19 */ |
| 20 UI.TextEditor = function() {}; | 20 UI.TextEditor = function() {}; |
| 21 | 21 |
| 22 UI.TextEditor.prototype = { | 22 UI.TextEditor.prototype = { |
| 23 | 23 |
| 24 /** | 24 /** |
| 25 * @return {!UI.Widget} | 25 * @return {!UI.Widget} |
| 26 */ | 26 */ |
| 27 widget: function() {}, | 27 widget() {}, |
| 28 | 28 |
| 29 /** | 29 /** |
| 30 * @return {!Common.TextRange} | 30 * @return {!Common.TextRange} |
| 31 */ | 31 */ |
| 32 fullRange: function() {}, | 32 fullRange() {}, |
| 33 | 33 |
| 34 /** | 34 /** |
| 35 * @return {!Common.TextRange} | 35 * @return {!Common.TextRange} |
| 36 */ | 36 */ |
| 37 selection: function() {}, | 37 selection() {}, |
| 38 | 38 |
| 39 /** | 39 /** |
| 40 * @param {!Common.TextRange} selection | 40 * @param {!Common.TextRange} selection |
| 41 */ | 41 */ |
| 42 setSelection: function(selection) {}, | 42 setSelection(selection) {}, |
| 43 | 43 |
| 44 /** | 44 /** |
| 45 * @param {!Common.TextRange=} textRange | 45 * @param {!Common.TextRange=} textRange |
| 46 * @return {string} | 46 * @return {string} |
| 47 */ | 47 */ |
| 48 text: function(textRange) {}, | 48 text(textRange) {}, |
| 49 | 49 |
| 50 /** | 50 /** |
| 51 * @param {string} text | 51 * @param {string} text |
| 52 */ | 52 */ |
| 53 setText: function(text) {}, | 53 setText(text) {}, |
| 54 | 54 |
| 55 /** | 55 /** |
| 56 * @param {number} lineNumber | 56 * @param {number} lineNumber |
| 57 * @return {string} | 57 * @return {string} |
| 58 */ | 58 */ |
| 59 line: function(lineNumber) {}, | 59 line(lineNumber) {}, |
| 60 | 60 |
| 61 newlineAndIndent: function() {}, | 61 newlineAndIndent() {}, |
| 62 | 62 |
| 63 /** | 63 /** |
| 64 * @param {function(!KeyboardEvent)} handler | 64 * @param {function(!KeyboardEvent)} handler |
| 65 */ | 65 */ |
| 66 addKeyDownHandler: function(handler) {}, | 66 addKeyDownHandler(handler) {}, |
| 67 | 67 |
| 68 /** | 68 /** |
| 69 * @param {?UI.AutocompleteConfig} config | 69 * @param {?UI.AutocompleteConfig} config |
| 70 */ | 70 */ |
| 71 configureAutocomplete: function(config) {}, | 71 configureAutocomplete(config) {}, |
| 72 | 72 |
| 73 clearAutocomplete: function() {} | 73 clearAutocomplete() {} |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 /** | 76 /** |
| 77 * @typedef {{ | 77 * @typedef {{ |
| 78 * bracketMatchingSetting: (!Common.Setting|undefined), | 78 * bracketMatchingSetting: (!Common.Setting|undefined), |
| 79 * lineNumbers: boolean, | 79 * lineNumbers: boolean, |
| 80 * lineWrapping: boolean, | 80 * lineWrapping: boolean, |
| 81 * mimeType: (string|undefined), | 81 * mimeType: (string|undefined), |
| 82 * autoHeight: (boolean|undefined) | 82 * autoHeight: (boolean|undefined) |
| 83 * }} | 83 * }} |
| 84 */ | 84 */ |
| 85 UI.TextEditor.Options; | 85 UI.TextEditor.Options; |
| 86 | 86 |
| 87 /** | 87 /** |
| 88 * @typedef {{ | 88 * @typedef {{ |
| 89 * substituteRangeCallback: ((function(number, number):?Common.TextRange)|un
defined), | 89 * substituteRangeCallback: ((function(number, number):?Common.TextRange)|un
defined), |
| 90 * suggestionsCallback: ((function(!Common.TextRange, !Common.TextRange, boo
lean=, string=):?Promise.<!UI.SuggestBox.Suggestions>)|undefined), | 90 * suggestionsCallback: ((function(!Common.TextRange, !Common.TextRange, boo
lean=, string=):?Promise.<!UI.SuggestBox.Suggestions>)|undefined), |
| 91 * isWordChar: ((function(string):boolean)|undefined), | 91 * isWordChar: ((function(string):boolean)|undefined), |
| 92 * captureEnter: (boolean|undefined) | 92 * captureEnter: (boolean|undefined) |
| 93 * }} | 93 * }} |
| 94 */ | 94 */ |
| 95 UI.AutocompleteConfig; | 95 UI.AutocompleteConfig; |
| OLD | NEW |