UNPKG

2.87 kBTypeScriptView Raw
1/// <reference types="lodash" />
2import { Emitter } from '../common/event';
3import { Disposable, DisposableCollection } from '../common/disposable';
4import { LabelProviderContribution, DidChangeLabelEvent } from './label-provider';
5import { PreferenceService, PreferenceSchemaProvider } from './preferences';
6export interface IconThemeDefinition {
7 readonly id: string;
8 readonly label: string;
9 readonly description?: string;
10 readonly hasFileIcons?: boolean;
11 readonly hasFolderIcons?: boolean;
12 readonly hidesExplorerArrows?: boolean;
13}
14export interface IconTheme extends IconThemeDefinition {
15 activate(): Disposable;
16}
17export declare class NoneIconTheme implements IconTheme, LabelProviderContribution {
18 readonly id = "none";
19 readonly label = "None";
20 readonly description = "Disable file icons";
21 readonly hasFileIcons = true;
22 readonly hasFolderIcons = true;
23 protected readonly onDidChangeEmitter: Emitter<DidChangeLabelEvent>;
24 readonly onDidChange: import("../common/event").Event<DidChangeLabelEvent>;
25 protected readonly toDeactivate: DisposableCollection;
26 activate(): Disposable;
27 protected fireDidChange(): void;
28 canHandle(): number;
29 getIcon(): string;
30}
31export declare class IconThemeService {
32 static readonly STORAGE_KEY = "iconTheme";
33 protected readonly onDidChangeEmitter: Emitter<void>;
34 readonly onDidChange: import("../common/event").Event<void>;
35 protected readonly _iconThemes: Map<string, IconTheme>;
36 get ids(): IterableIterator<string>;
37 get definitions(): IterableIterator<IconThemeDefinition>;
38 getDefinition(id: string): IconThemeDefinition | undefined;
39 protected readonly noneIconTheme: NoneIconTheme;
40 protected readonly preferences: PreferenceService;
41 protected readonly schemaProvider: PreferenceSchemaProvider;
42 protected readonly onDidChangeCurrentEmitter: Emitter<string>;
43 readonly onDidChangeCurrent: import("../common/event").Event<string>;
44 protected readonly toDeactivate: DisposableCollection;
45 protected activeTheme: IconTheme;
46 protected init(): void;
47 register(iconTheme: IconTheme): Disposable;
48 unregister(id: string): IconTheme | undefined;
49 get current(): string;
50 set current(id: string);
51 getCurrent(): IconTheme;
52 /**
53 * @param persistSetting If `true`, the theme's id will be set as the value of the `workbench.iconTheme` preference. (default: `true`)
54 */
55 setCurrent(newCurrent: IconTheme, persistSetting?: boolean): void;
56 protected getConfiguredTheme(): IconTheme | undefined;
57 protected validateActiveTheme(): void;
58 protected updateIconThemePreference: import("lodash").DebouncedFunc<() => void>;
59 protected doUpdateIconThemePreference(): void;
60 get default(): IconTheme;
61 get fallback(): IconTheme;
62}
63//# sourceMappingURL=icon-theme-service.d.ts.map
\No newline at end of file