85 lines
2.1 KiB
TypeScript
85 lines
2.1 KiB
TypeScript
import { MenuItemOptions } from './menu'
|
|
|
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
export interface ClipboardContent {
|
|
text: string
|
|
html?: string
|
|
}
|
|
|
|
export interface MessageBoxOptions {
|
|
type: 'warning'|'error'
|
|
message: string
|
|
detail?: string
|
|
buttons: string[]
|
|
defaultId?: number
|
|
}
|
|
|
|
export interface MessageBoxResult {
|
|
response: number
|
|
}
|
|
|
|
export abstract class PlatformService {
|
|
supportsWindowControls = false
|
|
|
|
abstract readClipboard (): string
|
|
abstract setClipboard (content: ClipboardContent): void
|
|
abstract loadConfig (): Promise<string>
|
|
abstract saveConfig (content: string): Promise<void>
|
|
|
|
getConfigPath (): string|null {
|
|
return null
|
|
}
|
|
|
|
showItemInFolder (path: string): void {
|
|
throw new Error('Not implemented')
|
|
}
|
|
|
|
async isProcessRunning (name: string): Promise<boolean> {
|
|
return false
|
|
}
|
|
|
|
async installPlugin (name: string, version: string): Promise<void> {
|
|
throw new Error('Not implemented')
|
|
}
|
|
|
|
async uninstallPlugin (name: string): Promise<void> {
|
|
throw new Error('Not implemented')
|
|
}
|
|
|
|
getWinSCPPath (): string|null {
|
|
throw new Error('Not implemented')
|
|
}
|
|
|
|
exec (app: string, argv: string[]): void {
|
|
throw new Error('Not implemented')
|
|
}
|
|
|
|
isShellIntegrationSupported (): boolean {
|
|
return false
|
|
}
|
|
|
|
async isShellIntegrationInstalled (): Promise<boolean> {
|
|
return false
|
|
}
|
|
|
|
async installShellIntegration (): Promise<void> {
|
|
throw new Error('Not implemented')
|
|
}
|
|
|
|
async uninstallShellIntegration (): Promise<void> {
|
|
throw new Error('Not implemented')
|
|
}
|
|
|
|
openPath (path: string): void {
|
|
throw new Error('Not implemented')
|
|
}
|
|
|
|
abstract getOSRelease (): string
|
|
abstract getAppVersion (): string
|
|
abstract openExternal (url: string): void
|
|
abstract listFonts (): Promise<string[]>
|
|
abstract popupContextMenu (menu: MenuItemOptions[], event?: MouseEvent): void
|
|
abstract showMessageBox (options: MessageBoxOptions): Promise<MessageBoxResult>
|
|
abstract quit (): void
|
|
}
|