tabby/terminus-terminal/src/api.ts

44 lines
1.2 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-11 00:22:48 +00:00
export { TerminalTabComponent }
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 {
width: number
height: 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-03-25 20:00:16 +00:00
recoveryId?: string
2017-04-28 20:40:58 +00:00
recoveredTruePID$?: Observable<number>
2017-03-25 20:00:16 +00:00
}
export abstract class SessionPersistenceProvider {
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[]>
}