UNPKG

@mescius/dsimageviewer

Version:

Document Solutions Image Viewer

60 lines (59 loc) 2.1 kB
//@ts-ignore import { CancellationToken, PluginModel } from "@grapecity/viewer-core"; import { ImageMimeType } from "../Utils/ImageFormatUtils"; export declare type ImageFormatName = "jpg" | "png" | "tiff" | "gif" | "bmp" | "ico" | "svg" | "webp"; export declare enum ImageFormatCode { Default = 0, JPEG = 1, PNG = 2, TIFF = 3, GIF = 4, BMP = 5, ICO = 6, SVG = 7, WEBP = 8 } export declare type OpenParameters = { imageFormat?: ImageFormatCode | ImageFormatName | ImageFormatCode; imageDPI?: number; fileName?: string; }; export declare type LogLevel = 'None' | 'Critical' | 'Error' | 'Warning' | 'Information' | 'Debug' | 'Trace'; export declare type CopyBufferData = { type: 'any' | 'empty'; data?: any; }; export declare type ViewerFeatureName = 'DragAndDrop' | 'Print'; export interface GcImageViewerRunEventsSink { inProgress?: boolean; start(): any; progress(message: PluginModel.ProgressMessage): Promise<void>; completed(framesCount: number): any; invalidatePage(index: number, count?: number): void; cancel: CancellationToken; reportError(params: { readonly severity?: "error" | "warn" | "info" | "debug"; readonly message: string; readonly details?: string; }): void; } export declare type KeyboardShortcutDefinition = { keyCode?: number; ctrl?: boolean; shift?: boolean; alt?: boolean; meta?: boolean; tool: KeyboardShortcutTool | Function; }; export declare type KeyboardShortcutTool = "zoomIn" | "zoomOut" | "zoomActualSize" | "zoomPageWidth" | "rotate" | "rotateBackward" | "open" | "print" | "undo" | "redo" | "confirmChanges" | "cancelChanges" | "save"; export declare type SaveOptions = { convertToFormat?: ImageFormatCode | ImageMimeType; fileName?: string; original?: boolean; }; export declare type SaveAsMenuOptions = { availableFormats?: ImageMimeType[]; }; export declare type SaveButtonOptions = { saveAsMenu?: boolean | SaveAsMenuOptions; } & SaveOptions;