diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 971768e4e27e6b3ed9aa6153a7bc14bf47230864..5c1a9237633a236dbc5b0a48ea18d719ff74bc29 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -5520,6 +5520,26 @@ declare module 'vscode' { update(key: string, value: any): Thenable; } + /** + * Represents a color theme kind. + */ + export enum ColorThemeKind { + Light = 1, + Dark = 2, + HighContrast = 3 + } + + /** + * Represents a color theme. + */ + export interface ColorTheme { + + /** + * The kind of this color theme: light, dark or high contrast. + */ + readonly kind: ColorThemeKind; + } + /** * Controls the behaviour of the terminal's visibility. */ @@ -7734,6 +7754,17 @@ declare module 'vscode' { * @return Disposable that unregisters the provider. */ export function registerCustomEditorProvider(viewType: string, provider: CustomTextEditorProvider, options?: { readonly webviewOptions?: WebviewPanelOptions; }): Disposable; + + /** + * The currently active color theme as configured in the settings. The active + * theme can be changed via the `workbench.colorTheme` setting. + */ + export let activeColorTheme: ColorTheme; + + /** + * An [event](#Event) which fires when the active color theme is changed or has changes. + */ + export const onDidChangeActiveColorTheme: Event; } /** diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 4cd2907cf10cdf1afcb331712b243e0ae88b882c..2e747775ce50fb142672040f6ada6dc842cdbc15 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1764,44 +1764,6 @@ declare module 'vscode' { //#endregion - //#region color theme access - - /** - * Represents a color theme kind. - */ - export enum ColorThemeKind { - Light = 1, - Dark = 2, - HighContrast = 3 - } - - /** - * Represents a color theme. - */ - export interface ColorTheme { - - /** - * The kind of this color theme: light, dark or high contrast. - */ - readonly kind: ColorThemeKind; - } - - export namespace window { - /** - * The currently active color theme as configured in the settings. The active - * theme can be changed via the `workbench.colorTheme` setting. - */ - export let activeColorTheme: ColorTheme; - - /** - * An [event](#Event) which fires when the active theme changes or one of it's colors chnage. - */ - export const onDidChangeActiveColorTheme: Event; - } - - //#endregion - - //#region https://github.com/microsoft/vscode/issues/39441 export interface CompletionItem { diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index 601c3b31636c750d3198c124d0309943c2fa9ff4..350b3b0fa10897bd264deb18e4d54653f751f51f 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -604,11 +604,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I return extHostQuickOpen.createInputBox(extension.identifier); }, get activeColorTheme(): vscode.ColorTheme { - checkProposedApiEnabled(extension); return extHostTheming.activeColorTheme; }, onDidChangeActiveColorTheme(listener, thisArg?, disposables?) { - checkProposedApiEnabled(extension); return extHostTheming.onDidChangeActiveColorTheme(listener, thisArg, disposables); } };