wps-jsapi-declare
Version:
95 lines (85 loc) • 10.6 kB
TypeScript
declare namespace WPS {
interface WpsApiEvent extends ApiEvent {
AddApiEventListener(EventName: 'DocumentOpen', callback: string | ((Document: Wps.Document) => void)): void;
AddApiEventListener(EventName: 'DocumentBeforeClose', callback: string | ((Document: Wps.Document) => void)): void;
AddApiEventListener(EventName: 'DocumentBeforeSave', callback: string | ((Document: Wps.Document) => void)): void;
AddApiEventListener(EventName: 'WindowActivate', callback: string | ((Document: Wps.Document, Window: Wps.Window) => void)): void;
AddApiEventListener(EventName: 'WindowDeactivate', callback: string | ((Document: Wps.Document, Window: Wps.Window) => void)): void;
AddApiEventListener(EventName: 'DocumentAfterClose', callback: string | ((Document: Wps.Document) => void)): void;
AddApiEventListener(EventName: 'WindowSelectionChange', callback: string | ((Selection: Wps.Selection) => void)): void;
AddApiEventListener(EventName: 'SelectionAfterStyleChange', callback: string | ((Selection: Wps.Selection) => void)): void;
AddApiEventListener(EventName: 'DocumentNew', callback: string | ((Document: Wps.Document) => void)): void;
AddApiEventListener(EventName: 'DocumentRightsInfo', callback: string | ((Document: Wps.Document) => void)): void;
AddApiEventListener(EventName: 'DocumentBeforeCopy', callback: string | ((Document: Wps.Document) => void)): void;
AddApiEventListener(EventName: 'DocumentBeforePaste', callback: string | ((Document: Wps.Document) => void)): void;
AddApiEventListener(EventName: 'DocumentBeforeNew', callback: string | (() => void)): void;
AddApiEventListener(EventName: 'DocumentBeforeOpen', callback: string | ((filePath: string) => void)): void;
AddApiEventListener(EventName: 'DocumentAfterSave', callback: string | ((Document: Wps.Document) => void)): void;
AddApiEventListener(EventName: 'DocumentViewFocusIn', callback: string | ((Document: Wps.Document) => void)): void;
AddApiEventListener(EventName: 'DocumentAfterPrint', callback: string | ((Document: Wps.Document, PrintoutPage: object) => void)): void;
AddApiEventListener(EventName: 'WindowActivate', callback: string | ((Document: Wps.Document, Window: Wps.Window) => void)): void;
AddApiEventListener(EventName: 'WindowDeactivate', callback: string | ((Document: Wps.Document, Window: Wps.Window) => void)): void;
AddApiEventListener(EventName: 'WindowSelectionChange', callback: string | ((Document: Wps.Document) => void)): void;
AddApiEventListener(EventName: 'WindowBeforeRightClick', callback: string | ((Document: Wps.Document) => void)): void;
AddApiEventListener(EventName: 'WindowBeforeDoubleClick', callback: string | ((Document: Wps.Document) => void)): void;
AddApiEventListener(EventName: 'ApplicationQuit', callback: string | ((Document: Wps.Document) => void)): void;
AddApiEventListener(EventName: 'AfterLogin', callback: string | (() => void)): void;
AddApiEventListener(EventName: 'AfterLogout', callback: string | (() => void)): void;
AddApiEventListener(EventName: 'AfterVIPInfoChanged', callback: string | (() => void)): void;
AddApiEventListener(EventName: 'AfterWebExtensionDataRangeChange', callback: string | ((WebShape: object, key: string, dataRange: object) => void)): void;
AddApiEventListener(EventName: 'AfterTaskPaneShow', callback: string | (() => void)): void;
AddApiEventListener(EventName: 'AfterTaskPaneHidden', callback: string | (() => void)): void;
AddApiEventListener(EventName: 'QueryDocumentPrintCopies', callback: string | ((Document: Wps.Document, copieCount: number) => void)): void;
AddApiEventListener(EventName: 'ContentChange', callback: string | ((Document: Wps.Document, Range: Wps.Range, changeType: number) => void)): void;
AddApiEventListener(EventName: 'SelectionAfterStyleChange', callback: string | ((Selection: Wps.Selection) => void)): void;
AddApiEventListener(EventName: 'FileAfterSave', callback: string | ((Document: Wps.Document, filePath: string, format: string) => void)): void;
AddApiEventListener(EventName: 'ContentControlAfterAdd', callback: string | ((NewContentControl: Wps.ContentControl, InUndoRedo: boolean) => void)): void;
AddApiEventListener(EventName: 'ContentControlBeforeDelete', callback: string | ((NewContentControl: Wps.ContentControl, InUndoRedo: boolean) => void)): void;
AddApiEventListener(EventName: 'ContentControlOnExit', callback: string | ((ContentControl: Wps.ContentControl, InUndoRedo: boolean) => void)): void;
AddApiEventListener(EventName: 'ContentControlOnEnter', callback: string | ((ContentControl: Wps.ContentControl) => void)): void;
AddApiEventListener(EventName: 'ContentControlBeforeStoreUpdate', callback: string | ((ContentControl: Wps.ContentControl, Content: string) => void)): void;
AddApiEventListener(EventName: 'ContentControlBeforeContentUpdate', callback: string | ((ContentControl: Wps.ContentControl, Content: string) => void)): void;
RemoveApiEventListener(EventName: 'DocumentOpen', callback?: string | ((Document: Wps.Document) => void)): void;
RemoveApiEventListener(EventName: 'DocumentBeforeClose', callback?: string | ((Document: Wps.Document) => void)): void;
RemoveApiEventListener(EventName: 'DocumentBeforeSave', callback?: string | ((Document: Wps.Document) => void)): void;
RemoveApiEventListener(EventName: 'WindowActivate', callback?: string | ((Document: Wps.Document, Window: Wps.Window) => void)): void;
RemoveApiEventListener(EventName: 'WindowDeactivate', callback?: string | ((Document: Wps.Document, Window: Wps.Window) => void)): void;
RemoveApiEventListener(EventName: 'DocumentAfterClose', callback?: string | ((Document: Wps.Document) => void)): void;
RemoveApiEventListener(EventName: 'WindowSelectionChange', callback?: string | ((Selection: Wps.Selection) => void)): void;
RemoveApiEventListener(EventName: 'SelectionAfterStyleChange', callback?: string | ((Selection: Wps.Selection) => void)): void;
RemoveApiEventListener(EventName: 'DocumentNew', callback?: string | ((Document: Wps.Document) => void)): void;
RemoveApiEventListener(EventName: 'DocumentRightsInfo', callback?: string | ((Document: Wps.Document) => void)): void;
RemoveApiEventListener(EventName: 'DocumentBeforeCopy', callback?: string | ((Document: Wps.Document) => void)): void;
RemoveApiEventListener(EventName: 'DocumentBeforePaste', callback?: string | ((Document: Wps.Document) => void)): void;
RemoveApiEventListener(EventName: 'DocumentBeforeNew', callback?: string | (() => void)): void;
RemoveApiEventListener(EventName: 'DocumentBeforeOpen', callback?: string | ((filePath: string) => void)): void;
RemoveApiEventListener(EventName: 'DocumentAfterSave', callback?: string | ((Document: Wps.Document) => void)): void;
RemoveApiEventListener(EventName: 'DocumentViewFocusIn', callback?: string | ((Document: Wps.Document) => void)): void;
RemoveApiEventListener(EventName: 'DocumentAfterPrint', callback?: string | ((Document: Wps.Document, PrintoutPage: object) => void)): void;
RemoveApiEventListener(EventName: 'WindowActivate', callback?: string | ((Document: Wps.Document, Window: Wps.Window) => void)): void;
RemoveApiEventListener(EventName: 'WindowDeactivate', callback?: string | ((Document: Wps.Document, Window: Wps.Window) => void)): void;
RemoveApiEventListener(EventName: 'WindowSelectionChange', callback?: string | ((Document: Wps.Document) => void)): void;
RemoveApiEventListener(EventName: 'WindowBeforeRightClick', callback?: string | ((Document: Wps.Document) => void)): void;
RemoveApiEventListener(EventName: 'WindowBeforeDoubleClick', callback?: string | ((Document: Wps.Document) => void)): void;
RemoveApiEventListener(EventName: 'ApplicationQuit', callback?: string | ((Document: Wps.Document) => void)): void;
RemoveApiEventListener(EventName: 'AfterLogin', callback?: string | (() => void)): void;
RemoveApiEventListener(EventName: 'AfterLogout', callback?: string | (() => void)): void;
RemoveApiEventListener(EventName: 'AfterVIPInfoChanged', callback?: string | (() => void)): void;
RemoveApiEventListener(EventName: 'AfterWebExtensionDataRangeChange', callback?: string | ((WebShape: object, key: string, dataRange: object) => void)): void;
RemoveApiEventListener(EventName: 'AfterTaskPaneShow', callback?: string | (() => void)): void;
RemoveApiEventListener(EventName: 'AfterTaskPaneHidden', callback?: string | (() => void)): void;
RemoveApiEventListener(EventName: 'QueryDocumentPrintCopies', callback?: string | ((Document: Wps.Document, copieCount: number) => void)): void;
RemoveApiEventListener(EventName: 'ContentChange', callback?: string | ((Document: Wps.Document, Range: Wps.Range, changeType: number) => void)): void;
RemoveApiEventListener(EventName: 'SelectionAfterStyleChange', callback?: string | ((Selection: Wps.Selection) => void)): void;
RemoveApiEventListener(EventName: 'FileAfterSave', callback?: string | ((Document: Wps.Document, filePath: string, format: string) => void)): void;
RemoveApiEventListener(EventName: 'ContentControlAfterAdd', callback?: string | ((NewContentControl: Wps.ContentControl, InUndoRedo: boolean) => void)): void;
RemoveApiEventListener(EventName: 'ContentControlBeforeDelete', callback?: string | ((NewContentControl: Wps.ContentControl, InUndoRedo: boolean) => void)): void;
RemoveApiEventListener(EventName: 'ContentControlOnExit', callback?: string | ((ContentControl: Wps.ContentControl, InUndoRedo: boolean) => void)): void;
RemoveApiEventListener(EventName: 'ContentControlOnEnter', callback?: string | ((ContentControl: Wps.ContentControl) => void)): void;
RemoveApiEventListener(EventName: 'ContentControlBeforeStoreUpdate', callback?: string | ((ContentControl: Wps.ContentControl, Content: string) => void)): void;
RemoveApiEventListener(EventName: 'ContentControlBeforeContentUpdate', callback?: string | ((ContentControl: Wps.ContentControl, Content: string) => void)): void;
}
interface WpsAddonRoot {
ApiEvent: WpsApiEvent;
}
}