mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Vendored
+108
-8
@@ -497,6 +497,35 @@ declare module AtomCore {
|
||||
screenRangeChanged():any;
|
||||
}
|
||||
|
||||
interface IDecorationParams {
|
||||
id?: number;
|
||||
class: string;
|
||||
type: any /* string or string[] */;
|
||||
}
|
||||
|
||||
interface IDecorationStatic {
|
||||
isType(decorationParams:IDecorationParams, type:any /* string or string[] */):boolean;
|
||||
new (marker:IDisplayBufferMarker, displayBuffer:IDisplayBuffer, params: IDecorationParams): IDecoration;
|
||||
}
|
||||
|
||||
interface IDecoration extends Emissary.IEmitter {
|
||||
marker: IDisplayBufferMarker;
|
||||
displayBuffer: IDisplayBuffer;
|
||||
params: IDecorationParams
|
||||
id: number;
|
||||
flashQueue: any[];
|
||||
isDestroyed: boolean;
|
||||
|
||||
destroy():void;
|
||||
update(newParams:IDecorationParams):void;
|
||||
getMarker():IDisplayBufferMarker;
|
||||
getParams():IDecorationParams;
|
||||
isType(type:string):boolean;
|
||||
matchesPattern(decorationPattern:{[key:string]:IDecorationParams;}):boolean;
|
||||
flash(klass:string, duration?:number):void;
|
||||
consumeNextFlash():any;
|
||||
}
|
||||
|
||||
interface IEditor {
|
||||
// Serializable.includeInto(Editor);
|
||||
// Delegator.includeInto(Editor);
|
||||
@@ -509,6 +538,8 @@ declare module AtomCore {
|
||||
cursors:ICursor[];
|
||||
selections: ISelection[];
|
||||
suppressSelectionMerging:boolean;
|
||||
updateBatchDepth: number;
|
||||
selectionFlashDuration: number;
|
||||
softTabs: boolean;
|
||||
displayBuffer: IDisplayBuffer;
|
||||
|
||||
@@ -522,6 +553,8 @@ declare module AtomCore {
|
||||
subscriptionsByObject: any; /* WeakMap */
|
||||
subscriptions: Emissary.ISubscription[];
|
||||
|
||||
mini: any;
|
||||
|
||||
serializeParams():{id:number; softTabs:boolean; scrollTop:number; scrollLeft:number; displayBuffer:any;};
|
||||
deserializeParams(params:any):any;
|
||||
subscribeToBuffer():void;
|
||||
@@ -532,10 +565,7 @@ declare module AtomCore {
|
||||
getTitle():string;
|
||||
getLongTitle():string;
|
||||
setVisible(visible:boolean):void;
|
||||
setScrollTop(scrollTop:any):void;
|
||||
getScrollTop():number;
|
||||
setScrollLeft(scrollLeft:any):void;
|
||||
getScrollLeft():number;
|
||||
setMini(mini:any):void;
|
||||
setEditorWidthInChars(editorWidthInChars:any):void;
|
||||
getSoftWrapColumn():number;
|
||||
getSoftTabs():boolean;
|
||||
@@ -545,6 +575,7 @@ declare module AtomCore {
|
||||
getTabText():string;
|
||||
getTabLength():number;
|
||||
setTabLength(tabLength:any):void;
|
||||
usesSoftTabs():boolean;
|
||||
clipBufferPosition(bufferPosition:any):void;
|
||||
clipBufferRange(range:any):void;
|
||||
indentationForBufferRow(bufferRow:any):void;
|
||||
@@ -553,6 +584,7 @@ declare module AtomCore {
|
||||
buildIndentString(number:any):string;
|
||||
save():void;
|
||||
saveAs(filePath:any):void;
|
||||
copyPathToClipboard():void;
|
||||
getPath():string;
|
||||
getText():string;
|
||||
setText(text:any):void;
|
||||
@@ -572,6 +604,7 @@ declare module AtomCore {
|
||||
scanInBufferRange():any;
|
||||
backwardsScanInBufferRange():any;
|
||||
isModified():boolean;
|
||||
isEmpty():boolean;
|
||||
shouldPromptToSave():boolean;
|
||||
screenPositionForBufferPosition(bufferPosition:any, options?:any):TextBuffer.IPoint;
|
||||
bufferPositionForScreenPosition(screenPosition:any, options?:any):TextBuffer.IPoint;
|
||||
@@ -589,15 +622,19 @@ declare module AtomCore {
|
||||
bufferRangeForScopeAtCursor(selector:string):any;
|
||||
tokenForBufferPosition(bufferPosition:any):IToken;
|
||||
getCursorScopes():string[];
|
||||
logCursorScope():void;
|
||||
insertText(text:string, options?:any):TextBuffer.IRange[];
|
||||
insertNewline():TextBuffer.IRange[];
|
||||
insertNewlineBelow():TextBuffer.IRange[];
|
||||
insertNewlineAbove():any;
|
||||
indent(options?:any):any;
|
||||
backspace():any[];
|
||||
backspaceToBeginningOfWord():any[];
|
||||
backspaceToBeginningOfLine():any[];
|
||||
// deprecated backspaceToBeginningOfWord():any[];
|
||||
// deprecated backspaceToBeginningOfLine():any[];
|
||||
deleteToBeginningOfWord():any[];
|
||||
deleteToBeginningOfLine():any[];
|
||||
delete():any[];
|
||||
deleteToEndOfLine():any[];
|
||||
deleteToEndOfWord():any[];
|
||||
deleteLine():TextBuffer.IRange[];
|
||||
indentSelectedRows():TextBuffer.IRange[][];
|
||||
@@ -620,6 +657,7 @@ declare module AtomCore {
|
||||
foldBufferRow(bufferRow:any):any;
|
||||
unfoldBufferRow(bufferRow:any):any;
|
||||
isFoldableAtBufferRow(bufferRow:any):boolean;
|
||||
isFoldableAtScreenRow(screenRow:any):boolean;
|
||||
createFold(startRow:any, endRow:any):IFold;
|
||||
destroyFoldWithId(id:any):any;
|
||||
destroyFoldsIntersectingBufferRange(bufferRange:any):any;
|
||||
@@ -633,9 +671,12 @@ declare module AtomCore {
|
||||
moveLineUp():ISelection[];
|
||||
moveLineDown():ISelection[];
|
||||
duplicateLines():any[][];
|
||||
duplicateLine():any[][];
|
||||
// duprecated duplicateLine():any[][];
|
||||
mutateSelectedText(fn:(selection:ISelection)=>any):any;
|
||||
replaceSelectedText(options:any, fn:(selection:string)=>any):any;
|
||||
decorationsForScreenRowRange(startScreenRow:any, endScreenRow:any):{[id:number]: IDecoration[]};
|
||||
decorateMarker(marker:IDisplayBufferMarker, decorationParams: {type:string; class: string;}):IDecoration;
|
||||
decorationForId(id:number):IDecoration;
|
||||
getMarker(id:number):IDisplayBufferMarker;
|
||||
getMarkers():IDisplayBufferMarker[];
|
||||
findMarkers(...args:any[]):IDisplayBufferMarker[];
|
||||
@@ -659,6 +700,7 @@ declare module AtomCore {
|
||||
removeSelection(selection:ISelection):any;
|
||||
clearSelections():boolean;
|
||||
consolidateSelections():boolean;
|
||||
selectionScreenRangeChanged(selection:any):void;
|
||||
getSelections():ISelection[];
|
||||
getSelection(index?:number):ISelection;
|
||||
getLastSelection():ISelection;
|
||||
@@ -694,7 +736,16 @@ declare module AtomCore {
|
||||
moveCursorToBeginningOfNextWord():void;
|
||||
moveCursorToPreviousWordBoundary():void;
|
||||
moveCursorToNextWordBoundary():void;
|
||||
moveCursorToBeginningOfNextParagraph():void;
|
||||
moveCursorToBeginningOfPreviousParagraph():void;
|
||||
scrollToCursorPosition(options:any):any;
|
||||
pageUp():void;
|
||||
pageDown():void;
|
||||
selectPageUp():void;
|
||||
selectPageDown():void;
|
||||
getRowsPerPage():number;
|
||||
moveCursors(fn:(cursor:ICursor)=>any):any;
|
||||
cursorMoved(event:any):void;
|
||||
selectToScreenPosition(position:TextBuffer.IPoint):any;
|
||||
selectRight():ISelection[];
|
||||
selectLeft():ISelection[];
|
||||
@@ -720,6 +771,8 @@ declare module AtomCore {
|
||||
selectToEndOfWord():ISelection[];
|
||||
selectToBeginningOfNextWord():ISelection[];
|
||||
selectWord():ISelection[];
|
||||
selectToBeginningOfNextParagraph():ISelection[];
|
||||
selectToBeginningOfPreviousParagraph():ISelection[];
|
||||
selectMarker(marker:any):any;
|
||||
mergeCursors():number[];
|
||||
expandSelectionsForward():any;
|
||||
@@ -731,16 +784,63 @@ declare module AtomCore {
|
||||
setGrammar(grammer:IGrammar):void;
|
||||
reloadGrammar():any;
|
||||
shouldAutoIndent():boolean;
|
||||
shouldShowInvisibles():boolean;
|
||||
updateInvisibles():void;
|
||||
transact(fn:Function):any;
|
||||
beginTransaction():ITransaction;
|
||||
commitTransaction():any;
|
||||
abortTransaction():any[];
|
||||
inspect():string;
|
||||
logScreenLines(start:number, end:number):any[];
|
||||
handleTokenization():void;
|
||||
handleGrammarChange():void;
|
||||
handleMarkerCreated(marker:any):any;
|
||||
getSelectionMarkerAttributes():{type: string; editorId: number; invalidate: string; };
|
||||
// joinLine():any; // deprecated
|
||||
getVerticalScrollMargin():number;
|
||||
setVerticalScrollMargin(verticalScrollMargin:number):void;
|
||||
getHorizontalScrollMargin():number;
|
||||
setHorizontalScrollMargin(horizontalScrollMargin:number):void;
|
||||
getLineHeightInPixels():number;
|
||||
setLineHeightInPixels(lineHeightInPixels:number):void;
|
||||
batchCharacterMeasurement(fn:Function):void;
|
||||
getScopedCharWidth(scopeNames:any, char:any):any;
|
||||
setScopedCharWidth(scopeNames:any, char:any, width:any):any;
|
||||
getScopedCharWidths(scopeNames:any):any;
|
||||
clearScopedCharWidths():any;
|
||||
getDefaultCharWidth():number;
|
||||
setDefaultCharWidth(defaultCharWidth:number):void;
|
||||
setHeight(height:number):void;
|
||||
getHeight():number;
|
||||
getClientHeight():number;
|
||||
setWidth(width:number):void;
|
||||
getWidth():number;
|
||||
getScrollTop():number;
|
||||
setScrollTop(scrollTop:number):void;
|
||||
getScrollBottom():number;
|
||||
setScrollBottom(scrollBottom:number):void;
|
||||
getScrollLeft():number;
|
||||
setScrollLeft(scrollLeft:number):void;
|
||||
getScrollRight():number;
|
||||
setScrollRight(scrollRight:number):void;
|
||||
getScrollHeight():number;
|
||||
getScrollWidth():number;
|
||||
getVisibleRowRange():number;
|
||||
intersectsVisibleRowRange(startRow:any, endRow:any):any;
|
||||
selectionIntersectsVisibleRowRange(selection:any):any;
|
||||
pixelPositionForScreenPosition(screenPosition:any):any;
|
||||
pixelPositionForBufferPosition(bufferPosition:any):any;
|
||||
screenPositionForPixelPosition(pixelPosition:any):any;
|
||||
pixelRectForScreenRange(screenRange:any):any;
|
||||
scrollToScreenRange(screenRange:any, options:any):any;
|
||||
scrollToScreenPosition(screenPosition:any, options:any):any;
|
||||
scrollToBufferPosition(bufferPosition:any, options:any):any;
|
||||
horizontallyScrollable():any;
|
||||
verticallyScrollable():any;
|
||||
getHorizontalScrollbarHeight():any;
|
||||
setHorizontalScrollbarHeight(height:any):any;
|
||||
getVerticalScrollbarWidth():any;
|
||||
setVerticalScrollbarWidth(width:any):any;
|
||||
// deprecated joinLine():any;
|
||||
}
|
||||
|
||||
interface IGrammar {
|
||||
|
||||
Reference in New Issue
Block a user