diff --git a/types/dwt/Dynamsoft.d.ts b/types/dwt/Dynamsoft.d.ts index 8ed3e24688..a203071a4c 100644 --- a/types/dwt/Dynamsoft.d.ts +++ b/types/dwt/Dynamsoft.d.ts @@ -11,7 +11,7 @@ */ interface DynamsoftStatic { - Lib: DynamsoftLib; + Lib: DynamsoftLib; WebTwainEnv: dwtEnv; } @@ -50,7 +50,7 @@ interface dwtEnv { JSVersion: string; PluginVersion: string; ServerVersionInfo: string; - + RemoveAllAuthorizations(): void; ShowDialog(_dialogWidth: number, _dialogHeight: number, _strDialogMessageWithHtmlFormat: string, _bChangeImage: boolean, bHideCloseButton: boolean): void; CloseDialog(): void; @@ -107,6 +107,7 @@ interface DynamsoftLib { */ hideMask(): void; showMask(): void; + getScript(url: string, bAsync: boolean, callback: () => void): void; } /** @@ -3785,7 +3786,7 @@ interface WebTwain { /*ingored SourceNameItems */ - + /** * Shows the GUI of Image Editor. * @method WebTwain#startScan @@ -3812,14 +3813,14 @@ interface WebTwain { */ UnregisterEvent(name: string, evt: object): boolean; - TagImages(aryImageIndices: number[], tagName: string): boolean; - + TagImages(aryImageIndices: number[], tagName: string): boolean; + SetDefaultTag(tagName: string): boolean; - + ClearImageTags(sImageIndex: number): boolean; - + FilterImagesByTag(tagName: string): boolean; - + /*ignored checkErrorString first @@ -3832,5 +3833,5 @@ interface WebTwain { ...other internal ones */ - Addon: DynamsoftWebTwainAddon; + Addon: DynamsoftWebTwainAddon; } diff --git a/types/dwt/dbr.d.ts b/types/dwt/dbr.d.ts index 387cbfcd19..001b7e33f0 100644 --- a/types/dwt/dbr.d.ts +++ b/types/dwt/dbr.d.ts @@ -10,27 +10,27 @@ * Author: Dynamsoft Support Team */ +interface Region { + left: number; + top: number; + right: number; + bottom: number; + measuredByPercentage: number; +} + interface RunTimeSetting { - mAntiDamageLevel: number; - mBarcodeFormatIds: number; - mBarcodeInvertMode: number; - mBinarizationBlockSize: number; - mColourImageConvertMode: number; - mDeblurLevel: number; - mEnableFillBinaryVacancy: number; - mExpectedBarcodesCount: number; - mGrayEqualizationSensitivity: number; - mLocalizationAlgorithmPriority: string; - mMaxAlgorithmThreadCount: number; - mMaxBarcodesCount: number; - mMaxDimOfFullImageAsBarcodeZone: number; - mPDFRasterDPI: number; - mRegionPredetectionMode: number; - mReserved: string; - mScaleDownThreshold: number; - mTextFilterMode: number; - mTextureDetectionSensitivity: number; - mTimeout: number; + barcodeFormatIds: number; + binarizationModes: number[]; + deblurLevel: number; + expectedBarcodesCount: number; + localizationModes: number[]; + minBarcodeTextLength: number; + minResultConfidence: number; + region: Region; + resultCoordinateType: number; + scaleDownThreshold: number; + textResultOrderModes: number[]; + timeout: number; } interface dbrEnv { @@ -38,12 +38,14 @@ interface dbrEnv { logLevel: number; productKey: string; resourcesPath: string; + hideDWASInstallDialog: boolean; + disableAutoDownloadModule: boolean; onAutoConnectServiceSuccess(): void; onAutoConnectServiceError(status: any): void; } interface TaskQueue { - push(task: (bLoadingWhenPush: boolean) => void, context?: any, args?: []): void; + push(task: (bLoadingWhenPush: boolean) => void, context?: any, args?: []): void; unshift(task: (bLoadingWhenPush: boolean) => void, context?: any, args?: []): void; next(): void; } @@ -111,12 +113,12 @@ declare namespace dynamsoft { DBR_RESERVEDINFO_NOT_MATCHED = -10040, DBR_DBRERR_AZTEC_LICENSE_INVALID = -10041 } - + enum EnumConflictMode { ECM_Ignore = 1, ECM_Overwrite = 2 } - + enum EnumImagePixelFormat { IPF_Binary = 0, IPF_BinaryInverted = 1, @@ -127,21 +129,21 @@ declare namespace dynamsoft { IPF_RGB_888 = 6, IPF_ARGB_8888 = 7 } - + enum EnumResultType { EDT_CandidateText = 2, EDT_PartialText = 3, EDT_RawText = 1, EDT_StandardText = 0 } - + enum EnumTerminateStage { ETS_Localized = 1, ETS_Prelocalized = 0, ETS_Recognized = 2 } - } - + } + class BarcodeReader { /** * Constructs a new KPainter @@ -153,8 +155,15 @@ declare namespace dynamsoft { static name: string; static length: number; static version: string; - - // appendTplStringToRuntimeSettings(b, d): + + /** + * Append a new template string to current runtime settings. + * @method BarcodeReader#decode + * @param {string} content A JSON string that represents the content of the settings. + * @param {number} emSettingPriority The parameter setting mode, which decides to inherit parameters from previous template setting or overwrite previous settings and replace by new template. + * @return {void} + */ + appendTplStringToRuntimeSettings(content: string, emSettingPriority: number): void; /** * Read barcode from the source image. * @method BarcodeReader#decode @@ -203,7 +212,7 @@ declare namespace dynamsoft { resetRuntimeSettings(): void; updateRuntimeSettings(setting: RunTimeSetting): void; } - + let TaskQueue: TaskQueue; let dbrEnv: dbrEnv; /**dbrMasterPage20170526 */