tabby/terminus-terminal/src/api.ts

63 lines
1.5 KiB
TypeScript
Raw Normal View History

2017-04-28 20:40:58 +00:00
import { Observable } from 'rxjs'
2017-04-16 18:38:42 +00:00
import { TerminalTabComponent } from './components/terminalTab.component'
2017-04-04 15:39:36 +00:00
2017-03-25 17:12:43 +00:00
export abstract class TerminalDecorator {
2017-05-01 11:35:26 +00:00
// tslint:disable-next-line no-empty
2017-04-04 15:39:36 +00:00
attach (_terminal: TerminalTabComponent): void { }
2017-05-01 11:35:26 +00:00
// tslint:disable-next-line no-empty
2017-04-04 15:39:36 +00:00
detach (_terminal: TerminalTabComponent): void { }
}
export interface ResizeEvent {
2018-08-09 19:37:14 +00:00
columns: number
rows: number
2017-03-25 17:12:43 +00:00
}
2017-03-25 20:00:16 +00:00
export interface SessionOptions {
2017-04-04 15:39:36 +00:00
name?: string
command?: string
args?: string[]
cwd?: string
env?: any
2017-05-14 11:45:14 +00:00
width?: number
height?: number
2017-03-25 20:00:16 +00:00
recoveryId?: string
2017-04-28 20:40:58 +00:00
recoveredTruePID$?: Observable<number>
pauseAfterExit?: boolean
2017-03-25 20:00:16 +00:00
}
export abstract class SessionPersistenceProvider {
2017-07-31 11:52:32 +00:00
abstract id: string
abstract displayName: string
abstract isAvailable (): boolean
2017-04-02 15:33:55 +00:00
abstract async attachSession (recoveryId: any): Promise<SessionOptions>
abstract async startSession (options: SessionOptions): Promise<any>
2017-03-25 20:00:16 +00:00
abstract async terminateSession (recoveryId: string): Promise<void>
}
2017-04-06 18:06:54 +00:00
export interface ITerminalColorScheme {
name: string
foreground: string
background: string
2017-04-11 00:22:48 +00:00
cursor: string
2017-04-06 18:06:54 +00:00
colors: string[]
}
export abstract class TerminalColorSchemeProvider {
abstract async getSchemes (): Promise<ITerminalColorScheme[]>
}
2017-07-30 18:58:31 +00:00
export interface IShell {
id: string
name?: string
2017-07-30 18:58:31 +00:00
command: string
args?: string[]
env?: any
2018-10-08 20:57:33 +00:00
fsBase?: string
2017-07-30 18:58:31 +00:00
}
export abstract class ShellProvider {
abstract async provide (): Promise<IShell[]>
}