mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 17:19:01 +01:00
25 lines
826 B
TypeScript
25 lines
826 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import { IMainContext, MainContext } from 'vs/workbench/api/common/extHost.protocol';
|
|
import type * as vscode from 'vscode';
|
|
|
|
export class ExtHostClipboard {
|
|
|
|
readonly value: vscode.Clipboard;
|
|
|
|
constructor(mainContext: IMainContext) {
|
|
const proxy = mainContext.getProxy(MainContext.MainThreadClipboard);
|
|
this.value = Object.freeze({
|
|
readText() {
|
|
return proxy.$readText();
|
|
},
|
|
writeText(value: string) {
|
|
return proxy.$writeText(value);
|
|
}
|
|
});
|
|
}
|
|
}
|