UNPKG

1.75 kBTypeScriptView Raw
1import { ThemeIcon } from '../common/theme';
2import { URI } from 'vscode-uri';
3export interface IconDefinition {
4 font?: IconFontContribution;
5 fontCharacter: string;
6}
7export interface IconContribution {
8 readonly id: string;
9 description: string | undefined;
10 deprecationMessage?: string;
11 readonly defaults: ThemeIcon | IconDefinition;
12}
13export interface IconFontContribution {
14 readonly id: string;
15 readonly definition: IconFontDefinition;
16}
17export interface IconFontDefinition {
18 readonly weight?: string;
19 readonly style?: string;
20 readonly src: IconFontSource[];
21}
22export interface IconFontSource {
23 readonly location: URI;
24 readonly format: string;
25}
26export declare const IconRegistry: unique symbol;
27export interface IconRegistry {
28 /**
29 * Register a icon to the registry.
30 * @param id The icon id
31 * @param defaults The default values
32 * @param description The description
33 */
34 registerIcon(id: string, defaults: ThemeIcon | IconDefinition, description?: string): ThemeIcon;
35 /**
36 * Deregister a icon from the registry.
37 * @param id The icon id
38 */
39 deregisterIcon(id: string): void;
40 /**
41 * Register a icon font to the registry.
42 * @param id The icon font id
43 * @param definition The icon font definition
44 */
45 registerIconFont(id: string, definition: IconFontDefinition): IconFontDefinition;
46 /**
47 * Deregister an icon font from the registry.
48 * @param id The icon font id
49 */
50 deregisterIconFont(id: string): void;
51 /**
52 * Get the icon font for the given id
53 * @param id The icon font id
54 */
55 getIconFont(id: string): IconFontDefinition | undefined;
56}
57//# sourceMappingURL=icon-registry.d.ts.map
\No newline at end of file