mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-11 06:04:55 +08:00
Move and rename files. NOAUTOREVERT=true NOPRESUBMIT=true NOTREECHECKS=true Bug: 768828 TBR=darin@chromium.org NOTRY=true Change-Id: I66d3b155808bc5bdbf237b80208e1e552bcf7f28 Reviewed-on: https://chromium-review.googlesource.com/1001153 Reviewed-by: Blink Reformat <blink-reformat@chromium.org> Commit-Queue: Blink Reformat <blink-reformat@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#549061} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 0aee4434a4dba42a42abaea9bfbc0cd196a63bc1
119 lines
2.4 KiB
JavaScript
119 lines
2.4 KiB
JavaScript
// Copyright 2016 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
/**
|
|
* @interface
|
|
*/
|
|
UI.TextEditorFactory = function() {};
|
|
|
|
UI.TextEditorFactory.prototype = {
|
|
/**
|
|
* @param {!UI.TextEditor.Options} options
|
|
* @return {!UI.TextEditor}
|
|
*/
|
|
createEditor(options) {}
|
|
};
|
|
|
|
/**
|
|
* @interface
|
|
* @extends {Common.EventTarget}
|
|
*/
|
|
UI.TextEditor = function() {};
|
|
|
|
UI.TextEditor.prototype = {
|
|
|
|
/**
|
|
* @return {!UI.Widget}
|
|
*/
|
|
widget() {},
|
|
|
|
/**
|
|
* @return {!TextUtils.TextRange}
|
|
*/
|
|
fullRange() {},
|
|
|
|
/**
|
|
* @return {!TextUtils.TextRange}
|
|
*/
|
|
selection() {},
|
|
|
|
/**
|
|
* @param {!TextUtils.TextRange} selection
|
|
*/
|
|
setSelection(selection) {},
|
|
|
|
/**
|
|
* @param {!TextUtils.TextRange=} textRange
|
|
* @return {string}
|
|
*/
|
|
text(textRange) {},
|
|
|
|
/**
|
|
* @param {string} text
|
|
*/
|
|
setText(text) {},
|
|
|
|
/**
|
|
* @param {number} lineNumber
|
|
* @return {string}
|
|
*/
|
|
line(lineNumber) {},
|
|
|
|
newlineAndIndent() {},
|
|
|
|
/**
|
|
* @param {function(!KeyboardEvent)} handler
|
|
*/
|
|
addKeyDownHandler(handler) {},
|
|
|
|
/**
|
|
* @param {?UI.AutocompleteConfig} config
|
|
*/
|
|
configureAutocomplete(config) {},
|
|
|
|
clearAutocomplete() {},
|
|
|
|
/**
|
|
* @param {number} lineNumber
|
|
* @param {number} columnNumber
|
|
* @return {!{x: number, y: number}}
|
|
*/
|
|
visualCoordinates(lineNumber, columnNumber) {},
|
|
|
|
/**
|
|
* @param {number} lineNumber
|
|
* @param {number} columnNumber
|
|
* @return {?{startColumn: number, endColumn: number, type: string}}
|
|
*/
|
|
tokenAtTextPosition(lineNumber, columnNumber) {}
|
|
};
|
|
|
|
/** @enum {symbol} */
|
|
UI.TextEditor.Events = {
|
|
TextChanged: Symbol('TextChanged')
|
|
};
|
|
|
|
/**
|
|
* @typedef {{
|
|
* bracketMatchingSetting: (!Common.Setting|undefined),
|
|
* lineNumbers: boolean,
|
|
* lineWrapping: boolean,
|
|
* mimeType: (string|undefined),
|
|
* autoHeight: (boolean|undefined),
|
|
* padBottom: (boolean|undefined),
|
|
* maxHighlightLength: (number|undefined),
|
|
* placeholder: (string|undefined)
|
|
* }}
|
|
*/
|
|
UI.TextEditor.Options;
|
|
|
|
/**
|
|
* @typedef {{
|
|
* substituteRangeCallback: ((function(number, number):?TextUtils.TextRange)|undefined),
|
|
* suggestionsCallback: ((function(!TextUtils.TextRange, !TextUtils.TextRange, boolean=):?Promise.<!UI.SuggestBox.Suggestions>)|undefined),
|
|
* isWordChar: ((function(string):boolean)|undefined),
|
|
* captureEnter: (boolean|undefined)
|
|
* }}
|
|
*/
|
|
UI.AutocompleteConfig;
|