From 44a2081dfd363db990550045ad59329f8dfbf21a Mon Sep 17 00:00:00 2001 From: zhangwendi Date: Fri, 24 Jun 2022 15:38:00 +0800 Subject: [PATCH 01/48] add diskId in volume and change return type Signed-off-by: zhangwendi --- api/@ohos.volumeManager.d.ts | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/api/@ohos.volumeManager.d.ts b/api/@ohos.volumeManager.d.ts index 42a714605f..416ed23c03 100644 --- a/api/@ohos.volumeManager.d.ts +++ b/api/@ohos.volumeManager.d.ts @@ -34,6 +34,7 @@ declare namespace volumeManager { export interface Volume { id: string; uuid: string; + diskId: string; description: string; removable: boolean; state: number; @@ -43,6 +44,7 @@ declare namespace volumeManager { * Get All Volumes * * @since 9 + * @return Returns the information of all volumes * @syscap SystemCapability.FileManagement.StorageService.Volume * @permission ohos.permission.STORAGE_MANAGER * @systemapi @@ -55,6 +57,7 @@ function getAllVolumes(): Promise>; * Mount * * @since 9 + * @param volumeId that indicates the volume * @syscap SystemCapability.FileManagement.StorageService.Volume * @permission ohos.permission.MOUNT_UNMOUNT_MANAGER * @systemapi @@ -66,6 +69,7 @@ function mount(volumeId: string): Promise; * UnMount * * @since 9 + * @param volumeId that indicates the volume * @syscap SystemCapability.FileManagement.StorageService.Volume * @permission ohos.permission.MOUNT_UNMOUNT_MANAGER * @systemapi @@ -77,6 +81,7 @@ function unmount(volumeId: string): Promise; * Get the volume by uuid. * * @since 9 + * @param uuid of volume * @syscap SystemCapability.FileManagement.StorageService.Volume * @permission ohos.permission.STORAGE_MANAGER * @systemapi @@ -88,17 +93,20 @@ function getVolumeByUuid(uuid: string): Promise; * Get the volume by id. * * @since 9 + * @param volumeId that indicates the volume * @syscap SystemCapability.FileManagement.StorageService.Volume * @permission ohos.permission.STORAGE_MANAGER * @systemapi */ -function getVolumeById(id: string, callback: AsyncCallback): void; -function getVolumeById(id: string): Promise; +function getVolumeById(volumeId: string, callback: AsyncCallback): void; +function getVolumeById(volumeId: string): Promise; /** * Set the description of volume. * * @since 9 + * @param uuid of volume + * @param new description of volume * @syscap SystemCapability.FileManagement.StorageService.Volume * @permission ohos.permission.MOUNT_UNMOUNT_MANAGER * @systemapi @@ -110,24 +118,28 @@ function setVolumeDescription(uuid: string, description: string): Promise; * Format. * * @since 9 + * @param volumeId that indicates the volume + * @param the file system type after formatting * @syscap SystemCapability.FileManagement.StorageService.Volume * @permission ohos.permission.MOUNT_FORMAT_MANAGER * @systemapi */ -function format(volId: string, callback: AsyncCallback): void; -function format(volId: string): Promise; +function format(volumeId: string, fsType: string, callback: AsyncCallback): void; +function format(volumeId: string, fsType: string): Promise; /** * Partition. * * @since 9 + * @param diskId that indicates the disk + * @param type of partition such as private partition or publick partition * @syscap SystemCapability.FileManagement.StorageService.Volume * @permission ohos.permission.MOUNT_FORMAT_MANAGER * @systemapi */ -function partition(volId: string, fstype: string, callback: AsyncCallback): void; -function partition(volId: string, fstype: string): Promise; +function partition(diskId: string, type: number, callback: AsyncCallback): void; +function partition(diskId: string, type: number): Promise; } export default volumeManager; -- Gitee From bf390653bc8efc54f8a230d4f39e18d391a89754 Mon Sep 17 00:00:00 2001 From: xiongjun_gitee Date: Wed, 13 Jul 2022 15:05:13 +0800 Subject: [PATCH 02/48] fixed e8c45e3 from https://gitee.com/xiongjun_gitee/interface_sdk-js/pulls/2149 onHttpAuthRequest add host realm Signed-off-by: xiongjun_gitee --- api/@internal/component/ets/web.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index f2b0c93a3a..ffb8faf6bc 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -342,7 +342,7 @@ declare class HitTestValue { * Defines the http auth request result, related to {@link onHttpAuthRequest} method. * @since 9 */ -declare class WebHttpAuthResult { +declare class HttpAuthHandler { /** * Constructor. * @since 9 @@ -1364,7 +1364,7 @@ declare class WebAttribute extends CommonMethod { * * @since 9 */ - onHttpAuthRequest(callback: (event?: { result: WebHttpAuthResult }) => boolean): WebAttribute; + onHttpAuthRequest(callback: (event?: { handler: HttpAuthHandler, host: string, realm: string }) => boolean): WebAttribute; /** * Triggered when the resouces loading is intercepted. -- Gitee From 3387958b5b707da9a398cf18bf5309022f4ba657 Mon Sep 17 00:00:00 2001 From: wangtiantian Date: Sat, 16 Jul 2022 11:28:40 +0800 Subject: [PATCH 03/48] fixed 7683e02 from https://gitee.com/wang19954/interface_sdk-js/pulls/2192 IssueNo:#I5HE3P:fix bug Description: fix bug Sig:SIG_ApplicaitonFramework Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: wangtiantian --- api/@ohos.bundle.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index 0b2eff47d6..c27071385f 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -896,7 +896,7 @@ declare namespace bundle { * @systemapi Hide this for inner system use */ function setDisposedStatus(bundleName: string, status: number, callback: AsyncCallback): void; - function setDisposedStatus(bundleName: string, status: number,): Promise; + function setDisposedStatus(bundleName: string, status: number): Promise; /** * Obtains the disposed status of a specified bundle. -- Gitee From 7a0888763a7330a9d609f84824129b9bfb5bfe9c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Jul 2022 10:17:41 +0800 Subject: [PATCH 04/48] fixed 344313a from https://gitee.com/littlejerry1/interface_sdk-js/pulls/2200 add user Signed-off-by: unknown --- api/application/ExtensionContext.d.ts | 1 + api/application/ServiceExtensionContext.d.ts | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/api/application/ExtensionContext.d.ts b/api/application/ExtensionContext.d.ts index c265080057..3e20d41b8e 100644 --- a/api/application/ExtensionContext.d.ts +++ b/api/application/ExtensionContext.d.ts @@ -16,6 +16,7 @@ import { HapModuleInfo } from "../bundle/hapModuleInfo"; import { Configuration } from '../@ohos.application.Configuration'; import Context from "./Context"; +import { ExtensionAbilityInfo } from "../bundle/extensionAbilityInfo"; /** * The context of an extension. It allows access to extension-specific resources. diff --git a/api/application/ServiceExtensionContext.d.ts b/api/application/ServiceExtensionContext.d.ts index ee956cba6d..87bfcc90b7 100644 --- a/api/application/ServiceExtensionContext.d.ts +++ b/api/application/ServiceExtensionContext.d.ts @@ -18,7 +18,6 @@ import { ConnectOptions } from "../ability/connectOptions"; import ExtensionContext from "./ExtensionContext"; import Want from "../@ohos.application.Want"; import StartOptions from "../@ohos.application.StartOptions"; -import { ExtensionAbilityInfo } from "../bundle/extensionAbilityInfo"; /** * The context of service extension. It allows access to -- Gitee From 1073687ef2117456d3308b978ae237389edf5f3a Mon Sep 17 00:00:00 2001 From: "zhangyafei.echo" Date: Wed, 20 Jul 2022 14:35:25 +0800 Subject: [PATCH 05/48] fixed 5c4027a from https://gitee.com/zhangyafei-echo/interface_sdk-js/pulls/2230 IssueNo:#I5HY5W Description:Change CaleeCallBack to CalleeCallBack Sig:SIG_ApplicationFramework Feature or BugFix: Feature Binary Source: No Signed-off-by: zhangyafei.echo Change-Id: Ieee785af8160519b381b8886ff8c1654caea5c89 --- api/@ohos.application.Ability.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.application.Ability.d.ts b/api/@ohos.application.Ability.d.ts index 8a89bbc773..4642593dcd 100755 --- a/api/@ohos.application.Ability.d.ts +++ b/api/@ohos.application.Ability.d.ts @@ -44,7 +44,7 @@ export interface OnReleaseCallBack { * @return rpc.Sequenceable * @StageModelOnly */ -export interface CaleeCallBack { +export interface CalleeCallBack { (indata: rpc.MessageParcel): rpc.Sequenceable; } @@ -123,7 +123,7 @@ export interface Callee { * @return - * @StageModelOnly */ - on(method: string, callback: CaleeCallBack): void; + on(method: string, callback: CalleeCallBack): void; /** * Unregister data listener callback. -- Gitee From c8dc87117f57ee45875b83180add3b25e10f717f Mon Sep 17 00:00:00 2001 From: kangchongtao Date: Fri, 15 Jul 2022 15:58:49 +0800 Subject: [PATCH 06/48] =?UTF-8?q?fixed=2075b4633=20from=20https://gitee.co?= =?UTF-8?q?m/kangchongtao/interface=5Fsdk-js/pulls/2188=20=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=9A=82=E6=9C=AA=E5=AE=9E=E7=8E=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: kangchongtao Change-Id: I51d1bf8fdb7d25e8b610efb23139408168e61c50 --- api/@internal/component/ets/grid_row.d.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/api/@internal/component/ets/grid_row.d.ts b/api/@internal/component/ets/grid_row.d.ts index 8ce36fd362..46b637bb36 100644 --- a/api/@internal/component/ets/grid_row.d.ts +++ b/api/@internal/component/ets/grid_row.d.ts @@ -214,18 +214,6 @@ interface GridRowInterface { } declare class GridRowAttribute extends CommonMethod { - /** - * Set the alignment of sub components in the vertical direction - * @since 9 - */ - verticalAlign(value: VerticalAlign): GridRowAttribute; - - /** - * Set the alignment of sub components in the horizontal direction - * @since 9 - */ - horizontalAlign(value: HorizontalAlign): GridRowAttribute; - /** * Callback triggered when the breakpoint changes * @since 9 -- Gitee From e89dffa5a78edd78a1291904da2475a820afe89d Mon Sep 17 00:00:00 2001 From: ma-shaoyin Date: Thu, 21 Jul 2022 10:19:56 +0800 Subject: [PATCH 07/48] Signed-off-by: ma-shaoyin Changes to be committed: --- api/@ohos.inputmethod.d.ts | 9 ---- api/@ohos.inputmethodengine.d.ts | 77 -------------------------------- 2 files changed, 86 deletions(-) diff --git a/api/@ohos.inputmethod.d.ts b/api/@ohos.inputmethod.d.ts index 7a47e7b3c7..3dd2fe264d 100644 --- a/api/@ohos.inputmethod.d.ts +++ b/api/@ohos.inputmethod.d.ts @@ -59,15 +59,6 @@ declare namespace inputMethod { */ function switchInputMethod(target: InputMethodProperty): Promise; - /** - * Get current input method - * @since 9 - * @return The InputMethodProperty object of the current input method - * @syscap SystemCapability.MiscServices.InputMethodFramework - * @StageModelOnly - */ - function getCurrentInputMethod(): InputMethodProperty; - /** * @since 8 */ diff --git a/api/@ohos.inputmethodengine.d.ts b/api/@ohos.inputmethodengine.d.ts index 51f2366f93..f1b27c9b1a 100644 --- a/api/@ohos.inputmethodengine.d.ts +++ b/api/@ohos.inputmethodengine.d.ts @@ -164,83 +164,6 @@ declare namespace inputMethodEngine { readonly keyCode: number; readonly keyAction: number; } - - /** - * The extension context class of input method. - * - * @since 9 - * @syscap SystemCapability.MiscServices.InputMethodFramework - * @StageModelOnly - */ - class InputMethodExtensionContext extends ExtensionContext { - - /** - * Input method extension uses this method to start a specific ability. - * - * @since 9 - * @syscap SystemCapability.MiscServices.InputMethodFramework - * @param want Indicates the ability to start. - * @param options Indicates the start options. - * @return - - * @StageModelOnly - */ - startAbility(want: Want, callback: AsyncCallback): void; - startAbility(want: Want, options: StartOptions, callback: AsyncCallback): void; - startAbility(want: Want, options?: StartOptions): Promise; - - /** - * Destroy the input method extension. - * - * @since 9 - * @syscap SystemCapability.MiscServices.InputMethodFramework - * @return - - * @StageModelOnly - */ - terminateSelf(callback: AsyncCallback): void; - terminateSelf(): Promise; - - } - - /** - * The extension ability class of input method. - * - * @since 9 - * @syscap SystemCapability.MiscServices.InputMethodFramework - * @StageModelOnly - */ - class InputMethodExtensionAbility { - - /** - * Indicates input method extension ability context. - * - * @since 9 - * @syscap SystemCapability.MiscServices.InputMethodFramework - * @StageModelOnly - */ - context: InputMethodExtensionContext; - - /** - * Called back when a input method extension is started for initialization. - * - * @since 9 - * @syscap SystemCapability.MiscServices.InputMethodFramework - * @param want Indicates the want of created service extension. - * @return - - * @StageModelOnly - */ - onCreate(want: Want): void; - - /** - * Called back before a input method extension is destroyed. - * - * @since 9 - * @syscap SystemCapability.MiscServices.InputMethodFramework - * @return - - * @StageModelOnly - */ - onDestroy(): void; - - } } export default inputMethodEngine; -- Gitee From 7c4b69f19685ae4249cc64df48852e686a734bba Mon Sep 17 00:00:00 2001 From: ma-shaoyin Date: Thu, 21 Jul 2022 14:42:12 +0800 Subject: [PATCH 08/48] Signed-off-by: ma-shaoyin Changes to be committed: --- api/@ohos.inputmethod.d.ts | 24 ------------------------ api/@ohos.inputmethodengine.d.ts | 7 ------- 2 files changed, 31 deletions(-) diff --git a/api/@ohos.inputmethod.d.ts b/api/@ohos.inputmethod.d.ts index 3dd2fe264d..0dbd6256dc 100644 --- a/api/@ohos.inputmethod.d.ts +++ b/api/@ohos.inputmethod.d.ts @@ -63,30 +63,6 @@ declare namespace inputMethod { * @since 8 */ interface InputMethodSetting { - /** - * List input methods - * @since 9 - * @param enable : - * if true, collect enabled input methods. - * if false, collect disabled input methods. - * @return - - * @syscap SystemCapability.MiscServices.InputMethodFramework - * @StageModelOnly - */ - listInputMethod(enable: boolean, callback: AsyncCallback>): void; - - /** - * List input methods - * @since 9 - * @param enable : - * if true, collect enabled input methods. - * if false, collect disabled input methods. - * @return - - * @syscap SystemCapability.MiscServices.InputMethodFramework - * @StageModelOnly - */ - listInputMethod(enable: boolean): Promise>; - /** * @since 8 */ diff --git a/api/@ohos.inputmethodengine.d.ts b/api/@ohos.inputmethodengine.d.ts index f1b27c9b1a..7a55be187d 100644 --- a/api/@ohos.inputmethodengine.d.ts +++ b/api/@ohos.inputmethodengine.d.ts @@ -58,13 +58,6 @@ declare namespace inputMethodEngine { const OPTION_MULTI_LINE: number; const OPTION_NO_FULLSCREEN: number; - /** - * The window styles for inputmethod ability. - * @since 9 - * @syscap SystemCapability.MiscServices.InputMethodFramework - */ - const WINDOW_TYPE_INPUT_METHOD_FLOAT: number; - function getInputMethodEngine(): InputMethodEngine; function createKeyboardDelegate(): KeyboardDelegate; -- Gitee From 6dba00fbbbb7036acb639079d537b012c4d6a78a Mon Sep 17 00:00:00 2001 From: ma-shaoyin Date: Thu, 21 Jul 2022 15:12:15 +0800 Subject: [PATCH 09/48] Signed-off-by: ma-shaoyin Changes to be committed: --- api/@ohos.inputmethodengine.d.ts | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/api/@ohos.inputmethodengine.d.ts b/api/@ohos.inputmethodengine.d.ts index 7a55be187d..82e19e796c 100644 --- a/api/@ohos.inputmethodengine.d.ts +++ b/api/@ohos.inputmethodengine.d.ts @@ -106,28 +106,6 @@ declare namespace inputMethodEngine { getEditorAttribute(callback: AsyncCallback): void; getEditorAttribute(): Promise; - - /** - * Move curosr from input method. - * - * @since 9 - * @syscap SystemCapability.MiscServices.InputMethodFramework - * @param direction Indicates the distance of cursor to be moved. - * @return - - * @StageModelOnly - */ - moveCursor(direction: number, callback: AsyncCallback): void; - - /** - * Move curosr from input method. - * - * @since 9 - * @syscap SystemCapability.MiscServices.InputMethodFramework - * @param direction Indicates the distance of cursor to be moved. - * @return - - * @StageModelOnly - */ - moveCursor(direction: number): Promise; } interface KeyboardDelegate { -- Gitee From dfe2b52f8dc8b024be1dcabab725430c435c63fd Mon Sep 17 00:00:00 2001 From: kangchongtao Date: Sat, 9 Jul 2022 16:33:21 +0800 Subject: [PATCH 10/48] =?UTF-8?q?fixed=203a69fc5=20from=20https://gitee.co?= =?UTF-8?q?m/kangchongtao/interface=5Fsdk-js/pulls/2125=20=E5=AE=8C?= =?UTF-8?q?=E5=96=84gridRow=EF=BC=8CgridCol=E7=BB=84=E4=BB=B6=E5=85=A5?= =?UTF-8?q?=E5=8F=82=E5=8F=AF=E8=BE=93=E5=85=A5=E7=B1=BB=E5=9E=8B=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0GridCol=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: kangchongtao Change-Id: I0b2c5ad5751d9cb4b2501c03234721e503617705 --- api/@internal/component/ets/grid_col.d.ts | 26 +++++++++++++++++++---- api/@internal/component/ets/grid_row.d.ts | 2 +- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/api/@internal/component/ets/grid_col.d.ts b/api/@internal/component/ets/grid_col.d.ts index 82f2162292..cb493ec093 100644 --- a/api/@internal/component/ets/grid_col.d.ts +++ b/api/@internal/component/ets/grid_col.d.ts @@ -64,19 +64,19 @@ declare interface GridColOptions { * Sets the span of current gird-container item. * @since 9 */ - span?: GridColColumnOption; + span?: number | GridColColumnOption; /** * Sets the offset of current gird-container item. * @since 9 */ - offset?: GridColColumnOption; + offset?: number | GridColColumnOption; /** * Sets the order of current gird-container item. * @since 9 */ - order?: GridColColumnOption; + order?: number | GridColColumnOption; } @@ -92,7 +92,25 @@ interface GridColInterface { (optiion?: GridColOptions): GridColAttribute; } -declare class GridColAttribute extends CommonMethod {} +declare class GridColAttribute extends CommonMethod { + /** + * Sets the span of current gird-container item. + * @since 9 + */ + span(value: number | GridColColumnOption): GridRowAttribute; + + /** + * Sets the offset of current gird-container item. + * @since 9 + */ + offset(value: number | GridColColumnOption): GridRowAttribute; + + /** + * Sets the order of current gird-container item. + * @since 9 + */ + order(value: number | GridColColumnOption): GridRowAttribute; +} declare const GridCol: GridColInterface declare const GridColInstance: GridColAttribute; \ No newline at end of file diff --git a/api/@internal/component/ets/grid_row.d.ts b/api/@internal/component/ets/grid_row.d.ts index 46b637bb36..7418da6909 100644 --- a/api/@internal/component/ets/grid_row.d.ts +++ b/api/@internal/component/ets/grid_row.d.ts @@ -179,7 +179,7 @@ declare interface GridRowOptions { * grid-container layout column spacing. * @since 9 */ - gutter?: GetterOption; + gutter?: Length | GetterOption; /** * Sets the total number of columns in the current layout. -- Gitee From 8f230f961e10128148eb57ab305c44b442bef66c Mon Sep 17 00:00:00 2001 From: houhaoyu Date: Mon, 25 Jul 2022 09:52:06 +0800 Subject: [PATCH 11/48] fixed 104d1c7 from https://gitee.com/houhaoyu/interface_sdk-js/pulls/2264 houhaoyu@huawei.com deprecate system.router Signed-off-by: houhaoyu Change-Id: I547467b3b44b6b9fb9463ee148f8089f7e94cd0d --- api/@internal/ets/index.d.ts | 1 + api/@system.router.d.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/api/@internal/ets/index.d.ts b/api/@internal/ets/index.d.ts index 4a9e2b6b33..6199f45666 100644 --- a/api/@internal/ets/index.d.ts +++ b/api/@internal/ets/index.d.ts @@ -13,5 +13,6 @@ * limitations under the License. */ +export * from './featureability'; export * from './global'; export * from './lifecycle'; diff --git a/api/@system.router.d.ts b/api/@system.router.d.ts index 27f7c78351..0867df975c 100644 --- a/api/@system.router.d.ts +++ b/api/@system.router.d.ts @@ -16,6 +16,7 @@ /** * Defines the option of router. * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @deprecated since 8, please use @ohos.router instead. * @since 3 */ export interface RouterOptions { @@ -44,6 +45,7 @@ export interface RouterOptions { /** * Defines the option of router back. * @syscap SystemCapability.ArkUI.ArkUI.Full + * @deprecated since 8, please use @ohos.router instead. * @since 7 */ export interface BackRouterOptions { @@ -66,6 +68,7 @@ export interface BackRouterOptions { /** * Defines the state of router. * @syscap SystemCapability.ArkUI.ArkUI.Full + * @deprecated since 8, please use @ohos.router instead. * @since 3 */ export interface RouterState { @@ -95,6 +98,7 @@ export interface RouterState { /** * Defines the option of EnableAlertBeforeBackPage. * @syscap SystemCapability.ArkUI.ArkUI.Full + * @deprecated since 8, please use @ohos.router instead. * @since 6 */ export interface EnableAlertBeforeBackPageOptions { @@ -130,6 +134,7 @@ export interface EnableAlertBeforeBackPageOptions { /** * Defines the option of DisableAlertBeforeBackPage. * @syscap SystemCapability.ArkUI.ArkUI.Full + * @deprecated since 8, please use @ohos.router instead. * @since 6 */ export interface DisableAlertBeforeBackPageOptions { @@ -162,6 +167,7 @@ type ParamsInterface = { /** * Defines the Router interface. * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @deprecated since 8, please use @ohos.router instead. * @since 3 */ export default class Router { -- Gitee From 928f89949f70193b4d39ec9c7dddac87a75ca33e Mon Sep 17 00:00:00 2001 From: houhaoyu Date: Sat, 23 Jul 2022 16:06:02 +0800 Subject: [PATCH 12/48] fixed 0531eaa from https://gitee.com/houhaoyu/interface_sdk-js/pulls/2264 houhaoyu@huawei.com add featureAbility in ets Signed-off-by: houhaoyu Change-Id: I855157a15a0a44a0b547c627cd535d8a67ce9ec8 --- BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/BUILD.gn b/BUILD.gn index aee10d9f6c..d1f6685aa4 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -21,6 +21,7 @@ ohos_copy("ets_internal_api") { "api/@internal/ets/index.d.ts", "api/@internal/ets/lifecycle.d.ts", "api/@internal/global.d.ts", + "api/common/full/featureability.d.ts", ] outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] module_source_dir = target_out_dir + "/$target_name" -- Gitee From 62bf1a7404099904a10361f54ba992813eb2750d Mon Sep 17 00:00:00 2001 From: fengzewu Date: Mon, 25 Jul 2022 15:30:11 +0800 Subject: [PATCH 13/48] change since from 8 to 9 Signed-off-by: fengzewu --- api/@ohos.multimedia.image.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.multimedia.image.d.ts b/api/@ohos.multimedia.image.d.ts index 682810e42a..6564ea82b2 100644 --- a/api/@ohos.multimedia.image.d.ts +++ b/api/@ohos.multimedia.image.d.ts @@ -518,14 +518,14 @@ declare namespace image { /** * PixelMap expected format. - * @since 8 + * @since 9 * @syscap SystemCapability.Multimedia.Image.Core */ sourcePixelFormat?: PixelMapFormat; /** * PixelMap size. - * @since 8 + * @since 9 * @syscap SystemCapability.Multimedia.Image.Core */ sourceSize?: Size; -- Gitee From dee25f54b0d2d5f53077648034e0bcbe4c8c44ce Mon Sep 17 00:00:00 2001 From: lverpeng Date: Mon, 25 Jul 2022 20:46:28 +0800 Subject: [PATCH 14/48] =?UTF-8?q?bluetooth=E7=9A=84d.ts=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=90=8D=EF=BC=8C=E6=B3=A8=E9=87=8A=E7=AD=89=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lverpeng --- api/@ohos.bluetooth.d.ts | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/api/@ohos.bluetooth.d.ts b/api/@ohos.bluetooth.d.ts index 54bdf747c1..a02fe6c08f 100644 --- a/api/@ohos.bluetooth.d.ts +++ b/api/@ohos.bluetooth.d.ts @@ -178,8 +178,7 @@ declare namespace bluetooth { * * @return Returns {@code true} if the scan is started successfully; returns {@code false} otherwise. * @since 8 - * @permission ohos.permission.DISCOVER_BLUETOOTH - * @permission ohos.permission.LOCATION + * @permission ohos.permission.DISCOVER_BLUETOOTH and ohos.permission.LOCATION */ function startBluetoothDiscovery(): boolean; @@ -363,7 +362,7 @@ declare namespace bluetooth { * @return Returns instance of profile. * @since 9 */ - function getProfile(profileId: ProfileId): A2dpSourceProfile | HandsFreeAudioGatewayProfile | HidHostProfile | PanProfile; + function getProfileInst(profileId: ProfileId): A2dpSourceProfile | HandsFreeAudioGatewayProfile | HidHostProfile | PanProfile; /** * Base interface of profile. @@ -436,17 +435,8 @@ declare namespace bluetooth { * * @param device The address of the remote device. * @return Returns {@link PlayingState} of the remote device. - * @deprecated since 9 * @since 8 */ - /** - * Obtains the playing state of device. - * - * @param device The address of the remote device. - * @return Returns {@link PlayingState} of the remote device. - * @since 9 - * @permission ohos.permission.USE_BLUETOOTH - */ getPlayingState(device: string): PlayingState; } @@ -628,9 +618,7 @@ declare namespace bluetooth { * {@link ScanOptions#interval} set to 0, {@link ScanOptions#dutyMode} set to {@link SCAN_MODE_LOW_POWER} * and {@link ScanOptions#matchMode} set to {@link MATCH_MODE_AGGRESSIVE}. * @since 7 - * @permission ohos.permission.DISCOVER_BLUETOOTH - * @permission ohos.permission.MANAGE_BLUETOOTH - * @permission ohos.permission.LOCATION + * @permission ohos.permission.DISCOVER_BLUETOOTH and ohos.permission.MANAGE_BLUETOOTH and ohos.permission.LOCATION */ function startBLEScan(filters: Array, options?: ScanOptions): void; -- Gitee From 3ea32089866967193282d0424c0605dcbdd38283 Mon Sep 17 00:00:00 2001 From: liu-binjun Date: Tue, 26 Jul 2022 09:40:00 +0800 Subject: [PATCH 15/48] fix bugs Signed-off-by: liu-binjun --- api/@ohos.geolocation.d.ts | 39 +++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/api/@ohos.geolocation.d.ts b/api/@ohos.geolocation.d.ts index 56c14d6488..d8a755e11c 100644 --- a/api/@ohos.geolocation.d.ts +++ b/api/@ohos.geolocation.d.ts @@ -305,7 +305,7 @@ declare namespace geolocation { function sendCommand(command: LocationCommand) : Promise; /** - * Obtain the current country code. + * obtain the current country code. * * @since 9 * @syscap SystemCapability.Location.Location.Core @@ -321,19 +321,23 @@ declare namespace geolocation { * @syscap SystemCapability.Location.Location.Core * @systemapi * @param scenario Indicates the scenarios where location simulation is required. - * @param callback Indicates whether the position simulation function is enabled. + * @param callback Indicates a callback function, which is used to report the result + * of enabling the location simulation function. If the enabling fails, the error message will + * be carried in the first parameter err of AsyncCallback, If enabling succeeds, no data will be returned. */ function enableLocationMock(scenario?: LocationRequestScenario, callback: AsyncCallback) : void; function enableLocationMock(scenario?: LocationRequestScenario) : Promise; /** - * diable the geographical location simulation function. + * disable the geographical location simulation function. * * @since 9 * @syscap SystemCapability.Location.Location.Core * @systemapi * @param scenario Indicates the scenarios where location simulation is required. - * @param callback Indicates whether the position simulation function is enabled. + * @param callback Indicates a callback function, which is used to report the result + * of disabling the location simulation function. If the disabling fails, the error message will + * be carried in the first parameter err of AsyncCallback, If disabling succeeds, no data will be returned. */ function disableLocationMock(scenario?: LocationRequestScenario, callback: AsyncCallback) : void; function disableLocationMock(scenario?: LocationRequestScenario) : Promise; @@ -345,7 +349,9 @@ declare namespace geolocation { * @syscap SystemCapability.Location.Location.Core * @systemapi * @param config Indicates the configuration parameters for location simulation. - * @param callback Indicates whether the parameters of the location simulation function are set successfully. + * @param callback Indicates a callback function, which is used to report the result of setting + * the simulation locations. If the setting fails, the error message will be carried in the first + * parameter err of AsyncCallback. If the setting succeeds, no data will be returned. */ function setMockedLocations(config: LocationMockConfig, callback: AsyncCallback) : void; function setMockedLocations(config: LocationMockConfig) : Promise; @@ -356,7 +362,9 @@ declare namespace geolocation { * @since 9 * @syscap SystemCapability.Location.Location.Core * @systemapi - * @param callback Indicates whether the reverse geocoding simulation function is enabled. + * @param callback Indicates a callback function, which is used to report the result + * of enabling the reverse geocode simulation function. If the enabling fails, the error message will + * be carried in the first parameter err of AsyncCallback, If enabling succeeds, no data will be returned. */ function enableReverseGeocodingMock(callback: AsyncCallback) : void; function enableReverseGeocodingMock() : Promise; @@ -367,7 +375,9 @@ declare namespace geolocation { * @since 9 * @syscap SystemCapability.Location.Location.Core * @systemapi - * @param callback Indicates whether the reverse geocoding simulation function is enabled. + * @param callback Indicates a callback function, which is used to report the result + * of disabling the reverse geocode simulation function. If the disabling fails, the error message will + * be carried in the first parameter err of AsyncCallback, If disabling succeeds, no data will be returned. */ function disableReverseGeocodingMock(callback: AsyncCallback) : void; function disableReverseGeocodingMock() : Promise; @@ -379,7 +389,10 @@ declare namespace geolocation { * @syscap SystemCapability.Location.Location.Core * @systemapi * @param mockInfos Indicates the set of locations and place names to be simulated. - * @param callback Indicates whether the parameters of the reverse geocoding simulation are set successfully. + * @param callback Indicates a callback function, which is used to report the result of setting + * the configuration parameters for simulating reverse geocoding. If the setting fails, + * the error message will be carried in the first parameter err of AsyncCallback. + * If the setting succeeds, no data will be returned. */ function setReverseGeocodingMockInfo(mockInfos: Array, callback: AsyncCallback) : void; function setReverseGeocodingMockInfo(mockInfos: Array) : Promise; @@ -631,7 +644,7 @@ declare namespace geolocation { addressUrl?: string; /** - * Indicates the amount of additional descriptive information. + * Indicates additional information. * @since 7 */ descriptions?: Array; @@ -751,7 +764,7 @@ declare namespace geolocation { additionSize?: number; /** - * Indicates whether it is an mock GeoAddress + * Indicates whether it is an mock location. * @since 9 */ isFromMock: Boolean; @@ -797,7 +810,7 @@ declare namespace geolocation { export enum GeoLocationErrorCode { /** * Indicates function not supported. - * @since 7 + * @since 9 */ NOT_SUPPORTED = 100, @@ -826,13 +839,13 @@ declare namespace geolocation { LOCATOR_ERROR, /** - * Indicates operation failure caused by abnormal position switch. + * Indicates operation failure caused by abnormal location switch. * @since 7 */ LOCATION_SWITCH_ERROR, /** - * Indicates failed to get the last cache location. + * Indicates failed to get the last known location. * @since 7 */ LAST_KNOWN_LOCATION_ERROR, -- Gitee From e1cf311f0079435aabb91dbadf5a0fbd63e3d21d Mon Sep 17 00:00:00 2001 From: h00514358 Date: Tue, 26 Jul 2022 10:57:03 +0800 Subject: [PATCH 16/48] Signed-off-by:hellohyh001 Signed-off-by: h00514358 --- api/@ohos.sensor.d.ts | 106 +++++++++++++++++++++++++++++----------- api/@ohos.vibrator.d.ts | 1 - 2 files changed, 77 insertions(+), 30 deletions(-) diff --git a/api/@ohos.sensor.d.ts b/api/@ohos.sensor.d.ts index c3d3c65bfe..696c80a977 100644 --- a/api/@ohos.sensor.d.ts +++ b/api/@ohos.sensor.d.ts @@ -20,19 +20,6 @@ import { AsyncCallback, Callback } from "./basic"; * @since 8 * @syscap SystemCapability.Sensors.Sensor * @import import sensor from '@ohos.sensor' - * @permission ohos.permission.ACCELEROMETER, ohos.permission.GYROSCOPE, - * ohos.permission.ACTIVITY_MOTION, ohos.permission.HEALTH_DATA - * @deprecated since 9 (permission type error) - */ - -/** - * This module provides the capability to subscribe to sensor data. - * - * @syscap SystemCapability.Sensors.Sensor - * @import import sensor from '@ohos.sensor' - * @permission ohos.permission.ACCELEROMETER or ohos.permission.GYROSCOPE or - * ohos.permission.ACTIVITY_MOTION or ohos.permission.READ_HEALTH_DATA - * @since 9 */ declare namespace sensor { /** @@ -136,17 +123,21 @@ declare namespace sensor { * @syscap SystemCapability.Sensors.Sensor * @permission ohos.permission.HEALTH_DATA * @since 8 - * @deprecated since 9 (permission type error) + * @deprecated since 9 + * @useinstead SensorType.SENSOR_TYPE_ID_HEART_BEAT_RATE */ + function on(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback: Callback, + options?: Options): void; + /** - * Subscribe to sensor data, If the API is called multiple times, the last call takes effect. - * @param type Indicate the sensor type to listen for, {@code SensorType.SENSOR_TYPE_ID_HEART_RATE}. + * Subscribe to heart rate sensor data. + * @param type Indicate the sensor type to listen for, {@code SensorType.SENSOR_TYPE_ID_HEART_BEAT_RATE}. * @param options Optional parameters specifying the interval at which sensor data is reported, {@code Options}. * @syscap SystemCapability.Sensors.Sensor * @permission ohos.permission.READ_HEALTH_DATA * @since 9 */ - function on(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback: Callback, + function on(type: SensorType.SENSOR_TYPE_ID_HEART_BEAT_RATE, callback: Callback, options?: Options): void; /** @@ -166,10 +157,23 @@ declare namespace sensor { * @syscap SystemCapability.Sensors.Sensor * @permission ohos.permission.ACCELEROMETER * @since 8 + * @deprecated since 9 + * @useinstead SensorType.SENSOR_TYPE_ID_LINEAR_ACCELEROMETER */ function on(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION, callback: Callback, options?: Options): void; + /** + * Subscribe to linear accelerometer data. + * @param type Indicate the sensor type to listen for, {@code SensorType.SENSOR_TYPE_ID_LINEAR_ACCELEROMETER}. + * @param options Optional parameters specifying the interval at which sensor data is reported, {@code Options}. + * @syscap SystemCapability.Sensors.Sensor + * @permission ohos.permission.ACCELEROMETER + * @since 9 + */ + function on(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELEROMETER, callback: Callback, + options?: Options): void; + /** * Subscribe to sensor data, If the API is called multiple times, the last call takes effect. * @param type Indicate the sensor type to listen for, {@code SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD}. @@ -344,16 +348,19 @@ declare namespace sensor { * @syscap SystemCapability.Sensors.Sensor * @permission ohos.permission.HEART_RATE * @since 8 - * @deprecated since 9 (permission type error) + * @deprecated since 9 + * @useinstead SensorType.SENSOR_TYPE_ID_HEART_BEAT_RATE */ + function once(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback: Callback): void; + /** - * Subscribe to sensor data once. - * @param type Indicate the sensor type to listen for, {@code SensorType.SENSOR_TYPE_ID_HEART_RATE}. + * Subscribe to heart rate sensor data once. + * @param type Indicate the sensor type to listen for, {@code SensorType.SENSOR_TYPE_ID_HEART_BEAT_RATE}. * @syscap SystemCapability.Sensors.Sensor * @permission ohos.permission.READ_HEALTH_DATA * @since 9 */ - function once(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback: Callback): void; + function once(type: SensorType.SENSOR_TYPE_ID_HEART_BEAT_RATE, callback: Callback): void; /** * Subscribe to sensor data once. @@ -369,16 +376,19 @@ declare namespace sensor { * @syscap SystemCapability.Sensors.Sensor * @permission ohos.permission.ACCELERATION * @since 8 - * @deprecated since 9 (permission type error) + * @deprecated since 9 + * @useinstead SensorType.SENSOR_TYPE_ID_LINEAR_ACCELEROMETER */ + function once(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION, callback: Callback): void; + /** * Subscribe to sensor data once. - * @param type Indicate the sensor type to listen for, {@code SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION}. + * @param type Indicate the sensor type to listen for, {@code SensorType.SENSOR_TYPE_ID_LINEAR_ACCELEROMETER}. * @syscap SystemCapability.Sensors.Sensor * @permission ohos.permission.ACCELEROMETER * @since 9 */ - function once(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION, callback: Callback): void; + function once(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELEROMETER, callback: Callback): void; /** * Subscribe to sensor data once. @@ -537,17 +547,20 @@ declare namespace sensor { * @syscap SystemCapability.Sensors.Sensor * @permission ohos.permission.HEALTH_DATA * @since 8 - * @deprecated since 9 (permission type error) + * @deprecated since 9 + * @useinstead SensorType.SENSOR_TYPE_ID_HEART_BEAT_RATE */ + function off(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback?: Callback): void; + /** * Subscribe to sensor data, If the API is called multiple times, the last call takes effect. - * @param type Indicate the sensor type to listen for, {@code SensorType.SENSOR_TYPE_ID_HEART_RATE}. + * @param type Indicate the sensor type to listen for, {@code SensorType.SENSOR_TYPE_ID_HEART_BEAT_RATE}. * @param options Optional parameters specifying the interval at which sensor data is reported, {@code Options}. * @syscap SystemCapability.Sensors.Sensor * @permission ohos.permission.READ_HEALTH_DATA * @since 9 */ - function off(type: SensorType.SENSOR_TYPE_ID_HEART_RATE, callback?: Callback): void; + function off(type: SensorType.SENSOR_TYPE_ID_HEART_BEAT_RATE, callback?: Callback): void; /** * Unsubscribe to sensor data. @@ -563,9 +576,20 @@ declare namespace sensor { * @syscap SystemCapability.Sensors.Sensor * @permission ohos.permission.ACCELEROMETER * @since 8 + * @deprecated since 9 + * @useinstead SensorType.SENSOR_TYPE_ID_LINEAR_ACCELEROMETER */ function off(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION, callback?: Callback): void; + /** + * Unsubscribe to sensor data. + * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_LINEAR_ACCELEROMETER}. + * @syscap SystemCapability.Sensors.Sensor + * @permission ohos.permission.ACCELEROMETER + * @since 9 + */ + function off(type: SensorType.SENSOR_TYPE_ID_LINEAR_ACCELEROMETER, callback?: Callback): void; + /** * Unsubscribe to sensor data. * @param type Indicate the sensor type to unsubscribe, {@code SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD}. @@ -843,7 +867,7 @@ declare namespace sensor { } /** - * The type of sensor. + * The type of number. * @syscap SystemCapability.Sensors.Sensor * @since 8 */ @@ -858,7 +882,19 @@ declare namespace sensor { SENSOR_TYPE_ID_HUMIDITY = 13, /**< Humidity sensor */ SENSOR_TYPE_ID_ORIENTATION = 256, /**< Orientation sensor */ SENSOR_TYPE_ID_GRAVITY = 257, /**< Gravity sensor */ + /** + * The type of number. + * @syscap SystemCapability.Sensors.Sensor + * @deprecated since 9 + * @useinstead SENSOR_TYPE_ID_LINEAR_ACCELEROMETER + */ SENSOR_TYPE_ID_LINEAR_ACCELERATION = 258, /**< Linear acceleration sensor */ + /** + * The type of number. + * @syscap SystemCapability.Sensors.Sensor + * @since 9 + */ + SENSOR_TYPE_ID_LINEAR_ACCELEROMETER = 258, /**< Linear acceleration sensor */ SENSOR_TYPE_ID_ROTATION_VECTOR = 259, /**< Rotation vector sensor */ SENSOR_TYPE_ID_AMBIENT_TEMPERATURE = 260, /**< Ambient temperature sensor */ SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED = 261, /**< Uncalibrated magnetic field sensor */ @@ -866,9 +902,21 @@ declare namespace sensor { SENSOR_TYPE_ID_SIGNIFICANT_MOTION = 264, /**< Significant motion sensor */ SENSOR_TYPE_ID_PEDOMETER_DETECTION = 265, /**< Pedometer detection sensor */ SENSOR_TYPE_ID_PEDOMETER = 266, /**< Pedometer sensor */ + /** + * The type of number. + * @syscap SystemCapability.Sensors.Sensor + * @deprecated since 9 + * @useinstead SENSOR_TYPE_ID_HEART_BEAT_RATE + */ SENSOR_TYPE_ID_HEART_RATE = 278, /**< Heart rate sensor */ + /** + * The type of number. + * @syscap SystemCapability.Sensors.Sensor + * @since 9 + */ + SENSOR_TYPE_ID_HEART_BEAT_RATE = 278, /**< Heart rate sensor */ SENSOR_TYPE_ID_WEAR_DETECTION = 280, /**< Wear detection sensor */ - SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED = 281, /**< Uncalibrated acceleration sensor */ + SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED = 281 /**< Uncalibrated acceleration sensor */ } /** diff --git a/api/@ohos.vibrator.d.ts b/api/@ohos.vibrator.d.ts index 7fb0183ac9..de92b16d3c 100755 --- a/api/@ohos.vibrator.d.ts +++ b/api/@ohos.vibrator.d.ts @@ -20,7 +20,6 @@ import { AsyncCallback } from './basic'; * @since 8 * @syscap SystemCapability.Sensors.MiscDevice * @import import vibrator from '@ohos.vibrator' - * @permission ohos.permission.VIBRATE */ declare namespace vibrator { /** -- Gitee From 745f984fbcc23dcd7b9b4cce85d71648c9d92250 Mon Sep 17 00:00:00 2001 From: h00514358 Date: Tue, 26 Jul 2022 15:02:02 +0800 Subject: [PATCH 17/48] Modify sensor js api Signed-off-by: h00514358 --- api/@ohos.vibrator.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/@ohos.vibrator.d.ts b/api/@ohos.vibrator.d.ts index de92b16d3c..e8f1bece16 100755 --- a/api/@ohos.vibrator.d.ts +++ b/api/@ohos.vibrator.d.ts @@ -20,6 +20,14 @@ import { AsyncCallback } from './basic'; * @since 8 * @syscap SystemCapability.Sensors.MiscDevice * @import import vibrator from '@ohos.vibrator' + * @permission ohos.permission.VIBRATE + */ +/** + * This module provides the capability to control motor vibration. + * + * @since 9 + * @syscap SystemCapability.Sensors.MiscDevice + * @import import vibrator from '@ohos.vibrator' */ declare namespace vibrator { /** -- Gitee From e0314c7fa9714523b23b88dfacd07352d826f0d2 Mon Sep 17 00:00:00 2001 From: fanxiaoyu Date: Tue, 26 Jul 2022 07:15:38 +0000 Subject: [PATCH 18/48] add sendRequestAsync interface for ipc Signed-off-by: fanxiaoyu --- api/@ohos.rpc.d.ts | 139 ++++++++++++++++++++++++++++++++------------- 1 file changed, 98 insertions(+), 41 deletions(-) diff --git a/api/@ohos.rpc.d.ts b/api/@ohos.rpc.d.ts index 2f2119fc3a..34f5edc604 100644 --- a/api/@ohos.rpc.d.ts +++ b/api/@ohos.rpc.d.ts @@ -825,6 +825,26 @@ declare namespace rpc { */ queryLocalInterface(descriptor: string): IRemoteBroker; + /** + * Sends a {@link MessageParcel} message to the peer process in synchronous or asynchronous mode. + * + *

If asynchronous mode is set for {@code option}, a response is returned immediately. + * If synchronous mode is set for {@code option}, the interface will wait for a response from the peer process + * until the request times out. The user must prepare {@code reply} for receiving the execution result + * given by the peer process. + * + * @param code Indicates the message code, which is determined by both sides of the communication. + * If the interface is generated by the IDL tool, the message code is automatically generated by IDL. + * @param data Indicates the {@link MessageParcel} object sent to the peer process. + * @param reply Indicates the {@link MessageParcel} object returned by the peer process. + * @param options Indicates the synchronous or asynchronous mode to send messages. + * @return Returns {@code true} if the method is called successfully; returns {@code false} otherwise. + * @throws RemoteException Throws this exception if the method fails to be called. + * @deprecated since 8 + * @since 7 + */ + sendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): boolean; + /** * Sends a {@link MessageParcel} message to the peer process in synchronous or asynchronous mode. * @@ -839,29 +859,28 @@ declare namespace rpc { * param operations Indicates the synchronous or asynchronous mode to send messages. * @returns Promise used to return the {@link SendRequestResult} instance. * @throws Throws an exception if the method fails to be called. + * @deprecated since 9 * @since 8 */ sendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): Promise; /** - * Sends a {@link MessageParcel} message to the peer process in synchronous or asynchronous mode. - * - *

If asynchronous mode is set for {@code option}, a response is returned immediately. - * If synchronous mode is set for {@code option}, the interface will wait for a response from the peer process - * until the request times out. The user must prepare {@code reply} for receiving the execution result - * given by the peer process. + * Sends a {@link MessageParcel} message to the peer process asynchronously. * - * @param code Indicates the message code, which is determined by both sides of the communication. - * If the interface is generated by the IDL tool, the message code is automatically generated by IDL. - * @param data Indicates the {@link MessageParcel} object sent to the peer process. - * @param reply Indicates the {@link MessageParcel} object returned by the peer process. - * @param options Indicates the synchronous or asynchronous mode to send messages. - * @return Returns {@code true} if the method is called successfully; returns {@code false} otherwise. - * @throws RemoteException Throws this exception if the method fails to be called. - * @deprecated since 8 - * @since 7 + *

If options indicates the asynchronous mode, a promise will be fulfilled immediately + * and the reply message does not contain any content. If options indicates the synchronous mode, + * a promise will be fulfilled when the response to sendRequest is returned, + * and the reply message contains the returned information. + * param code Message code called by the request, which is determined by the client and server. + * If the method is generated by an IDL tool, the message code is automatically generated by the IDL tool. + * param data {@link MessageParcel} object holding the data to send. + * param reply {@link MessageParcel} object that receives the response. + * param operations Indicates the synchronous or asynchronous mode to send messages. + * @returns Promise used to return the {@link SendRequestResult} instance. + * @throws Throws an exception if the method fails to be called. + * @since 9 */ - sendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): boolean; + sendRequestAsync(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): Promise; /** * Sends a {@link MessageParcel} message to the peer process in synchronous or asynchronous mode. @@ -1070,6 +1089,22 @@ declare namespace rpc { */ onRemoteRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): boolean; + /** + * Sends a request to the peer object. + * + *

If the peer object and {@code RemoteObject} are on the same device, the request is sent by the IPC driver. + * If they are on different devices, the request is sent by the socket driver. + * + * @param code Indicates the message code of the request. + * @param data Indicates the {@link MessageParcel} object storing the data to be sent. + * @param reply Indicates the {@link MessageParcel} object receiving the response data. + * @param options Indicates a synchronous (default) or asynchronous request. + * @return Returns {@code true} if the operation succeeds; returns {@code false} otherwise. + * @deprecated since 8 + * @since 7 + */ + sendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): boolean; + /** * Sends a {@link MessageParcel} message to the peer process in synchronous or asynchronous mode. * @@ -1084,25 +1119,28 @@ declare namespace rpc { * param operations Indicates the synchronous or asynchronous mode to send messages. * @returns Promise used to return the {@link SendRequestResult} instance. * @throws Throws an exception if the method fails to be called. + * @deprecated since 9 * @since 8 */ sendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): Promise; /** - * Sends a request to the peer object. - * - *

If the peer object and {@code RemoteObject} are on the same device, the request is sent by the IPC driver. - * If they are on different devices, the request is sent by the socket driver. + * Sends a {@link MessageParcel} message to the peer process in synchronous or asynchronous mode. * - * @param code Indicates the message code of the request. - * @param data Indicates the {@link MessageParcel} object storing the data to be sent. - * @param reply Indicates the {@link MessageParcel} object receiving the response data. - * @param options Indicates a synchronous (default) or asynchronous request. - * @return Returns {@code true} if the operation succeeds; returns {@code false} otherwise. - * @deprecated since 8 - * @since 7 + *

If options indicates the asynchronous mode, a promise will be fulfilled immediately + * and the reply message does not contain any content. If options indicates the synchronous mode, + * a promise will be fulfilled when the response to sendRequest is returned, + * and the reply message contains the returned information. + * param code Message code called by the request, which is determined by the client and server. + * If the method is generated by an IDL tool, the message code is automatically generated by the IDL tool. + * param data {@link MessageParcel} object holding the data to send. + * param reply {@link MessageParcel} object that receives the response. + * param operations Indicates the synchronous or asynchronous mode to send messages. + * @returns Promise used to return the {@link SendRequestResult} instance. + * @throws Throws an exception if the method fails to be called. + * @since 9 */ - sendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): boolean; + sendRequestAsync(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): Promise; /** * Sends a {@link MessageParcel} message to the peer process in synchronous or asynchronous mode. @@ -1226,6 +1264,23 @@ declare namespace rpc { */ getInterfaceDescriptor(): string; + /** + * Sends a request to the peer object. + * + *

If the peer object and {@code RemoteProxy} are on the same device, the request is sent by the IPC driver. + * If they are on different devices, the request is sent by the socket driver. + * + * @param code Indicates the message code of the request. + * @param data Indicates the {@link MessageParcel} object storing the data to be sent. + * @param reply Indicates the {@link MessageParcel} object receiving the response data. + * @param options Indicates a synchronous (default) or asynchronous request. + * @return Returns {@code true} if the operation succeeds; returns {@code false} otherwise. + * @throws RemoteException Throws this exception if a remote object exception occurs. + * @deprecated since 8 + * @since 7 + */ + sendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): boolean; + /** * Sends a {@link MessageParcel} message to the peer process in synchronous or asynchronous mode. * @@ -1240,26 +1295,28 @@ declare namespace rpc { * param operations Indicates the synchronous or asynchronous mode to send messages. * @returns Promise used to return the {@link sendRequestResult} instance. * @throws Throws an exception if the method fails to be called. + * @deprecated since 9 * @since 8 */ sendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): Promise; /** - * Sends a request to the peer object. - * - *

If the peer object and {@code RemoteProxy} are on the same device, the request is sent by the IPC driver. - * If they are on different devices, the request is sent by the socket driver. + * Sends a {@link MessageParcel} message to the peer process in synchronous or asynchronous mode. * - * @param code Indicates the message code of the request. - * @param data Indicates the {@link MessageParcel} object storing the data to be sent. - * @param reply Indicates the {@link MessageParcel} object receiving the response data. - * @param options Indicates a synchronous (default) or asynchronous request. - * @return Returns {@code true} if the operation succeeds; returns {@code false} otherwise. - * @throws RemoteException Throws this exception if a remote object exception occurs. - * @deprecated since 8 - * @since 7 + *

If options indicates the asynchronous mode, a promise will be fulfilled immediately + * and the reply message does not contain any content. If options indicates the synchronous mode, + * a promise will be fulfilled when the response to sendRequest is returned, + * and the reply message contains the returned information. + * param code Message code called by the request, which is determined by the client and server. + * If the method is generated by an IDL tool, the message code is automatically generated by the IDL tool. + * param data {@link MessageParcel} object holding the data to send. + * param reply {@link MessageParcel} object that receives the response. + * param operations Indicates the synchronous or asynchronous mode to send messages. + * @returns Promise used to return the {@link SendRequestResult} instance. + * @throws Throws an exception if the method fails to be called. + * @since 9 */ - sendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): boolean; + sendRequestAsync(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): Promise; /** * Sends a {@link MessageParcel} message to the peer process in synchronous or asynchronous mode. -- Gitee From bfcac4a6ecfecd5f842d98fb611fe60cfa23e532 Mon Sep 17 00:00:00 2001 From: shikai-123 Date: Tue, 26 Jul 2022 15:29:11 +0800 Subject: [PATCH 19/48] Modify interface name issues: https://gitee.com/openharmony/js_util_module/issues/I5IY2E Signed-off-by: shikai-123 --- api/@ohos.util.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.util.d.ts b/api/@ohos.util.d.ts index f3f42ea249..a46db2c3e7 100644 --- a/api/@ohos.util.d.ts +++ b/api/@ohos.util.d.ts @@ -70,9 +70,9 @@ declare namespace util { * @since 9 * @syscap SystemCapability.Utils.Lang * @param original asynchronous function - * @return return a version that returns promises + * @return return a function that returns promises */ - function promiseWrapper(original: (err: Object, value: Object) => void): Function; + function promisify(original: (err: Object, value: Object) => void): Function; /** * Takes a function following the common error-first callback style, i.e taking an (err, value) => -- Gitee From c7c14d05c316bb2bf04b99c4aa92829899a8aac3 Mon Sep 17 00:00:00 2001 From: dy_study Date: Tue, 26 Jul 2022 15:40:55 +0800 Subject: [PATCH 20/48] =?UTF-8?q?IssueNo:#I5IUX0=20Description:=E5=85=83?= =?UTF-8?q?=E8=83=BD=E5=8A=9B=E6=8E=A5=E5=8F=A3syscap=E5=8F=98=E6=9B=B4=20?= =?UTF-8?q?=E6=8C=91=E5=8D=95beta2=E5=88=86=E6=94=AF=20Sig:SIG=5FApplicati?= =?UTF-8?q?onFramework=20Feature=20or=20Bugfix:Feature=20Binary=20Source:?= =?UTF-8?q?=20No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dy_study Change-Id: I4a01dab38f541a0556b78db328d175ef853e5cc4 --- api/@ohos.application.appManager.d.ts | 22 ++++++ api/application/ApplicationStateObserver.d.ts | 13 +++- api/application/ProcessData.d.ts | 8 +- api/application/ProcessRunningInfo.d.ts | 78 +++++++------------ .../ProcessRunningInformation.d.ts | 50 ++++++++++++ 5 files changed, 115 insertions(+), 56 deletions(-) create mode 100755 api/application/ProcessRunningInformation.d.ts diff --git a/api/@ohos.application.appManager.d.ts b/api/@ohos.application.appManager.d.ts index a116e01990..2d5c500c2a 100644 --- a/api/@ohos.application.appManager.d.ts +++ b/api/@ohos.application.appManager.d.ts @@ -17,6 +17,7 @@ import { AsyncCallback } from './basic'; import ApplicationStateObserver from './application/ApplicationStateObserver'; import AppStateData from './application/AppStateData'; import { ProcessRunningInfo } from './application/ProcessRunningInfo'; +import { ProcessRunningInformation as _ProcessRunningInformation } from './application/ProcessRunningInformation'; /** * This module provides the function of app manager service. @@ -96,6 +97,8 @@ declare namespace appManager { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @return Returns the array of {@link ProcessRunningInfo}. * @permission ohos.permission.GET_RUNNING_INFO + * @deprecated since 9 + * @useinstead getProcessRunningInformation */ function getProcessRunningInfos(): Promise>; function getProcessRunningInfos(callback: AsyncCallback>): void; @@ -131,6 +134,17 @@ declare namespace appManager { function isRamConstrainedDevice(): Promise; function isRamConstrainedDevice(callback: AsyncCallback): void; + /** + * Get information about running processes + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @return Returns the array of {@link ProcessRunningInformation}. + * @permission ohos.permission.GET_RUNNING_INFO + */ + function getProcessRunningInformation(): Promise>; + function getProcessRunningInformation(callback: AsyncCallback>): void; + /** * Get the memory size of the application * @since 7 @@ -139,6 +153,14 @@ declare namespace appManager { */ function getAppMemorySize(): Promise; function getAppMemorySize(callback: AsyncCallback): void; + + /** + * The class of an process running information. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + */ + export type ProcessRunningInformation = _ProcessRunningInformation } export default appManager; diff --git a/api/application/ApplicationStateObserver.d.ts b/api/application/ApplicationStateObserver.d.ts index 96341bd8a3..320238f2ca 100644 --- a/api/application/ApplicationStateObserver.d.ts +++ b/api/application/ApplicationStateObserver.d.ts @@ -15,7 +15,7 @@ import AppStateData from "./AppStateData"; import AbilityStateData from "./AbilityStateData"; -import ProcessData from "./ProcessData"; +import * as _ProcessData from './ProcessData'; /** * The application state observer. @@ -69,4 +69,13 @@ export default class ApplicationStateObserver { * @return - */ onProcessDied(processData: ProcessData): void; -} \ No newline at end of file +} + +/** + * The process data. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi hide for inner use. + */ +export type ProcessData = _ProcessData.default \ No newline at end of file diff --git a/api/application/ProcessData.d.ts b/api/application/ProcessData.d.ts index 8be5e311ef..e96fe473ae 100644 --- a/api/application/ProcessData.d.ts +++ b/api/application/ProcessData.d.ts @@ -17,7 +17,7 @@ * The process data. * * @since 8 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. * @permission N/A */ @@ -26,7 +26,7 @@ export default class ProcessData { * The bundle name. * * @since 8 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. */ bundleName: string; @@ -35,7 +35,7 @@ export default class ProcessData { * The pid. * * @since 8 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. */ pid: number; @@ -44,7 +44,7 @@ export default class ProcessData { * The uid. * * @since 8 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide for inner use. */ uid: number; diff --git a/api/application/ProcessRunningInfo.d.ts b/api/application/ProcessRunningInfo.d.ts index 3e1e689179..434f35369b 100644 --- a/api/application/ProcessRunningInfo.d.ts +++ b/api/application/ProcessRunningInfo.d.ts @@ -16,68 +16,46 @@ /** * The class of an process running information. * - * @deprecated since 9 * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @permission N/A - */ -/** - * The class of an process running information. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @permission N/A + * @deprecated since 9 + * @useinstead ProcessRunningInformation */ export interface ProcessRunningInfo { /** * @default process id - * @deprecated since 9 * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @deprecated since 9 + * @useinstead ProcessRunningInformation.pid */ + pid: number; + /** - * @default process id - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @default user id + * @since 8 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @deprecated since 9 + * @useinstead ProcessRunningInformation.uid */ - pid: number; - - /** - * @default user id - * @deprecated since 9 - * @since 8 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - */ - /** - * @default user id - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - uid: number; + uid: number; - /** - * @default the name of the process - * @deprecated since 9 - * @since 8 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - */ - /** - * @default the name of the process - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - processName: string; + /** + * @default the name of the process + * @since 8 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @deprecated since 9 + * @useinstead ProcessRunningInformation.processName + */ + processName: string; - /** - * @default an array of the bundleNames running in the process - * @deprecated since 9 - * @since 8 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - */ - /** - * @default an array of the bundleNames running in the process - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - bundleNames: Array; + /** + * @default an array of the bundleNames running in the process + * @since 8 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @deprecated since 9 + * @useinstead ProcessRunningInformation.bundleNames + */ + bundleNames: Array; } \ No newline at end of file diff --git a/api/application/ProcessRunningInformation.d.ts b/api/application/ProcessRunningInformation.d.ts new file mode 100755 index 0000000000..91bff0ab85 --- /dev/null +++ b/api/application/ProcessRunningInformation.d.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The class of an process running information. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + */ + export interface ProcessRunningInformation { + /** + * @default process id + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + */ + pid: number; + + /** + * @default user id + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + */ + uid: number; + + /** + * @default the name of the process + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + */ + processName: string; + + /** + * @default an array of the bundleNames running in the process + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + */ + bundleNames: Array; +} \ No newline at end of file -- Gitee From d0924298b8de07276e169309643f6647c87717b1 Mon Sep 17 00:00:00 2001 From: wu-chengwen Date: Tue, 26 Jul 2022 21:54:28 +0800 Subject: [PATCH 21/48] fixed f60892c from https://gitee.com/wu-chengwen/interface_sdk-js/pulls/2289 fix(usb):add systemapi lable Signed-off-by: wu-chengwen --- api/@ohos.usb.d.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/api/@ohos.usb.d.ts b/api/@ohos.usb.d.ts index 4cf2b5f84f..00588468d5 100644 --- a/api/@ohos.usb.d.ts +++ b/api/@ohos.usb.d.ts @@ -79,7 +79,7 @@ declare namespace usb { * Sets the current USB function list in Device mode. * * @param funcs Numeric mask combination of the supported function list. - * @return Returns **true** if the setting is successful; returns **false** otherwise. + * @return Returns **true** if the setting is successful; returns **false** otherwise. * @systemapi * @syscap SystemCapability.USB.USBManager * @since 9 @@ -518,7 +518,7 @@ declare namespace usb { * Enumerates power role types. * * @syscap SystemCapability.USB.USBManager - * + * @systemapi * @since 9 */ export enum PowerRoleType { @@ -546,7 +546,7 @@ declare namespace usb { * Enumerates data role types. * * @syscap SystemCapability.USB.USBManager - * + * @systemapi * @since 9 */ export enum DataRoleType { @@ -574,7 +574,7 @@ declare namespace usb { * Enumerates port mode types * * @syscap SystemCapability.USB.USBManager - * + * @systemapi * @since 9 */ export enum PortModeType { @@ -614,7 +614,7 @@ declare namespace usb { * Enumerates USB device port roles. * * @syscap SystemCapability.USB.USBManager - * + * @systemapi * @since 9 */ interface USBPortStatus { @@ -644,7 +644,7 @@ declare namespace usb { * Represents a USB device port. * * @syscap SystemCapability.USB.USBManager - * + * @systemapi * @since 9 */ interface USBPort { @@ -799,6 +799,7 @@ declare namespace usb { * Enumerates function modes. * * @syscap SystemCapability.USB.USBManager + * @systemapi * @since 9 */ export enum FunctionType { -- Gitee From 44f656e18161ad08cc7ed1faa72d836a4e9fe2f2 Mon Sep 17 00:00:00 2001 From: honglie Date: Mon, 1 Aug 2022 19:36:16 +0800 Subject: [PATCH 22/48] fixed 89fd114 from https://gitee.com/txdyyangbo/interface_sdk-js/pulls/2334 support public sdk build Signed-off-by: honglie --- BUILD.gn | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index d1f6685aa4..3173ec8115 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -13,6 +13,7 @@ import("//build/ohos.gni") import("//build/ohos/notice/notice.gni") +import("//build/ohos_var.gni") import("//build/templates/metadata/module_info.gni") import("interface_config.gni") @@ -123,6 +124,16 @@ ohos_copy("ets_component") { "api/@internal/component/ets/web.d.ts", "api/@internal/component/ets/xcomponent.d.ts", ] + if (sdk_build_public) { + sources -= [ + "api/@internal/component/ets/ability_component.d.ts", + "api/@internal/component/ets/animator.d.ts", + "api/@internal/component/ets/calendar.d.ts", + "api/@internal/component/ets/form_component.d.ts", + "api/@internal/component/ets/plugin_component.d.ts", + "api/@internal/component/ets/remote_window.d.ts", + ] + } outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] module_source_dir = target_out_dir + "/$target_name" module_install_name = "" @@ -135,21 +146,28 @@ ohos_copy("common_api") { module_install_name = "" } -ohos_copy("bundle_api") { - sources = [ "api/bundle/bundleStatusCallback.d.ts" ] - outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] - module_source_dir = target_out_dir + "/$target_name" - module_install_name = "" +if (!sdk_build_public) { + ohos_copy("bundle_api") { + sources = [ "api/bundle/bundleStatusCallback.d.ts" ] + outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] + module_source_dir = target_out_dir + "/$target_name" + module_install_name = "" + } } template("ohos_declaration_template") { forward_variables_from(invoker, "*") action_with_pydeps(target_name) { script = "//interface/sdk-js/remove_internal.py" + input_api_dir = "//interface/sdk-js/api" outputs = [ root_out_dir + "/ohos_declaration/$target_name" ] + if (sdk_build_public) { + script = "//out/sdk-public/public_interface/sdk-js/remove_internal.py" + input_api_dir = "//out/sdk-public/public_interface/sdk-js/api" + } args = [ "--input", - rebase_path("//interface/sdk-js/api", root_build_dir), + rebase_path(input_api_dir, root_build_dir), "--output", rebase_path(root_out_dir + "/ohos_declaration/$target_name/", root_build_dir), @@ -193,6 +211,9 @@ ohos_copy("internal_lite") { "api/common/lite/index.d.ts", "api/common/lite/viewmodel.d.ts", ] + if (sdk_build_public) { + sources -= [ "api/common/lite/featureability.d.ts" ] + } outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] module_source_dir = target_out_dir + "/$target_name" module_install_name = "" -- Gitee From 88c9e4de6c724965a720c90860f1df1cc0b87532 Mon Sep 17 00:00:00 2001 From: yangbo Date: Fri, 26 Aug 2022 17:36:36 +0800 Subject: [PATCH 23/48] update delete_systemapi_plugin Signed-off-by: yangbo Change-Id: I75010daa0df6c4e6795f9f74ead695535bffe045 --- build-tools/delete_systemapi_plugin.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/build-tools/delete_systemapi_plugin.js b/build-tools/delete_systemapi_plugin.js index fcf3223a4f..a85e5a1b1a 100644 --- a/build-tools/delete_systemapi_plugin.js +++ b/build-tools/delete_systemapi_plugin.js @@ -21,10 +21,14 @@ let lastNoteStr = ''; let lastNodeName = ''; function collectDeclaration(url) { - const utPath = path.resolve(__dirname, url); - const utFiles = []; - readFile(utPath, utFiles); - tsTransform(utFiles, deleteSystemApi); + try { + const utPath = path.resolve(__dirname, url); + const utFiles = []; + readFile(utPath, utFiles); + tsTransform(utFiles, deleteSystemApi); + } catch (error) { + console.error("DELETE_SYSTEM_PLUGIN ERROR: ", error); + } } function tsTransform(utFiles, callback) { @@ -101,7 +105,7 @@ function deleteSystemApi(url) { newMembers.push(member); } }); - node = ts.factory.updateInterfaceDeclaration(node, node.decorators, node.modifiers, node.name, + node = ts.factory.updateInterfaceDeclaration(node, node.modifiers, node.name, node.typeParameters, node.heritageClauses, newMembers); } else if (ts.isClassDeclaration(node)) { const newMembers = []; @@ -110,7 +114,7 @@ function deleteSystemApi(url) { newMembers.push(member); } }); - node = ts.factory.updateClassDeclaration(node, node.decorators, node.modifiers, node.name, + node = ts.factory.updateClassDeclaration(node, node.modifiers, node.name, node.typeParameters, node.heritageClauses, newMembers); } else if (ts.isModuleDeclaration(node) && node.body && ts.isModuleBlock(node.body)) { const newStatements = []; @@ -119,8 +123,8 @@ function deleteSystemApi(url) { newStatements.push(statement); } }); - const newModuleBody = ts.factory.updateBlock(node.body, newStatements); - node = ts.factory.updateModuleDeclaration(node, node.decorators, node.modifiers, node.name, newModuleBody); + const newModuleBody = ts.factory.updateModuleBlock(node.body, newStatements); + node = ts.factory.updateModuleDeclaration(node, node.modifiers, node.name, newModuleBody); } else if (ts.isEnumDeclaration(node)) { const newMembers = []; node.members.forEach(member => { @@ -128,7 +132,7 @@ function deleteSystemApi(url) { newMembers.push(member); } }); - node = ts.factory.updateEnumDeclaration(node, node.decorators, node.modifiers, node.name, newMembers); + node = ts.factory.updateEnumDeclaration(node, node.modifiers, node.name, newMembers); } return ts.visitEachChild(node, processAllNodes, context); } -- Gitee From edbbfb5a84548d4b7319dbbb340ee18f01b4083b Mon Sep 17 00:00:00 2001 From: qiuxiangdong Date: Mon, 29 Aug 2022 17:09:26 +0800 Subject: [PATCH 24/48] fix: Modify ./basic Signed-off-by: qiuxiangdong --- api/@ohos.runninglock.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.runninglock.d.ts b/api/@ohos.runninglock.d.ts index 9f9c4b4979..d9365fbcf3 100644 --- a/api/@ohos.runninglock.d.ts +++ b/api/@ohos.runninglock.d.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import {AsyncCallback} from './basic.d.ts'; +import {AsyncCallback} from './basic'; /** * Provides a mechanism to prevent the system from hibernating so that the applications can run in the background or -- Gitee From 5d2625213a7206ad6844de90f79623e16f030e51 Mon Sep 17 00:00:00 2001 From: lichenchen Date: Mon, 29 Aug 2022 16:12:23 +0800 Subject: [PATCH 25/48] =?UTF-8?q?fixed=201c2b813=20from=20https://gitee.co?= =?UTF-8?q?m/cclicn/interface=5Fsdk-js/pulls/2515=20=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E6=A8=A1=E5=9D=97d.ts=E7=BC=96=E8=BE=91=E7=88=86=E7=BA=A2?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lichenchen --- api/@ohos.account.appAccount.d.ts | 6 +++--- api/@ohos.account.osAccount.d.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/@ohos.account.appAccount.d.ts b/api/@ohos.account.appAccount.d.ts index 652bdda1fc..89e9e7b32b 100644 --- a/api/@ohos.account.appAccount.d.ts +++ b/api/@ohos.account.appAccount.d.ts @@ -13,9 +13,9 @@ * limitations under the License. */ -import {AsyncCallback} from "./basic"; -import Want from "./@ohos.application.want"; -import rpc from "./@ohos.rpc" +import { AsyncCallback, Callback } from './basic'; +import Want from './@ohos.application.Want'; +import rpc from './@ohos.rpc' /** * This module provides the capability to manage application accounts. diff --git a/api/@ohos.account.osAccount.d.ts b/api/@ohos.account.osAccount.d.ts index 25f559d219..db2cc594f4 100644 --- a/api/@ohos.account.osAccount.d.ts +++ b/api/@ohos.account.osAccount.d.ts @@ -14,7 +14,7 @@ */ import distributedAccount from './@ohos.account.distributedAccount' -import {AsyncCallback} from "./basic"; +import { AsyncCallback, Callback } from './basic'; /** * This module provides the capability to manage os accounts. -- Gitee From 721f447baf743c28d0469a1a2ebbaa7e643379fa Mon Sep 17 00:00:00 2001 From: zhouke Date: Mon, 29 Aug 2022 18:13:15 +0800 Subject: [PATCH 26/48] modify.Signed-off-by: . Signed-off-by: zhouke --- api/@ohos.uitest.d.ts | 74 +++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/api/@ohos.uitest.d.ts b/api/@ohos.uitest.d.ts index 237ac9e789..9cf5af81d7 100644 --- a/api/@ohos.uitest.d.ts +++ b/api/@ohos.uitest.d.ts @@ -18,7 +18,7 @@ * * @since 9 */ - enum ResizeDirection{ + declare enum ResizeDirection{ LEFT, RIGHT, UP, @@ -33,7 +33,7 @@ * * @since 8 */ - enum MatchPattern{ + declare enum MatchPattern{ /** * Equals to a string. * @syscap SystemCapability.Test.UiTest @@ -69,7 +69,7 @@ * * @since 9 */ - enum WindowMode{ + declare enum WindowMode{ FULLSCREEN, PRIMARY, SECONDARY, @@ -106,8 +106,8 @@ declare interface Rect { declare interface WindowFilter { readonly bundleName?: string; readonly title?: string; - readonly focused?: bool; - readonly actived?: bool; + readonly focused?: boolean; + readonly actived?: boolean; } /** @@ -116,7 +116,7 @@ declare interface WindowFilter { * @since 8 * @syscap SystemCapability.Test.UiTest */ - class By{ + declare class By{ /** * Specifies the text for the target UiComponent. * @syscap SystemCapability.Test.UiTest @@ -166,7 +166,7 @@ declare interface WindowFilter { * @since 8 * @test */ - clickable(b?:bool):By; + clickable(b?:boolean):By; /** * Specifies the longClickable status of the target UiComponent. @@ -176,7 +176,7 @@ declare interface WindowFilter { * @since 9 * @test */ - longClickable(b?: bool): By; + longClickable(b?: boolean): By; /** * Specifies the scrollable status of the target UiComponent. @@ -186,7 +186,7 @@ declare interface WindowFilter { * @since 8 * @test */ - scrollable(b?:bool):By; + scrollable(b?:boolean):By; /** * Specifies the enabled status of the target UiComponent. @@ -196,7 +196,7 @@ declare interface WindowFilter { * @since 8 * @test */ - enabled(b?:bool):By; + enabled(b?:boolean):By; /** * Specifies the focused status of the target UiComponent. @@ -206,7 +206,7 @@ declare interface WindowFilter { * @since 8 * @test */ - focused(b?:bool):By; + focused(b?:boolean):By; /** * Specifies the selected status of the target UiComponent. @@ -216,7 +216,7 @@ declare interface WindowFilter { * @since 8 * @test */ - selected(b?:bool):By; + selected(b?:boolean):By; /** * Specifies the checked status of the target UiComponent. @@ -226,7 +226,7 @@ declare interface WindowFilter { * @since 9 * @test */ - checked(b?: bool): By; + checked(b?: boolean): By; /** * Specifies the checkable status of the target UiComponent. @@ -236,7 +236,7 @@ declare interface WindowFilter { * @since 9 * @test */ - checkable(b?: bool): By; + checkable(b?: boolean): By; /** * Requires that the target UiComponent which is before another UiComponent that specified by the given {@link By} @@ -268,7 +268,7 @@ declare interface WindowFilter { * @test * @syscap SystemCapability.Test.UiTest */ -class UiComponent{ +declare class UiComponent{ /** * Click this {@link UiComponent}. * @syscap SystemCapability.Test.UiTest @@ -335,7 +335,7 @@ class UiComponent{ * @since 8 * @test */ - isClickable():Promise; + isClickable():Promise; /** * Get the longClickable status of this {@link UiComponent}. @@ -344,7 +344,7 @@ class UiComponent{ * @since 9 * @test */ - isLongClickable(): Promise; + isLongClickable(): Promise; /** * Get the scrollable status of this {@link UiComponent}. @@ -353,7 +353,7 @@ class UiComponent{ * @since 8 * @test */ - isScrollable():Promise; + isScrollable():Promise; /** * Get the enabled status of this {@link UiComponent}. @@ -362,7 +362,7 @@ class UiComponent{ * @since 8 * @test */ - isEnabled():Promise; + isEnabled():Promise; /** * Get the focused status of this {@link UiComponent}. @@ -371,7 +371,7 @@ class UiComponent{ * @since 8 * @test */ - isFocused():Promise; + isFocused():Promise; /** * Get the selected status of this {@link UiComponent}. @@ -380,7 +380,7 @@ class UiComponent{ * @since 8 * @test */ - isSelected():Promise; + isSelected():Promise; /** * Get the checked status of this {@link UiComponent}. @@ -389,7 +389,7 @@ class UiComponent{ * @since 9 * @test */ - isChecked(): Promise; + isChecked(): Promise; /** * Get the checkable status of this {@link UiComponent}. @@ -398,7 +398,7 @@ class UiComponent{ * @since 9 * @test */ - isCheckable(): Promise; + isCheckable(): Promise; /** * Inject text to this {@link UiComponent},applicable to TextInput. @@ -499,7 +499,7 @@ class UiComponent{ * @test * @syscap SystemCapability.Test.UiTest */ - class UiDriver{ + declare class UiDriver{ /** * Create an {@link UiDriver} object. * @syscap SystemCapability.Test.UiTest @@ -674,7 +674,7 @@ class UiComponent{ * @since 8 * @test */ - screenCap(savePath:string):Promise; + screenCap(savePath:string):Promise; } /** @@ -684,7 +684,7 @@ class UiComponent{ * @test * @syscap SystemCapability.Test.UiTest */ - class UiWindow{ + declare class UiWindow{ /** * Get the bundle name of this {@link UiWindow}. * @syscap SystemCapability.Test.UiTest @@ -728,7 +728,7 @@ class UiComponent{ * @since 9 * @test */ - isFocused():Promise; + isFocused():Promise; /** * Get the actived status of this {@link UiWindow}. @@ -737,7 +737,7 @@ class UiComponent{ * @since 9 * @test */ - isActived():Promise; + isActived():Promise; /** * Set the focused status of this {@link UiWindow}. @@ -746,7 +746,7 @@ class UiComponent{ * @since 9 * @test */ - focus():Promise; + focus():Promise; /** * Move this {@link UiWindow} to the specified points. @@ -755,7 +755,7 @@ class UiComponent{ * @since 9 * @test */ - moveTo(x: number, y: number):Promise; + moveTo(x: number, y: number):Promise; /** * Resize this {@link UiWindow} to the specified size for the specified direction. @@ -764,7 +764,7 @@ class UiComponent{ * @since 9 * @test */ - resize(wide: number, height: number, direction: ResizeDirection):Promise; + resize(wide: number, height: number, direction: ResizeDirection):Promise; /** * Change this {@link UiWindow} into split screen mode. @@ -773,7 +773,7 @@ class UiComponent{ * @since 9 * @test */ - split():Promise; + split():Promise; /** * Maximize this {@link UiWindow}. @@ -782,7 +782,7 @@ class UiComponent{ * @since 9 * @test */ - maximize():Promise; + maximize():Promise; /** * Minimize this {@link UiWindow}. @@ -791,7 +791,7 @@ class UiComponent{ * @since 9 * @test */ - minimize():Promise; + minimize():Promise; /** * Resume this {@link UiWindow}. @@ -800,7 +800,7 @@ class UiComponent{ * @since 9 * @test */ - resume():Promise; + resume():Promise; /** * Close this {@link UiWindow}. @@ -809,7 +809,7 @@ class UiComponent{ * @since 9 * @test */ - close():Promise; + close():Promise; } /** @@ -818,6 +818,6 @@ class UiComponent{ * @since 8 * @test */ - const BY:By; + declare const BY:By; export {UiComponent,UiDriver,UiWindow,BY,MatchPattern,ResizeDirection,WindowMode}; -- Gitee From 35d5c6fd3d01d31cd13683c21f0d08054aaeee51 Mon Sep 17 00:00:00 2001 From: fangJinliang1 Date: Mon, 29 Aug 2022 17:28:15 +0800 Subject: [PATCH 27/48] fixed cff2c0b from https://gitee.com/fangJinliang1/interface_sdk-js/pulls/2522 update interface Signed-off-by: fangJinliang1 Change-Id: Id8bc89e6f1141ea35cec4d76835fd708fe82481d --- api/notification/notificationContent.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/notification/notificationContent.d.ts b/api/notification/notificationContent.d.ts index b50b426a0f..055523bdca 100644 --- a/api/notification/notificationContent.d.ts +++ b/api/notification/notificationContent.d.ts @@ -14,7 +14,7 @@ */ import notification from '../@ohos.notification'; -import image from './@ohos.multimedia.image'; +import image from '../@ohos.multimedia.image'; /** * Describes a normal text notification. -- Gitee From afe6ea43f86aca824a65e0134ed05d18cccfbed6 Mon Sep 17 00:00:00 2001 From: qian-nan-xu Date: Tue, 9 Aug 2022 17:37:41 +0800 Subject: [PATCH 28/48] fixed 9065284 from https://gitee.com/life-liu/interface_sdk-js/pulls/2401 delete a ; Signed-off-by: qian-nan-xu --- api/@ohos.telephony.call.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.telephony.call.d.ts b/api/@ohos.telephony.call.d.ts index ea018eefd1..2a48ba7418 100644 --- a/api/@ohos.telephony.call.d.ts +++ b/api/@ohos.telephony.call.d.ts @@ -703,7 +703,7 @@ declare namespace call { CALL_NOT_ALLOW = 1029, SIM_INVALID = 1045, UNKNOWN = 1279, - }; + } } export default call; \ No newline at end of file -- Gitee From 33b60df11202a274b415d26229c5c30228a74122 Mon Sep 17 00:00:00 2001 From: qian-nan-xu Date: Wed, 10 Aug 2022 14:32:21 +0800 Subject: [PATCH 29/48] fixed 31d63bf from https://gitee.com/life-liu/interface_sdk-js/pulls/2411 add systemapi node Signed-off-by: qian-nan-xu --- api/@ohos.telephony.observer.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/@ohos.telephony.observer.d.ts b/api/@ohos.telephony.observer.d.ts index 5ea7c6a325..7e0ac5b3e9 100644 --- a/api/@ohos.telephony.observer.d.ts +++ b/api/@ohos.telephony.observer.d.ts @@ -29,6 +29,9 @@ import sim from "./@ohos.telephony.sim"; declare namespace observer { type NetworkState = radio.NetworkState; type SignalInformation = radio.SignalInformation; + /** + * @systemapi Hide this for inner system use. + */ type CellInformation = radio.CellInformation; type DataConnectState = data.DataConnectState; type RatType = radio.RadioTechnology; -- Gitee From 21a91cfdf8d3c7cce0e99ed79dfcb7987897244c Mon Sep 17 00:00:00 2001 From: zhaoxiaoyu Date: Mon, 29 Aug 2022 20:22:29 +0800 Subject: [PATCH 30/48] fixed 9e9c0ba from https://gitee.com/zhaoxiaoyu6/interface_sdk-js/pulls/2536 fix warning for effectKit Signed-off-by: zhaoxiaoyu Change-Id: I1c708e47952e2aebc4bc13ecb55781187f41007b --- api/@ohos.effectKit.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/@ohos.effectKit.d.ts b/api/@ohos.effectKit.d.ts index 3164c81f25..78ffb0c148 100644 --- a/api/@ohos.effectKit.d.ts +++ b/api/@ohos.effectKit.d.ts @@ -13,6 +13,9 @@ * limitations under the License. */ +import { AsyncCallback } from './basic'; +import image from './@ohos.multimedia.image'; + /** * @name effectKit * @since 9 -- Gitee From dca47ae15b9182694b2b10bd850eae479e352381 Mon Sep 17 00:00:00 2001 From: Mupceet Date: Wed, 10 Aug 2022 15:47:22 +0800 Subject: [PATCH 31/48] =?UTF-8?q?=E6=9B=B4=E6=96=B0onkeyEvent=E7=9A=84?= =?UTF-8?q?=E5=85=A5=E5=8F=82=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mupceet --- api/@ohos.application.AccessibilityExtensionAbility.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.application.AccessibilityExtensionAbility.d.ts b/api/@ohos.application.AccessibilityExtensionAbility.d.ts index 12add9c4fa..fddb5b5905 100644 --- a/api/@ohos.application.AccessibilityExtensionAbility.d.ts +++ b/api/@ohos.application.AccessibilityExtensionAbility.d.ts @@ -15,7 +15,7 @@ import accessibility from './@ohos.accessibility' import AccessibilityExtensionContext, { AccessibilityElement } from './application/AccessibilityExtensionContext' -import inputEventClient from './@ohos.multimodalInput.inputEventClient' +import KeyEvent from './@ohos.multimodalInput.keyEvent' /** * class of accessibility extension ability. @@ -49,7 +49,7 @@ export default class AccessibilityExtensionAbility { * Called when a physical key is pressed, such as when the user presses the volume button . * @param keyEvent Indicates the physical key event. */ - onKeyEvent(keyEvent: inputEventClient.KeyEvent): boolean; + onKeyEvent(keyEvent: KeyEvent): boolean; } /** -- Gitee From 07b887f3f218721f12abf04d75b776352b1b2618 Mon Sep 17 00:00:00 2001 From: Mupceet Date: Wed, 10 Aug 2022 17:01:21 +0800 Subject: [PATCH 32/48] =?UTF-8?q?=E4=BF=AE=E6=94=B9import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mupceet --- api/@ohos.application.AccessibilityExtensionAbility.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.application.AccessibilityExtensionAbility.d.ts b/api/@ohos.application.AccessibilityExtensionAbility.d.ts index fddb5b5905..4dc895a403 100644 --- a/api/@ohos.application.AccessibilityExtensionAbility.d.ts +++ b/api/@ohos.application.AccessibilityExtensionAbility.d.ts @@ -15,7 +15,7 @@ import accessibility from './@ohos.accessibility' import AccessibilityExtensionContext, { AccessibilityElement } from './application/AccessibilityExtensionContext' -import KeyEvent from './@ohos.multimodalInput.keyEvent' +import { KeyEvent } from './@ohos.multimodalInput.keyEvent' /** * class of accessibility extension ability. -- Gitee From 45d695908061583cb0c923dc7443dc930c93d09f Mon Sep 17 00:00:00 2001 From: fanxiaoyu Date: Mon, 29 Aug 2022 13:01:24 +0000 Subject: [PATCH 33/48] Modify IDE warning Signed-off-by: fanxiaoyu --- api/@ohos.rpc.d.ts | 95 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 81 insertions(+), 14 deletions(-) diff --git a/api/@ohos.rpc.d.ts b/api/@ohos.rpc.d.ts index 34f5edc604..d3d54c6f03 100644 --- a/api/@ohos.rpc.d.ts +++ b/api/@ohos.rpc.d.ts @@ -976,27 +976,39 @@ declare namespace rpc { class MessageOption { /** * Indicates synchronous call. + * + * @constant + * @default 0 * @since 7 */ - TF_SYNC = 0; + TF_SYNC: number; /** * Indicates asynchronous call. + * + * @constant + * @default 1 * @since 7 */ - TF_ASYNC = 1; + TF_ASYNC: number; /** * Indicates the sendRequest API for returning the file descriptor. + * + * @constant + * @default 0x10 * @since 7 */ - TF_ACCEPT_FDS = 0x10; + TF_ACCEPT_FDS: number; /** * Indicates the wait time for RPC, in seconds. It is NOT used in IPC case. + * + * @constant + * @default 4 * @since 7 */ - TF_WAIT_TIME = 4; + TF_WAIT_TIME: number; /** * A constructor used to create a MessageOption instance. @@ -1005,7 +1017,7 @@ declare namespace rpc { * @param waitTime Maximum wait time for a RPC call. The default value is TF_WAIT_TIME. * @since 7 */ - constructor(syncFlags?: number, waitTime = TF_WAIT_TIME); + constructor(syncFlags?: number, waitTime?: number); /** * Obtains the SendRequest call flag, which can be synchronous or asynchronous. @@ -1185,6 +1197,34 @@ declare namespace rpc { * @since 7 */ attachLocalInterface(localInterface: IRemoteBroker, descriptor: string): void; + + /** + * Registers a callback used to receive notifications of the death of a remote object. + * + * @param recipient Indicates the callback to be registered. + * @param flags Indicates the flag of the death notification. + * @return Returns {@code true} if the callback is registered successfully; returns {@code false} otherwise. + * @since 7 + */ + addDeathRecipient(recipient: DeathRecipient, flags: number): boolean; + + /** + * Deregisters a callback used to receive death notifications of a remote object. + * + * @param recipient Indicates the callback to be deregistered. + * @param flags Indicates the flag of the death notification. This is a reserved parameter. Set it to {@code 0}. + * @return Returns {@code true} if the callback is deregistered successfully; returns {@code false} otherwise. + * @since 7 + */ + removeDeathRecipient(recipient: DeathRecipient, flags: number): boolean; + + /** + * Checks whether the {@code RemoteObject} corresponding to a {@code RemoteProxy} is dead. + * + * @return Returns {@code true} if the {@code RemoteObject} is dead; returns {@code false} otherwise. + * @since 7 + */ + isObjectDead(): boolean; } /** @@ -1195,37 +1235,52 @@ declare namespace rpc { class RemoteProxy implements IRemoteObject { /** * Indicates the message code for a Ping operation. + * + * @constant + * @default 1599098439 * @since 7 */ - PING_TRANSACTION = ('_' << 24) | ('P' << 16) | ('N' << 8) | 'G'; + PING_TRANSACTION: number; /** * Indicates the message code for a dump operation. + * + * @constant + * @default 1598311760 * @since 7 */ - DUMP_TRANSACTION = ('_' << 24) | ('D' << 16) | ('M' << 8) | 'P'; + DUMP_TRANSACTION: number; /** * Indicates the message code for a transmission. + * + * @constant + * @default 1598968902 * @since 7 */ - INTERFACE_TRANSACTION = ('_' << 24) | ('N' << 16) | ('T' << 8) | 'F'; + INTERFACE_TRANSACTION: number; /** * Indicates the minimum value of a valid message code. * *

This constant is used to check the validity of an operation. + * + * @constant + * @default 0x1 * @since 7 */ - MIN_TRANSACTION_ID = 0x1; + MIN_TRANSACTION_ID: number; /** * Indicates the maximum value of a valid message code. * *

This constant is used to check the validity of an operation. + * + * @constant + * @default 0x00FFFFFF * @since 7 */ - MAX_TRANSACTION_ID = 0x00FFFFFF; + MAX_TRANSACTION_ID: number; /** * Queries a local interface with a specified descriptor. @@ -1476,27 +1531,39 @@ declare namespace rpc { class Ashmem { /** * The mapped memory is executable. + * + * @constant + * @default 4 * @since 8 */ - PROT_EXEC = 4; + PROT_EXEC: number; /** * The mapped memory is inaccessible. + * + * @constant + * @default 0 * @since 8 */ - PROT_NONE = 0; + PROT_NONE: number; /** * The mapped memory is readable. + * + * @constant + * @default 1 * @since 8 */ - PROT_READ = 1; + PROT_READ: number; /** * The mapped memory is writable. + * + * @constant + * @default 2 * @since 8 */ - PROT_WRITE = 2; + PROT_WRITE: number; /** * Creates an Ashmem object with the specified name and size. -- Gitee From beedc855f8e8d71aa59dc275d40db873196f2b43 Mon Sep 17 00:00:00 2001 From: guoxiaoxiao Date: Mon, 29 Aug 2022 21:31:55 +0800 Subject: [PATCH 34/48] Add comment @systemapi for UserFileService. Signed-off-by: guoxiaoxiao --- api/@ohos.fileManager.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/@ohos.fileManager.d.ts b/api/@ohos.fileManager.d.ts index e9676f7e97..61d7d6c4d4 100644 --- a/api/@ohos.fileManager.d.ts +++ b/api/@ohos.fileManager.d.ts @@ -17,6 +17,10 @@ import { AsyncCallback } from './basic' export default filemanager; +/** + * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi + */ declare namespace filemanager { export { listFile }; export { getRoot }; -- Gitee From 6ea5fc92f45682d810bbeb77207cbcc52d96e2a6 Mon Sep 17 00:00:00 2001 From: fanxiaoyu Date: Mon, 29 Aug 2022 13:35:53 +0000 Subject: [PATCH 35/48] Modify IDE warning Signed-off-by: fanxiaoyu --- api/@ohos.rpc.d.ts | 36 ++++-------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/api/@ohos.rpc.d.ts b/api/@ohos.rpc.d.ts index d3d54c6f03..aef94e9497 100644 --- a/api/@ohos.rpc.d.ts +++ b/api/@ohos.rpc.d.ts @@ -811,7 +811,7 @@ declare namespace rpc { * @import import rpc from '@ohos.rpc' * @since 7 */ - interface IRemoteObject { + abstract class IRemoteObject { /** * Queries the description of an interface. * @@ -996,7 +996,7 @@ declare namespace rpc { * Indicates the sendRequest API for returning the file descriptor. * * @constant - * @default 0x10 + * @default 16 * @since 7 */ TF_ACCEPT_FDS: number; @@ -1057,7 +1057,7 @@ declare namespace rpc { * @import import rpc from '@ohos.rpc' * @since 7 */ - class RemoteObject implements IRemoteObject { + class RemoteObject extends IRemoteObject { /** * A constructor to create a RemoteObject instance. * @@ -1197,34 +1197,6 @@ declare namespace rpc { * @since 7 */ attachLocalInterface(localInterface: IRemoteBroker, descriptor: string): void; - - /** - * Registers a callback used to receive notifications of the death of a remote object. - * - * @param recipient Indicates the callback to be registered. - * @param flags Indicates the flag of the death notification. - * @return Returns {@code true} if the callback is registered successfully; returns {@code false} otherwise. - * @since 7 - */ - addDeathRecipient(recipient: DeathRecipient, flags: number): boolean; - - /** - * Deregisters a callback used to receive death notifications of a remote object. - * - * @param recipient Indicates the callback to be deregistered. - * @param flags Indicates the flag of the death notification. This is a reserved parameter. Set it to {@code 0}. - * @return Returns {@code true} if the callback is deregistered successfully; returns {@code false} otherwise. - * @since 7 - */ - removeDeathRecipient(recipient: DeathRecipient, flags: number): boolean; - - /** - * Checks whether the {@code RemoteObject} corresponding to a {@code RemoteProxy} is dead. - * - * @return Returns {@code true} if the {@code RemoteObject} is dead; returns {@code false} otherwise. - * @since 7 - */ - isObjectDead(): boolean; } /** @@ -1232,7 +1204,7 @@ declare namespace rpc { * @import import rpc from '@ohos.rpc' * @since 7 */ - class RemoteProxy implements IRemoteObject { + class RemoteProxy extends IRemoteObject { /** * Indicates the message code for a Ping operation. * -- Gitee From ddb1bee6d5970aecae90f0fd4a7f01e80be496ed Mon Sep 17 00:00:00 2001 From: z30025928 <734222381@qq.com> Date: Tue, 30 Aug 2022 09:58:08 +0800 Subject: [PATCH 36/48] =?UTF-8?q?FIX:d.ts=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: z30025928 <734222381@qq.com> --- api/@ohos.geolocation.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.geolocation.d.ts b/api/@ohos.geolocation.d.ts index d8a755e11c..97e12ddc0a 100644 --- a/api/@ohos.geolocation.d.ts +++ b/api/@ohos.geolocation.d.ts @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { AsyncCallback, Callback } from './basic.d.ts'; -import WantAgent from '@ohos.wantAgent'; +import { AsyncCallback, Callback } from './basic'; +import { WantAgent } from './@ohos.wantAgent'; /** * Provides interfaces for initiating location requests, ending the location service, -- Gitee From bc7de59933824d3cbf4aa578fcdd9dce8370e64e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=BF=E6=96=87=E5=B9=BF?= Date: Tue, 30 Aug 2022 10:46:06 +0800 Subject: [PATCH 37/48] 830 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 耿文广 --- api/bundle/bundleStatusCallback.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/bundle/bundleStatusCallback.d.ts b/api/bundle/bundleStatusCallback.d.ts index d42bbf2329..b5c4d36858 100644 --- a/api/bundle/bundleStatusCallback.d.ts +++ b/api/bundle/bundleStatusCallback.d.ts @@ -24,7 +24,7 @@ * @permission ohos.permission.LISTEN_BUNDLE_CHANGE * @systemapi Hide this for inner system use */ -declare interface BundleStatusCallback { +export interface BundleStatusCallback { /** * @name Obtains add callback about an launcherStatusCallback. * @since 8 -- Gitee From ab48960d69eb71b3cf4448853b076a977f6a387a Mon Sep 17 00:00:00 2001 From: xuyong Date: Tue, 30 Aug 2022 10:00:40 +0800 Subject: [PATCH 38/48] =?UTF-8?q?fixed=207163b6d=20from=20https://gitee.co?= =?UTF-8?q?m/honghecun/interface=5Fsdk-js/pulls/2525=20.d.ts=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=A7=84=E8=8C=83=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuyong --- api/@ohos.hiTraceChain.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.hiTraceChain.d.ts b/api/@ohos.hiTraceChain.d.ts index 1fd2fd0026..30d805b372 100644 --- a/api/@ohos.hiTraceChain.d.ts +++ b/api/@ohos.hiTraceChain.d.ts @@ -154,7 +154,7 @@ declare namespace hiTraceChain { * @param {number} flags Trace function flag. * @return {HiTraceId} Valid if first call, otherwise invalid. */ - function begin(name: string, flags: number = HiTraceFlag.DEFAULT): HiTraceId; + function begin(name: string, flags?: number): HiTraceId; /** * Stop process tracing and clear trace id of current thread if the given trace -- Gitee From d97930b32d64b3f8d20aace7b40032f04278e6a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E5=BC=BA=E6=A0=87?= Date: Tue, 30 Aug 2022 06:42:10 +0000 Subject: [PATCH 39/48] change context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 潘强标 --- api/@ohos.multimedia.mediaLibrary.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.multimedia.mediaLibrary.d.ts b/api/@ohos.multimedia.mediaLibrary.d.ts index f3de0ad29e..cdd692b8fe 100644 --- a/api/@ohos.multimedia.mediaLibrary.d.ts +++ b/api/@ohos.multimedia.mediaLibrary.d.ts @@ -14,7 +14,7 @@ */ import { AsyncCallback, Callback } from './basic'; -import { Context } from './application/Context'; +import Context from './application/Context'; import image from './@ohos.multimedia.image'; /** -- Gitee From 37a7340254d53028d031a57d624a3efc7c207a3e Mon Sep 17 00:00:00 2001 From: sufeng6 Date: Tue, 30 Aug 2022 13:20:27 +0800 Subject: [PATCH 40/48] fix webgl Signed-off-by: sufeng6 --- api/webgl/webgl2.d.ts | 759 +++++++++++++++++++++--------------------- 1 file changed, 381 insertions(+), 378 deletions(-) diff --git a/api/webgl/webgl2.d.ts b/api/webgl/webgl2.d.ts index 60347494bb..724191f7b2 100755 --- a/api/webgl/webgl2.d.ts +++ b/api/webgl/webgl2.d.ts @@ -19,6 +19,9 @@ * @since 7 * @syscap SystemCapability.Graphic.Graphic2D.WebGL2 */ + +import * as webgl from "./webgl"; + type GLint64 = number; /** * WebGL 2.0 @@ -73,7 +76,7 @@ interface WebGLVertexArrayObject { * @since 7 * @syscap SystemCapability.Graphic.Graphic2D.WebGL2 */ -type Uint32List = Uint32Array | GLuint[]; +type Uint32List = Uint32Array | webgl.GLuint[]; /** * WebGL 2.0 * @see https://www.khronos.org/registry/webgl/specs/latest/2.0/ @@ -81,363 +84,363 @@ type Uint32List = Uint32Array | GLuint[]; * @syscap SystemCapability.Graphic.Graphic2D.WebGL2 */ interface WebGL2RenderingContextBase { - readonly READ_BUFFER: GLenum; - readonly UNPACK_ROW_LENGTH: GLenum; - readonly UNPACK_SKIP_ROWS: GLenum; - readonly UNPACK_SKIP_PIXELS: GLenum; - readonly PACK_ROW_LENGTH: GLenum; - readonly PACK_SKIP_ROWS: GLenum; - readonly PACK_SKIP_PIXELS: GLenum; - readonly COLOR: GLenum; - readonly DEPTH: GLenum; - readonly STENCIL: GLenum; - readonly RED: GLenum; - readonly RGB8: GLenum; - readonly RGBA8: GLenum; - readonly RGB10_A2: GLenum; - readonly TEXTURE_BINDING_3D: GLenum; - readonly UNPACK_SKIP_IMAGES: GLenum; - readonly UNPACK_IMAGE_HEIGHT: GLenum; - readonly TEXTURE_3D: GLenum; - readonly TEXTURE_WRAP_R: GLenum; - readonly MAX_3D_TEXTURE_SIZE: GLenum; - readonly UNSIGNED_INT_2_10_10_10_REV: GLenum; - readonly MAX_ELEMENTS_VERTICES: GLenum; - readonly MAX_ELEMENTS_INDICES: GLenum; - readonly TEXTURE_MIN_LOD: GLenum; - readonly TEXTURE_MAX_LOD: GLenum; - readonly TEXTURE_BASE_LEVEL: GLenum; - readonly TEXTURE_MAX_LEVEL: GLenum; - readonly MIN: GLenum; - readonly MAX: GLenum; - readonly DEPTH_COMPONENT24: GLenum; - readonly MAX_TEXTURE_LOD_BIAS: GLenum; - readonly TEXTURE_COMPARE_MODE: GLenum; - readonly TEXTURE_COMPARE_FUNC: GLenum; - readonly CURRENT_QUERY: GLenum; - readonly QUERY_RESULT: GLenum; - readonly QUERY_RESULT_AVAILABLE: GLenum; - readonly STREAM_READ: GLenum; - readonly STREAM_COPY: GLenum; - readonly STATIC_READ: GLenum; - readonly STATIC_COPY: GLenum; - readonly DYNAMIC_READ: GLenum; - readonly DYNAMIC_COPY: GLenum; - readonly MAX_DRAW_BUFFERS: GLenum; - readonly DRAW_BUFFER0: GLenum; - readonly DRAW_BUFFER1: GLenum; - readonly DRAW_BUFFER2: GLenum; - readonly DRAW_BUFFER3: GLenum; - readonly DRAW_BUFFER4: GLenum; - readonly DRAW_BUFFER5: GLenum; - readonly DRAW_BUFFER6: GLenum; - readonly DRAW_BUFFER7: GLenum; - readonly DRAW_BUFFER8: GLenum; - readonly DRAW_BUFFER9: GLenum; - readonly DRAW_BUFFER10: GLenum; - readonly DRAW_BUFFER11: GLenum; - readonly DRAW_BUFFER12: GLenum; - readonly DRAW_BUFFER13: GLenum; - readonly DRAW_BUFFER14: GLenum; - readonly DRAW_BUFFER15: GLenum; - readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum; - readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum; - readonly SAMPLER_3D: GLenum; - readonly SAMPLER_2D_SHADOW: GLenum; - readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum; - readonly PIXEL_PACK_BUFFER: GLenum; - readonly PIXEL_UNPACK_BUFFER: GLenum; - readonly PIXEL_PACK_BUFFER_BINDING: GLenum; - readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum; - readonly FLOAT_MAT2x3: GLenum; - readonly FLOAT_MAT2x4: GLenum; - readonly FLOAT_MAT3x2: GLenum; - readonly FLOAT_MAT3x4: GLenum; - readonly FLOAT_MAT4x2: GLenum; - readonly FLOAT_MAT4x3: GLenum; - readonly SRGB: GLenum; - readonly SRGB8: GLenum; - readonly SRGB8_ALPHA8: GLenum; - readonly COMPARE_REF_TO_TEXTURE: GLenum; - readonly RGBA32F: GLenum; - readonly RGB32F: GLenum; - readonly RGBA16F: GLenum; - readonly RGB16F: GLenum; - readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum; - readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum; - readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum; - readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum; - readonly MAX_VARYING_COMPONENTS: GLenum; - readonly TEXTURE_2D_ARRAY: GLenum; - readonly TEXTURE_BINDING_2D_ARRAY: GLenum; - readonly R11F_G11F_B10F: GLenum; - readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum; - readonly RGB9_E5: GLenum; - readonly UNSIGNED_INT_5_9_9_9_REV: GLenum; - readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum; - readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum; - readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum; - readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum; - readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum; - readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum; - readonly RASTERIZER_DISCARD: GLenum; - readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum; - readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum; - readonly INTERLEAVED_ATTRIBS: GLenum; - readonly SEPARATE_ATTRIBS: GLenum; - readonly TRANSFORM_FEEDBACK_BUFFER: GLenum; - readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum; - readonly RGBA32UI: GLenum; - readonly RGB32UI: GLenum; - readonly RGBA16UI: GLenum; - readonly RGB16UI: GLenum; - readonly RGBA8UI: GLenum; - readonly RGB8UI: GLenum; - readonly RGBA32I: GLenum; - readonly RGB32I: GLenum; - readonly RGBA16I: GLenum; - readonly RGB16I: GLenum; - readonly RGBA8I: GLenum; - readonly RGB8I: GLenum; - readonly RED_INTEGER: GLenum; - readonly RGB_INTEGER: GLenum; - readonly RGBA_INTEGER: GLenum; - readonly SAMPLER_2D_ARRAY: GLenum; - readonly SAMPLER_2D_ARRAY_SHADOW: GLenum; - readonly SAMPLER_CUBE_SHADOW: GLenum; - readonly UNSIGNED_INT_VEC2: GLenum; - readonly UNSIGNED_INT_VEC3: GLenum; - readonly UNSIGNED_INT_VEC4: GLenum; - readonly INT_SAMPLER_2D: GLenum; - readonly INT_SAMPLER_3D: GLenum; - readonly INT_SAMPLER_CUBE: GLenum; - readonly INT_SAMPLER_2D_ARRAY: GLenum; - readonly UNSIGNED_INT_SAMPLER_2D: GLenum; - readonly UNSIGNED_INT_SAMPLER_3D: GLenum; - readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum; - readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum; - readonly DEPTH_COMPONENT32F: GLenum; - readonly DEPTH32F_STENCIL8: GLenum; - readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum; - readonly FRAMEBUFFER_DEFAULT: GLenum; - readonly UNSIGNED_INT_24_8: GLenum; - readonly DEPTH24_STENCIL8: GLenum; - readonly UNSIGNED_NORMALIZED: GLenum; - readonly DRAW_FRAMEBUFFER_BINDING: GLenum; - readonly READ_FRAMEBUFFER: GLenum; - readonly DRAW_FRAMEBUFFER: GLenum; - readonly READ_FRAMEBUFFER_BINDING: GLenum; - readonly RENDERBUFFER_SAMPLES: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum; - readonly MAX_COLOR_ATTACHMENTS: GLenum; - readonly COLOR_ATTACHMENT1: GLenum; - readonly COLOR_ATTACHMENT2: GLenum; - readonly COLOR_ATTACHMENT3: GLenum; - readonly COLOR_ATTACHMENT4: GLenum; - readonly COLOR_ATTACHMENT5: GLenum; - readonly COLOR_ATTACHMENT6: GLenum; - readonly COLOR_ATTACHMENT7: GLenum; - readonly COLOR_ATTACHMENT8: GLenum; - readonly COLOR_ATTACHMENT9: GLenum; - readonly COLOR_ATTACHMENT10: GLenum; - readonly COLOR_ATTACHMENT11: GLenum; - readonly COLOR_ATTACHMENT12: GLenum; - readonly COLOR_ATTACHMENT13: GLenum; - readonly COLOR_ATTACHMENT14: GLenum; - readonly COLOR_ATTACHMENT15: GLenum; - readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum; - readonly MAX_SAMPLES: GLenum; - readonly HALF_FLOAT: GLenum; - readonly RG: GLenum; - readonly RG_INTEGER: GLenum; - readonly R8: GLenum; - readonly RG8: GLenum; - readonly R16F: GLenum; - readonly R32F: GLenum; - readonly RG16F: GLenum; - readonly RG32F: GLenum; - readonly R8I: GLenum; - readonly R8UI: GLenum; - readonly R16I: GLenum; - readonly R16UI: GLenum; - readonly R32I: GLenum; - readonly R32UI: GLenum; - readonly RG8I: GLenum; - readonly RG8UI: GLenum; - readonly RG16I: GLenum; - readonly RG16UI: GLenum; - readonly RG32I: GLenum; - readonly RG32UI: GLenum; - readonly VERTEX_ARRAY_BINDING: GLenum; - readonly R8_SNORM: GLenum; - readonly RG8_SNORM: GLenum; - readonly RGB8_SNORM: GLenum; - readonly RGBA8_SNORM: GLenum; - readonly SIGNED_NORMALIZED: GLenum; - readonly COPY_READ_BUFFER: GLenum; - readonly COPY_WRITE_BUFFER: GLenum; - readonly COPY_READ_BUFFER_BINDING: GLenum; - readonly COPY_WRITE_BUFFER_BINDING: GLenum; - readonly UNIFORM_BUFFER: GLenum; - readonly UNIFORM_BUFFER_BINDING: GLenum; - readonly UNIFORM_BUFFER_START: GLenum; - readonly UNIFORM_BUFFER_SIZE: GLenum; - readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum; - readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum; - readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum; - readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum; - readonly MAX_UNIFORM_BLOCK_SIZE: GLenum; - readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum; - readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum; - readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum; - readonly ACTIVE_UNIFORM_BLOCKS: GLenum; - readonly UNIFORM_TYPE: GLenum; - readonly UNIFORM_SIZE: GLenum; - readonly UNIFORM_BLOCK_INDEX: GLenum; - readonly UNIFORM_OFFSET: GLenum; - readonly UNIFORM_ARRAY_STRIDE: GLenum; - readonly UNIFORM_MATRIX_STRIDE: GLenum; - readonly UNIFORM_IS_ROW_MAJOR: GLenum; - readonly UNIFORM_BLOCK_BINDING: GLenum; - readonly UNIFORM_BLOCK_DATA_SIZE: GLenum; - readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum; - readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum; - readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum; - readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum; - readonly INVALID_INDEX: GLenum; - readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum; - readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum; - readonly MAX_SERVER_WAIT_TIMEOUT: GLenum; - readonly OBJECT_TYPE: GLenum; - readonly SYNC_CONDITION: GLenum; - readonly SYNC_STATUS: GLenum; - readonly SYNC_FLAGS: GLenum; - readonly SYNC_FENCE: GLenum; - readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum; - readonly UNSIGNALED: GLenum; - readonly SIGNALED: GLenum; - readonly ALREADY_SIGNALED: GLenum; - readonly TIMEOUT_EXPIRED: GLenum; - readonly CONDITION_SATISFIED: GLenum; - readonly WAIT_FAILED: GLenum; - readonly SYNC_FLUSH_COMMANDS_BIT: GLenum; - readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum; - readonly ANY_SAMPLES_PASSED: GLenum; - readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum; - readonly SAMPLER_BINDING: GLenum; - readonly RGB10_A2UI: GLenum; - readonly INT_2_10_10_10_REV: GLenum; - readonly TRANSFORM_FEEDBACK: GLenum; - readonly TRANSFORM_FEEDBACK_PAUSED: GLenum; - readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum; - readonly TRANSFORM_FEEDBACK_BINDING: GLenum; - readonly TEXTURE_IMMUTABLE_FORMAT: GLenum; - readonly MAX_ELEMENT_INDEX: GLenum; - readonly TEXTURE_IMMUTABLE_LEVELS: GLenum; + readonly READ_BUFFER: webgl.GLenum; + readonly UNPACK_ROW_LENGTH: webgl.GLenum; + readonly UNPACK_SKIP_ROWS: webgl.GLenum; + readonly UNPACK_SKIP_PIXELS: webgl.GLenum; + readonly PACK_ROW_LENGTH: webgl.GLenum; + readonly PACK_SKIP_ROWS: webgl.GLenum; + readonly PACK_SKIP_PIXELS: webgl.GLenum; + readonly COLOR: webgl.GLenum; + readonly DEPTH: webgl.GLenum; + readonly STENCIL: webgl.GLenum; + readonly RED: webgl.GLenum; + readonly RGB8: webgl.GLenum; + readonly RGBA8: webgl.GLenum; + readonly RGB10_A2: webgl.GLenum; + readonly TEXTURE_BINDING_3D: webgl.GLenum; + readonly UNPACK_SKIP_IMAGES: webgl.GLenum; + readonly UNPACK_IMAGE_HEIGHT: webgl.GLenum; + readonly TEXTURE_3D: webgl.GLenum; + readonly TEXTURE_WRAP_R: webgl.GLenum; + readonly MAX_3D_TEXTURE_SIZE: webgl.GLenum; + readonly UNSIGNED_INT_2_10_10_10_REV: webgl.GLenum; + readonly MAX_ELEMENTS_VERTICES: webgl.GLenum; + readonly MAX_ELEMENTS_INDICES: webgl.GLenum; + readonly TEXTURE_MIN_LOD: webgl.GLenum; + readonly TEXTURE_MAX_LOD: webgl.GLenum; + readonly TEXTURE_BASE_LEVEL: webgl.GLenum; + readonly TEXTURE_MAX_LEVEL: webgl.GLenum; + readonly MIN: webgl.GLenum; + readonly MAX: webgl.GLenum; + readonly DEPTH_COMPONENT24: webgl.GLenum; + readonly MAX_TEXTURE_LOD_BIAS: webgl.GLenum; + readonly TEXTURE_COMPARE_MODE: webgl.GLenum; + readonly TEXTURE_COMPARE_FUNC: webgl.GLenum; + readonly CURRENT_QUERY: webgl.GLenum; + readonly QUERY_RESULT: webgl.GLenum; + readonly QUERY_RESULT_AVAILABLE: webgl.GLenum; + readonly STREAM_READ: webgl.GLenum; + readonly STREAM_COPY: webgl.GLenum; + readonly STATIC_READ: webgl.GLenum; + readonly STATIC_COPY: webgl.GLenum; + readonly DYNAMIC_READ: webgl.GLenum; + readonly DYNAMIC_COPY: webgl.GLenum; + readonly MAX_DRAW_BUFFERS: webgl.GLenum; + readonly DRAW_BUFFER0: webgl.GLenum; + readonly DRAW_BUFFER1: webgl.GLenum; + readonly DRAW_BUFFER2: webgl.GLenum; + readonly DRAW_BUFFER3: webgl.GLenum; + readonly DRAW_BUFFER4: webgl.GLenum; + readonly DRAW_BUFFER5: webgl.GLenum; + readonly DRAW_BUFFER6: webgl.GLenum; + readonly DRAW_BUFFER7: webgl.GLenum; + readonly DRAW_BUFFER8: webgl.GLenum; + readonly DRAW_BUFFER9: webgl.GLenum; + readonly DRAW_BUFFER10: webgl.GLenum; + readonly DRAW_BUFFER11: webgl.GLenum; + readonly DRAW_BUFFER12: webgl.GLenum; + readonly DRAW_BUFFER13: webgl.GLenum; + readonly DRAW_BUFFER14: webgl.GLenum; + readonly DRAW_BUFFER15: webgl.GLenum; + readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: webgl.GLenum; + readonly MAX_VERTEX_UNIFORM_COMPONENTS: webgl.GLenum; + readonly SAMPLER_3D: webgl.GLenum; + readonly SAMPLER_2D_SHADOW: webgl.GLenum; + readonly FRAGMENT_SHADER_DERIVATIVE_HINT: webgl.GLenum; + readonly PIXEL_PACK_BUFFER: webgl.GLenum; + readonly PIXEL_UNPACK_BUFFER: webgl.GLenum; + readonly PIXEL_PACK_BUFFER_BINDING: webgl.GLenum; + readonly PIXEL_UNPACK_BUFFER_BINDING: webgl.GLenum; + readonly FLOAT_MAT2x3: webgl.GLenum; + readonly FLOAT_MAT2x4: webgl.GLenum; + readonly FLOAT_MAT3x2: webgl.GLenum; + readonly FLOAT_MAT3x4: webgl.GLenum; + readonly FLOAT_MAT4x2: webgl.GLenum; + readonly FLOAT_MAT4x3: webgl.GLenum; + readonly SRGB: webgl.GLenum; + readonly SRGB8: webgl.GLenum; + readonly SRGB8_ALPHA8: webgl.GLenum; + readonly COMPARE_REF_TO_TEXTURE: webgl.GLenum; + readonly RGBA32F: webgl.GLenum; + readonly RGB32F: webgl.GLenum; + readonly RGBA16F: webgl.GLenum; + readonly RGB16F: webgl.GLenum; + readonly VERTEX_ATTRIB_ARRAY_INTEGER: webgl.GLenum; + readonly MAX_ARRAY_TEXTURE_LAYERS: webgl.GLenum; + readonly MIN_PROGRAM_TEXEL_OFFSET: webgl.GLenum; + readonly MAX_PROGRAM_TEXEL_OFFSET: webgl.GLenum; + readonly MAX_VARYING_COMPONENTS: webgl.GLenum; + readonly TEXTURE_2D_ARRAY: webgl.GLenum; + readonly TEXTURE_BINDING_2D_ARRAY: webgl.GLenum; + readonly R11F_G11F_B10F: webgl.GLenum; + readonly UNSIGNED_INT_10F_11F_11F_REV: webgl.GLenum; + readonly RGB9_E5: webgl.GLenum; + readonly UNSIGNED_INT_5_9_9_9_REV: webgl.GLenum; + readonly TRANSFORM_FEEDBACK_BUFFER_MODE: webgl.GLenum; + readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: webgl.GLenum; + readonly TRANSFORM_FEEDBACK_VARYINGS: webgl.GLenum; + readonly TRANSFORM_FEEDBACK_BUFFER_START: webgl.GLenum; + readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: webgl.GLenum; + readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: webgl.GLenum; + readonly RASTERIZER_DISCARD: webgl.GLenum; + readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: webgl.GLenum; + readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: webgl.GLenum; + readonly INTERLEAVED_ATTRIBS: webgl.GLenum; + readonly SEPARATE_ATTRIBS: webgl.GLenum; + readonly TRANSFORM_FEEDBACK_BUFFER: webgl.GLenum; + readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: webgl.GLenum; + readonly RGBA32UI: webgl.GLenum; + readonly RGB32UI: webgl.GLenum; + readonly RGBA16UI: webgl.GLenum; + readonly RGB16UI: webgl.GLenum; + readonly RGBA8UI: webgl.GLenum; + readonly RGB8UI: webgl.GLenum; + readonly RGBA32I: webgl.GLenum; + readonly RGB32I: webgl.GLenum; + readonly RGBA16I: webgl.GLenum; + readonly RGB16I: webgl.GLenum; + readonly RGBA8I: webgl.GLenum; + readonly RGB8I: webgl.GLenum; + readonly RED_INTEGER: webgl.GLenum; + readonly RGB_INTEGER: webgl.GLenum; + readonly RGBA_INTEGER: webgl.GLenum; + readonly SAMPLER_2D_ARRAY: webgl.GLenum; + readonly SAMPLER_2D_ARRAY_SHADOW: webgl.GLenum; + readonly SAMPLER_CUBE_SHADOW: webgl.GLenum; + readonly UNSIGNED_INT_VEC2: webgl.GLenum; + readonly UNSIGNED_INT_VEC3: webgl.GLenum; + readonly UNSIGNED_INT_VEC4: webgl.GLenum; + readonly INT_SAMPLER_2D: webgl.GLenum; + readonly INT_SAMPLER_3D: webgl.GLenum; + readonly INT_SAMPLER_CUBE: webgl.GLenum; + readonly INT_SAMPLER_2D_ARRAY: webgl.GLenum; + readonly UNSIGNED_INT_SAMPLER_2D: webgl.GLenum; + readonly UNSIGNED_INT_SAMPLER_3D: webgl.GLenum; + readonly UNSIGNED_INT_SAMPLER_CUBE: webgl.GLenum; + readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: webgl.GLenum; + readonly DEPTH_COMPONENT32F: webgl.GLenum; + readonly DEPTH32F_STENCIL8: webgl.GLenum; + readonly FLOAT_32_UNSIGNED_INT_24_8_REV: webgl.GLenum; + readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: webgl.GLenum; + readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: webgl.GLenum; + readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: webgl.GLenum; + readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: webgl.GLenum; + readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: webgl.GLenum; + readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: webgl.GLenum; + readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: webgl.GLenum; + readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: webgl.GLenum; + readonly FRAMEBUFFER_DEFAULT: webgl.GLenum; + readonly UNSIGNED_INT_24_8: webgl.GLenum; + readonly DEPTH24_STENCIL8: webgl.GLenum; + readonly UNSIGNED_NORMALIZED: webgl.GLenum; + readonly DRAW_FRAMEBUFFER_BINDING: webgl.GLenum; + readonly READ_FRAMEBUFFER: webgl.GLenum; + readonly DRAW_FRAMEBUFFER: webgl.GLenum; + readonly READ_FRAMEBUFFER_BINDING: webgl.GLenum; + readonly RENDERBUFFER_SAMPLES: webgl.GLenum; + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: webgl.GLenum; + readonly MAX_COLOR_ATTACHMENTS: webgl.GLenum; + readonly COLOR_ATTACHMENT1: webgl.GLenum; + readonly COLOR_ATTACHMENT2: webgl.GLenum; + readonly COLOR_ATTACHMENT3: webgl.GLenum; + readonly COLOR_ATTACHMENT4: webgl.GLenum; + readonly COLOR_ATTACHMENT5: webgl.GLenum; + readonly COLOR_ATTACHMENT6: webgl.GLenum; + readonly COLOR_ATTACHMENT7: webgl.GLenum; + readonly COLOR_ATTACHMENT8: webgl.GLenum; + readonly COLOR_ATTACHMENT9: webgl.GLenum; + readonly COLOR_ATTACHMENT10: webgl.GLenum; + readonly COLOR_ATTACHMENT11: webgl.GLenum; + readonly COLOR_ATTACHMENT12: webgl.GLenum; + readonly COLOR_ATTACHMENT13: webgl.GLenum; + readonly COLOR_ATTACHMENT14: webgl.GLenum; + readonly COLOR_ATTACHMENT15: webgl.GLenum; + readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: webgl.GLenum; + readonly MAX_SAMPLES: webgl.GLenum; + readonly HALF_FLOAT: webgl.GLenum; + readonly RG: webgl.GLenum; + readonly RG_INTEGER: webgl.GLenum; + readonly R8: webgl.GLenum; + readonly RG8: webgl.GLenum; + readonly R16F: webgl.GLenum; + readonly R32F: webgl.GLenum; + readonly RG16F: webgl.GLenum; + readonly RG32F: webgl.GLenum; + readonly R8I: webgl.GLenum; + readonly R8UI: webgl.GLenum; + readonly R16I: webgl.GLenum; + readonly R16UI: webgl.GLenum; + readonly R32I: webgl.GLenum; + readonly R32UI: webgl.GLenum; + readonly RG8I: webgl.GLenum; + readonly RG8UI: webgl.GLenum; + readonly RG16I: webgl.GLenum; + readonly RG16UI: webgl.GLenum; + readonly RG32I: webgl.GLenum; + readonly RG32UI: webgl.GLenum; + readonly VERTEX_ARRAY_BINDING: webgl.GLenum; + readonly R8_SNORM: webgl.GLenum; + readonly RG8_SNORM: webgl.GLenum; + readonly RGB8_SNORM: webgl.GLenum; + readonly RGBA8_SNORM: webgl.GLenum; + readonly SIGNED_NORMALIZED: webgl.GLenum; + readonly COPY_READ_BUFFER: webgl.GLenum; + readonly COPY_WRITE_BUFFER: webgl.GLenum; + readonly COPY_READ_BUFFER_BINDING: webgl.GLenum; + readonly COPY_WRITE_BUFFER_BINDING: webgl.GLenum; + readonly UNIFORM_BUFFER: webgl.GLenum; + readonly UNIFORM_BUFFER_BINDING: webgl.GLenum; + readonly UNIFORM_BUFFER_START: webgl.GLenum; + readonly UNIFORM_BUFFER_SIZE: webgl.GLenum; + readonly MAX_VERTEX_UNIFORM_BLOCKS: webgl.GLenum; + readonly MAX_FRAGMENT_UNIFORM_BLOCKS: webgl.GLenum; + readonly MAX_COMBINED_UNIFORM_BLOCKS: webgl.GLenum; + readonly MAX_UNIFORM_BUFFER_BINDINGS: webgl.GLenum; + readonly MAX_UNIFORM_BLOCK_SIZE: webgl.GLenum; + readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: webgl.GLenum; + readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: webgl.GLenum; + readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: webgl.GLenum; + readonly ACTIVE_UNIFORM_BLOCKS: webgl.GLenum; + readonly UNIFORM_TYPE: webgl.GLenum; + readonly UNIFORM_SIZE: webgl.GLenum; + readonly UNIFORM_BLOCK_INDEX: webgl.GLenum; + readonly UNIFORM_OFFSET: webgl.GLenum; + readonly UNIFORM_ARRAY_STRIDE: webgl.GLenum; + readonly UNIFORM_MATRIX_STRIDE: webgl.GLenum; + readonly UNIFORM_IS_ROW_MAJOR: webgl.GLenum; + readonly UNIFORM_BLOCK_BINDING: webgl.GLenum; + readonly UNIFORM_BLOCK_DATA_SIZE: webgl.GLenum; + readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: webgl.GLenum; + readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: webgl.GLenum; + readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: webgl.GLenum; + readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: webgl.GLenum; + readonly INVALID_INDEX: webgl.GLenum; + readonly MAX_VERTEX_OUTPUT_COMPONENTS: webgl.GLenum; + readonly MAX_FRAGMENT_INPUT_COMPONENTS: webgl.GLenum; + readonly MAX_SERVER_WAIT_TIMEOUT: webgl.GLenum; + readonly OBJECT_TYPE: webgl.GLenum; + readonly SYNC_CONDITION: webgl.GLenum; + readonly SYNC_STATUS: webgl.GLenum; + readonly SYNC_FLAGS: webgl.GLenum; + readonly SYNC_FENCE: webgl.GLenum; + readonly SYNC_GPU_COMMANDS_COMPLETE: webgl.GLenum; + readonly UNSIGNALED: webgl.GLenum; + readonly SIGNALED: webgl.GLenum; + readonly ALREADY_SIGNALED: webgl.GLenum; + readonly TIMEOUT_EXPIRED: webgl.GLenum; + readonly CONDITION_SATISFIED: webgl.GLenum; + readonly WAIT_FAILED: webgl.GLenum; + readonly SYNC_FLUSH_COMMANDS_BIT: webgl.GLenum; + readonly VERTEX_ATTRIB_ARRAY_DIVISOR: webgl.GLenum; + readonly ANY_SAMPLES_PASSED: webgl.GLenum; + readonly ANY_SAMPLES_PASSED_CONSERVATIVE: webgl.GLenum; + readonly SAMPLER_BINDING: webgl.GLenum; + readonly RGB10_A2UI: webgl.GLenum; + readonly INT_2_10_10_10_REV: webgl.GLenum; + readonly TRANSFORM_FEEDBACK: webgl.GLenum; + readonly TRANSFORM_FEEDBACK_PAUSED: webgl.GLenum; + readonly TRANSFORM_FEEDBACK_ACTIVE: webgl.GLenum; + readonly TRANSFORM_FEEDBACK_BINDING: webgl.GLenum; + readonly TEXTURE_IMMUTABLE_FORMAT: webgl.GLenum; + readonly MAX_ELEMENT_INDEX: webgl.GLenum; + readonly TEXTURE_IMMUTABLE_LEVELS: webgl.GLenum; readonly TIMEOUT_IGNORED: GLint64; - readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum; - copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr): void; - getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: GLuint, length?: GLuint): void; - blitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum): void; - framebufferTextureLayer(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, layer: GLint): void; - invalidateFramebuffer(target: GLenum, attachments: GLenum[]): void; - invalidateSubFramebuffer(target: GLenum, attachments: GLenum[], x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; - readBuffer(src: GLenum): void; - getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum): any; - renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void; - texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void; - texStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei): void; - texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void; - texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void; - texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView | null): void; - texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void; - texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void; - texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void; - texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView | null, srcOffset?: GLuint): void; - copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; - compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void; - compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void; - compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void; - compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void; - getFragDataLocation(program: WebGLProgram, name: string): GLint; - uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void; - uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void; - uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void; - uniform4ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint): void; - uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; - vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint): void; - vertexAttribI4iv(index: GLuint, values: Int32List): void; - vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint): void; - vertexAttribI4uiv(index: GLuint, values: Uint32List): void; - vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr): void; - vertexAttribDivisor(index: GLuint, divisor: GLuint): void; - drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei): void; - drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei): void; - drawRangeElements(mode: GLenum, start: GLuint, end: GLuint, count: GLsizei, type: GLenum, offset: GLintptr): void; - drawBuffers(buffers: GLenum[]): void; - clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: GLuint): void; - clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: GLuint): void; - clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: GLuint): void; - clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint): void; + readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: webgl.GLenum; + copyBufferSubData(readTarget: webgl.GLenum, writeTarget: webgl.GLenum, readOffset: webgl.GLintptr, writeOffset: webgl.GLintptr, size: webgl.GLsizeiptr): void; + getBufferSubData(target: webgl.GLenum, srcByteOffset: webgl.GLintptr, dstBuffer: ArrayBufferView, dstOffset?: webgl.GLuint, length?: webgl.GLuint): void; + blitFramebuffer(srcX0: webgl.GLint, srcY0: webgl.GLint, srcX1: webgl.GLint, srcY1: webgl.GLint, dstX0: webgl.GLint, dstY0: webgl.GLint, dstX1: webgl.GLint, dstY1: webgl.GLint, mask: webgl.GLbitfield, filter: webgl.GLenum): void; + framebufferTextureLayer(target: webgl.GLenum, attachment: webgl.GLenum, texture: webgl.WebGLTexture | null, level: webgl.GLint, layer: webgl.GLint): void; + invalidateFramebuffer(target: webgl.GLenum, attachments: webgl.GLenum[]): void; + invalidateSubFramebuffer(target: webgl.GLenum, attachments: webgl.GLenum[], x: webgl.GLint, y: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei): void; + readBuffer(src: webgl.GLenum): void; + getInternalformatParameter(target: webgl.GLenum, internalformat: webgl.GLenum, pname: webgl.GLenum): any; + renderbufferStorageMultisample(target: webgl.GLenum, samples: webgl.GLsizei, internalformat: webgl.GLenum, width: webgl.GLsizei, height: webgl.GLsizei): void; + texStorage2D(target: webgl.GLenum, levels: webgl.GLsizei, internalformat: webgl.GLenum, width: webgl.GLsizei, height: webgl.GLsizei): void; + texStorage3D(target: webgl.GLenum, levels: webgl.GLsizei, internalformat: webgl.GLenum, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei): void; + texImage3D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, border: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, pboOffset: webgl.GLintptr): void; + texImage3D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, border: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, source: webgl.TexImageSource): void; + texImage3D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, border: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, srcData: ArrayBufferView | null): void; + texImage3D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, border: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, srcData: ArrayBufferView, srcOffset: webgl.GLuint): void; + texSubImage3D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, zoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, pboOffset: webgl.GLintptr): void; + texSubImage3D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, zoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, source: webgl.TexImageSource): void; + texSubImage3D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, zoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, srcData: ArrayBufferView | null, srcOffset?: webgl.GLuint): void; + copyTexSubImage3D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, zoffset: webgl.GLint, x: webgl.GLint, y: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei): void; + compressedTexImage3D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLenum, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, border: webgl.GLint, imageSize: webgl.GLsizei, offset: webgl.GLintptr): void; + compressedTexImage3D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLenum, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, border: webgl.GLint, srcData: ArrayBufferView, srcOffset?: webgl.GLuint, srcLengthOverride?: webgl.GLuint): void; + compressedTexSubImage3D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, zoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, format: webgl.GLenum, imageSize: webgl.GLsizei, offset: webgl.GLintptr): void; + compressedTexSubImage3D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, zoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, depth: webgl.GLsizei, format: webgl.GLenum, srcData: ArrayBufferView, srcOffset?: webgl.GLuint, srcLengthOverride?: webgl.GLuint): void; + getFragDataLocation(program: webgl.WebGLProgram, name: string): webgl.GLint; + uniform1ui(location: webgl.WebGLUniformLocation | null, v0: webgl.GLuint): void; + uniform2ui(location: webgl.WebGLUniformLocation | null, v0: webgl.GLuint, v1: webgl.GLuint): void; + uniform3ui(location: webgl.WebGLUniformLocation | null, v0: webgl.GLuint, v1: webgl.GLuint, v2: webgl.GLuint): void; + uniform4ui(location: webgl.WebGLUniformLocation | null, v0: webgl.GLuint, v1: webgl.GLuint, v2: webgl.GLuint, v3: webgl.GLuint): void; + uniform1uiv(location: webgl.WebGLUniformLocation | null, data: Uint32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniform2uiv(location: webgl.WebGLUniformLocation | null, data: Uint32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniform3uiv(location: webgl.WebGLUniformLocation | null, data: Uint32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniform4uiv(location: webgl.WebGLUniformLocation | null, data: Uint32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniformMatrix3x2fv(location: webgl.WebGLUniformLocation | null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniformMatrix4x2fv(location: webgl.WebGLUniformLocation | null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniformMatrix2x3fv(location: webgl.WebGLUniformLocation | null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniformMatrix4x3fv(location: webgl.WebGLUniformLocation | null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniformMatrix2x4fv(location: webgl.WebGLUniformLocation | null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniformMatrix3x4fv(location: webgl.WebGLUniformLocation | null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + vertexAttribI4i(index: webgl.GLuint, x: webgl.GLint, y: webgl.GLint, z: webgl.GLint, w: webgl.GLint): void; + vertexAttribI4iv(index: webgl.GLuint, values: webgl.Int32List): void; + vertexAttribI4ui(index: webgl.GLuint, x: webgl.GLuint, y: webgl.GLuint, z: webgl.GLuint, w: webgl.GLuint): void; + vertexAttribI4uiv(index: webgl.GLuint, values: Uint32List): void; + vertexAttribIPointer(index: webgl.GLuint, size: webgl.GLint, type: webgl.GLenum, stride: webgl.GLsizei, offset: webgl.GLintptr): void; + vertexAttribDivisor(index: webgl.GLuint, divisor: webgl.GLuint): void; + drawArraysInstanced(mode: webgl.GLenum, first: webgl.GLint, count: webgl.GLsizei, instanceCount: webgl.GLsizei): void; + drawElementsInstanced(mode: webgl.GLenum, count: webgl.GLsizei, type: webgl.GLenum, offset: webgl.GLintptr, instanceCount: webgl.GLsizei): void; + drawRangeElements(mode: webgl.GLenum, start: webgl.GLuint, end: webgl.GLuint, count: webgl.GLsizei, type: webgl.GLenum, offset: webgl.GLintptr): void; + drawBuffers(buffers: webgl.GLenum[]): void; + clearBufferfv(buffer: webgl.GLenum, drawbuffer: webgl.GLint, values: webgl.Float32List, srcOffset?: webgl.GLuint): void; + clearBufferiv(buffer: webgl.GLenum, drawbuffer: webgl.GLint, values: webgl.Int32List, srcOffset?: webgl.GLuint): void; + clearBufferuiv(buffer: webgl.GLenum, drawbuffer: webgl.GLint, values: Uint32List, srcOffset?: webgl.GLuint): void; + clearBufferfi(buffer: webgl.GLenum, drawbuffer: webgl.GLint, depth: webgl.GLfloat, stencil: webgl.GLint): void; createQuery(): WebGLQuery | null; deleteQuery(query: WebGLQuery | null): void; - isQuery(query: WebGLQuery | null): GLboolean; - beginQuery(target: GLenum, query: WebGLQuery): void; - endQuery(target: GLenum): void; - getQuery(target: GLenum, pname: GLenum): WebGLQuery | null; - getQueryParameter(query: WebGLQuery, pname: GLenum): any; + isQuery(query: WebGLQuery | null): webgl.GLboolean; + beginQuery(target: webgl.GLenum, query: WebGLQuery): void; + endQuery(target: webgl.GLenum): void; + getQuery(target: webgl.GLenum, pname: webgl.GLenum): WebGLQuery | null; + getQueryParameter(query: WebGLQuery, pname: webgl.GLenum): any; createSampler(): WebGLSampler | null; deleteSampler(sampler: WebGLSampler | null): void; - isSampler(sampler: WebGLSampler | null): GLboolean; - bindSampler(unit: GLuint, sampler: WebGLSampler | null): void; - samplerParameteri(sampler: WebGLSampler, pname: GLenum, param: GLint): void; - samplerParameterf(sampler: WebGLSampler, pname: GLenum, param: GLfloat): void; - getSamplerParameter(sampler: WebGLSampler, pname: GLenum): any; - fenceSync(condition: GLenum, flags: GLbitfield): WebGLSync | null; - isSync(sync: WebGLSync | null): GLboolean; + isSampler(sampler: WebGLSampler | null): webgl.GLboolean; + bindSampler(unit: webgl.GLuint, sampler: WebGLSampler | null): void; + samplerParameteri(sampler: WebGLSampler, pname: webgl.GLenum, param: webgl.GLint): void; + samplerParameterf(sampler: WebGLSampler, pname: webgl.GLenum, param: webgl.GLfloat): void; + getSamplerParameter(sampler: WebGLSampler, pname: webgl.GLenum): any; + fenceSync(condition: webgl.GLenum, flags: webgl.GLbitfield): WebGLSync | null; + isSync(sync: WebGLSync | null): webgl.GLboolean; deleteSync(sync: WebGLSync | null): void; - clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum; - waitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLint64): void; - getSyncParameter(sync: WebGLSync, pname: GLenum): any; + clientWaitSync(sync: WebGLSync, flags: webgl.GLbitfield, timeout: GLuint64 ): webgl.GLenum; + waitSync(sync: WebGLSync, flags: webgl.GLbitfield, timeout: GLint64): void; + getSyncParameter(sync: WebGLSync, pname: webgl.GLenum): any; createTransformFeedback(): WebGLTransformFeedback | null; deleteTransformFeedback(tf: WebGLTransformFeedback | null): void; - isTransformFeedback(tf: WebGLTransformFeedback | null): GLboolean; - bindTransformFeedback(target: GLenum, tf: WebGLTransformFeedback | null): void; - beginTransformFeedback(primitiveMode: GLenum): void; + isTransformFeedback(tf: WebGLTransformFeedback | null): webgl.GLboolean; + bindTransformFeedback(target: webgl.GLenum, tf: WebGLTransformFeedback | null): void; + beginTransformFeedback(primitiveMode: webgl.GLenum): void; endTransformFeedback(): void; - transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum): void; - getTransformFeedbackVarying(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null; + transformFeedbackVaryings(program: webgl.WebGLProgram, varyings: string[], bufferMode: webgl.GLenum): void; + getTransformFeedbackVarying(program: webgl.WebGLProgram, index: webgl.GLuint): webgl.WebGLActiveInfo | null; pauseTransformFeedback(): void; resumeTransformFeedback(): void; - bindBufferBase(target: GLenum, index: GLuint, buffer: WebGLBuffer | null): void; - bindBufferRange(target: GLenum, index: GLuint, buffer: WebGLBuffer | null, offset: GLintptr, size: GLsizeiptr): void; - getIndexedParameter(target: GLenum, index: GLuint): any; - getUniformIndices(program: WebGLProgram, uniformNames: string[]): GLuint[] | null; - getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum): any; - getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string): GLuint; - getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum): any; - getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: GLuint): string | null; - uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint): void; + bindBufferBase(target: webgl.GLenum, index: webgl.GLuint, buffer: webgl.WebGLBuffer | null): void; + bindBufferRange(target: webgl.GLenum, index: webgl.GLuint, buffer: webgl.WebGLBuffer | null, offset: webgl.GLintptr, size: webgl.GLsizeiptr): void; + getIndexedParameter(target: webgl.GLenum, index: webgl.GLuint): any; + getUniformIndices(program: webgl.WebGLProgram, uniformNames: string[]): webgl.GLuint[] | null; + getActiveUniforms(program: webgl.WebGLProgram, uniformIndices: webgl.GLuint[], pname: webgl.GLenum): any; + getUniformBlockIndex(program: webgl.WebGLProgram, uniformBlockName: string): webgl.GLuint; + getActiveUniformBlockParameter(program: webgl.WebGLProgram, uniformBlockIndex: webgl.GLuint, pname: webgl.GLenum): any; + getActiveUniformBlockName(program: webgl.WebGLProgram, uniformBlockIndex: webgl.GLuint): string | null; + uniformBlockBinding(program: webgl.WebGLProgram, uniformBlockIndex: webgl.GLuint, uniformBlockBinding: webgl.GLuint): void; createVertexArray(): WebGLVertexArrayObject | null; deleteVertexArray(vertexArray: WebGLVertexArrayObject | null): void; - isVertexArray(vertexArray: WebGLVertexArrayObject | null): GLboolean; + isVertexArray(vertexArray: WebGLVertexArrayObject | null): webgl.GLboolean; bindVertexArray(array: WebGLVertexArrayObject | null): void; } /** @@ -447,39 +450,39 @@ interface WebGL2RenderingContextBase { * @syscap SystemCapability.Graphic.Graphic2D.WebGL2 */ interface WebGL2RenderingContextOverloads { - bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void; - bufferData(target: GLenum, srcData: BufferSource | null, usage: GLenum): void; - bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource): void; - bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length?: GLuint): void; - bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length?: GLuint): void; - texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void; - texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void; - texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void; - texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void; - texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void; - texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void; - texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void; - texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void; - texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void; - texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void; - compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void; - compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void; - compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void; - compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void; - uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void; - readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView | null): void; - readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr): void; - readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint): void; + bufferData(target: webgl.GLenum, size: webgl.GLsizeiptr, usage: webgl.GLenum): void; + bufferData(target: webgl.GLenum, srcData: BufferSource | null, usage: webgl.GLenum): void; + bufferSubData(target: webgl.GLenum, dstByteOffset: webgl.GLintptr, srcData: BufferSource): void; + bufferData(target: webgl.GLenum, srcData: ArrayBufferView, usage: webgl.GLenum, srcOffset: webgl.GLuint, length?: webgl.GLuint): void; + bufferSubData(target: webgl.GLenum, dstByteOffset: webgl.GLintptr, srcData: ArrayBufferView, srcOffset: webgl.GLuint, length?: webgl.GLuint): void; + texImage2D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, border: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, pixels: ArrayBufferView | null): void; + texImage2D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, source: webgl.TexImageSource): void; + texSubImage2D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, pixels: ArrayBufferView | null): void; + texSubImage2D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, source: webgl.TexImageSource): void; + texImage2D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, border: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, pboOffset: webgl.GLintptr): void; + texImage2D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, border: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, source: webgl.TexImageSource): void; + texImage2D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, border: webgl.GLint, format: webgl.GLenum, type: webgl.GLenum, srcData: ArrayBufferView, srcOffset: webgl.GLuint): void; + texSubImage2D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, pboOffset: webgl.GLintptr): void; + texSubImage2D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, source: webgl.TexImageSource): void; + texSubImage2D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, srcData: ArrayBufferView, srcOffset: webgl.GLuint): void; + compressedTexImage2D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLenum, width: webgl.GLsizei, height: webgl.GLsizei, border: webgl.GLint, imageSize: webgl.GLsizei, offset: webgl.GLintptr): void; + compressedTexImage2D(target: webgl.GLenum, level: webgl.GLint, internalformat: webgl.GLenum, width: webgl.GLsizei, height: webgl.GLsizei, border: webgl.GLint, srcData: ArrayBufferView, srcOffset?: webgl.GLuint, srcLengthOverride?: webgl.GLuint): void; + compressedTexSubImage2D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, imageSize: webgl.GLsizei, offset: webgl.GLintptr): void; + compressedTexSubImage2D(target: webgl.GLenum, level: webgl.GLint, xoffset: webgl.GLint, yoffset: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, srcData: ArrayBufferView, srcOffset?: webgl.GLuint, srcLengthOverride?: webgl.GLuint): void; + uniform1fv(location: webgl.WebGLUniformLocation | null, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniform2fv(location: webgl.WebGLUniformLocation | null, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniform3fv(location: webgl.WebGLUniformLocation | null, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniform4fv(location: webgl.WebGLUniformLocation | null, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniform1iv(location: webgl.WebGLUniformLocation | null, data: webgl.Int32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniform2iv(location: webgl.WebGLUniformLocation | null, data: webgl.Int32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniform3iv(location: webgl.WebGLUniformLocation | null, data: webgl.Int32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniform4iv(location: webgl.WebGLUniformLocation | null, data: webgl.Int32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniformMatrix2fv(location: webgl.WebGLUniformLocation | null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniformMatrix3fv(location: webgl.WebGLUniformLocation | null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + uniformMatrix4fv(location: webgl.WebGLUniformLocation | null, transpose: webgl.GLboolean, data: webgl.Float32List, srcOffset?: webgl.GLuint, srcLength?: webgl.GLuint): void; + readPixels(x: webgl.GLint, y: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, dstData: ArrayBufferView | null): void; + readPixels(x: webgl.GLint, y: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, offset: webgl.GLintptr): void; + readPixels(x: webgl.GLint, y: webgl.GLint, width: webgl.GLsizei, height: webgl.GLsizei, format: webgl.GLenum, type: webgl.GLenum, dstData: ArrayBufferView, dstOffset: webgl.GLuint): void; } /** * WebGL 2.0 -- Gitee From 2e23e527ae367083f89e0aa2fef3d41c785e9fc2 Mon Sep 17 00:00:00 2001 From: xingyanan Date: Mon, 29 Aug 2022 13:58:48 +0000 Subject: [PATCH 41/48] window api bugfix Signed-off-by: xingyanan Change-Id: I3b3e324c97208f7765b9c0fe429727cb502a9045 Signed-off-by: xingyanan --- api/@ohos.window.d.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index aded7ac14a..2b56a8cc4c 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -12,9 +12,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/// + import { AsyncCallback, Callback } from './basic' ; -import { Context } from './application/BaseContext'; -import { LocalStorage } from './@internal/component/ets/stateManagement' +import Context from './application/BaseContext'; +import { LocalStorage } from 'StateManagement'; /** * Window manager. * @syscap SystemCapability.WindowManager.WindowManager.Core -- Gitee From 9590543f371fd72b370e4a15fe9f10b8b7fce492 Mon Sep 17 00:00:00 2001 From: xuchenghua Date: Tue, 30 Aug 2022 12:46:49 +0800 Subject: [PATCH 42/48] xuchenghua09@huawei.com Signed-off-by: xuchenghua --- api/@ohos.application.abilityManager.d.ts | 1 + api/ability/dataAbilityHelper.d.ts | 2 +- api/application/AbilityContext.d.ts | 6 ++++-- api/application/abilityDelegator.d.ts | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/api/@ohos.application.abilityManager.d.ts b/api/@ohos.application.abilityManager.d.ts index 1546b095a4..a4f2b287c0 100644 --- a/api/@ohos.application.abilityManager.d.ts +++ b/api/@ohos.application.abilityManager.d.ts @@ -24,6 +24,7 @@ import { ElementName } from './bundle/elementName'; * * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi Hide this for inner system use * @permission N/A */ declare namespace abilityManager { diff --git a/api/ability/dataAbilityHelper.d.ts b/api/ability/dataAbilityHelper.d.ts index bb5cba6122..eb5e181bdf 100644 --- a/api/ability/dataAbilityHelper.d.ts +++ b/api/ability/dataAbilityHelper.d.ts @@ -14,7 +14,7 @@ */ import { AsyncCallback } from '../basic'; -import { ResultSet } from '../data/rdb/resultSet'; +import ResultSet from '../data/rdb/resultSet'; import { DataAbilityOperation } from './dataAbilityOperation'; import { DataAbilityResult } from './dataAbilityResult'; import dataAbility from '../@ohos.data.dataAbility'; diff --git a/api/application/AbilityContext.d.ts b/api/application/AbilityContext.d.ts index 27b8c3ab1c..38a246f52b 100755 --- a/api/application/AbilityContext.d.ts +++ b/api/application/AbilityContext.d.ts @@ -13,6 +13,8 @@ * limitations under the License. */ +/// + import { AbilityInfo } from "../bundle/abilityInfo"; import { AbilityResult } from "../ability/abilityResult"; import { AsyncCallback } from "../basic"; @@ -24,7 +26,7 @@ import StartOptions from "../@ohos.application.StartOptions"; import PermissionRequestResult from "./PermissionRequestResult"; import { Configuration } from '../@ohos.application.Configuration'; import Caller from '../@ohos.application.Ability'; -import { LocalStorage } from '../@internal/component/ets/stateManagement'; +import { LocalStorage } from 'StateManagement'; import image from '../@ohos.multimedia.image'; /** @@ -312,4 +314,4 @@ export default class AbilityContext extends Context { */ isTerminating(): boolean; -} \ No newline at end of file +} diff --git a/api/application/abilityDelegator.d.ts b/api/application/abilityDelegator.d.ts index 156c222b32..f45d15cf07 100644 --- a/api/application/abilityDelegator.d.ts +++ b/api/application/abilityDelegator.d.ts @@ -16,7 +16,7 @@ import { AsyncCallback } from '../basic'; import Ability from '../@ohos.application.Ability'; import { AbilityMonitor } from './abilityMonitor'; -import { Context } from './Context'; +import Context from './Context'; import Want from "../@ohos.application.Want"; import { ShellCmdResult } from './shellCmdResult'; @@ -171,4 +171,4 @@ export interface AbilityDelegator { finishTest(msg: string, code: number): Promise; } -export default AbilityDelegator; \ No newline at end of file +export default AbilityDelegator; -- Gitee From 5b506f823e60a75a0798d47097ad2b3a846c43e2 Mon Sep 17 00:00:00 2001 From: lijuntao Date: Tue, 30 Aug 2022 16:17:16 +0800 Subject: [PATCH 43/48] =?UTF-8?q?fixed=20e4cc90e=20from=20https://gitee.co?= =?UTF-8?q?m/li=5Fjuntao/interface=5Fsdk-js/pulls/2581=20Signed-off-by:=20?= =?UTF-8?q?lijuntao=20=20fix:=E4=BF=AE=E6=94=B9d.ts?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/@ohos.systemTime.d.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/api/@ohos.systemTime.d.ts b/api/@ohos.systemTime.d.ts index c45ec69773..ef8856074d 100755 --- a/api/@ohos.systemTime.d.ts +++ b/api/@ohos.systemTime.d.ts @@ -35,21 +35,24 @@ declare namespace systemTime { * Obtains the number of milliseconds that have elapsed since the Unix epoch. * @since 8 */ - function getCurrentTime(isNano?: boolean, callback: AsyncCallback): void; + function getCurrentTime(isNano: boolean, callback: AsyncCallback): void; + function getCurrentTime(callback: AsyncCallback): void; function getCurrentTime(isNano?: boolean): Promise; /** * Obtains the number of milliseconds elapsed since the system was booted, not including deep sleep time. * @since 8 */ - function getRealActiveTime(isNano?: boolean, callback: AsyncCallback): void; + function getRealActiveTime(isNano: boolean, callback: AsyncCallback): void; + function getRealActiveTime(callback: AsyncCallback): void; function getRealActiveTime(isNano?: boolean): Promise; /** * Obtains the number of milliseconds elapsed since the system was booted, including deep sleep time. * @since 8 */ - function getRealTime(isNano?: boolean, callback: AsyncCallback): void; + function getRealTime(isNano: boolean, callback: AsyncCallback): void; + function getRealTime(callback: AsyncCallback): void; function getRealTime(isNano?: boolean): Promise; /** -- Gitee From 112f20a7f5991bd1b4994fafaf3e2245b0d7165c Mon Sep 17 00:00:00 2001 From: xdmal Date: Tue, 30 Aug 2022 09:47:57 +0800 Subject: [PATCH 44/48] Rectify d.ts file specification Rectify d.ts file specification issue:https://gitee.com/openharmony/interface_sdk-js/issues/I5OQ5F Signed-off-by: xdmal --- api/@ohos.process.d.ts | 7 ++++++- api/@ohos.util.d.ts | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/api/@ohos.process.d.ts b/api/@ohos.process.d.ts index 02b7e123ea..d2d4243470 100644 --- a/api/@ohos.process.d.ts +++ b/api/@ohos.process.d.ts @@ -22,7 +22,12 @@ */ declare namespace process { - + /** + * The childprocess object can be used to create a new process. + * @since 7 + * @syscap SystemCapability.Utils.Lang + * @systemapi Hide this for inner system use + */ export interface ChildProcess { /** * return pid is the pid of the current process diff --git a/api/@ohos.util.d.ts b/api/@ohos.util.d.ts index a46db2c3e7..18ccd2420d 100644 --- a/api/@ohos.util.d.ts +++ b/api/@ohos.util.d.ts @@ -269,7 +269,7 @@ declare namespace util { toString(): string; } - class LruBuffer { + class LruBuffer { /** * Default constructor used to create a new LruBuffer instance with the default capacity of 64. * @since 8 -- Gitee From ab59e3f59f23f78f2e37dcc93129efb6f40d7bbc Mon Sep 17 00:00:00 2001 From: houhaoyu Date: Tue, 30 Aug 2022 14:01:11 +0800 Subject: [PATCH 45/48] houhaoyu@huawei.com fix arkui api Signed-off-by: houhaoyu Change-Id: I65471e0dcccdcdbc284d4d2b78f3e43acc863f73 --- BUILD.gn | 2 + api/@internal/component/ets/canvas.d.ts | 9 +- api/@internal/component/ets/common.d.ts | 7 + api/@internal/component/ets/matrix2d.d.ts | 90 +----------- .../component/ets/state_management.d.ts | 9 +- api/@internal/component/ets/units.d.ts | 7 + api/@internal/ets/lifecycle.d.ts | 3 +- api/@internal/global.d.ts | 4 + api/@ohos.prompt.d.ts | 3 + api/common/full/canvaspattern.d.ts | 137 ++++++++++++++++++ api/common/full/dom.d.ts | 2 +- api/common/full/global.d.ts | 2 + api/common/full/viewmodel.d.ts | 17 ++- 13 files changed, 184 insertions(+), 108 deletions(-) create mode 100644 api/common/full/canvaspattern.d.ts diff --git a/BUILD.gn b/BUILD.gn index 3173ec8115..ee627bc4b2 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -22,6 +22,7 @@ ohos_copy("ets_internal_api") { "api/@internal/ets/index.d.ts", "api/@internal/ets/lifecycle.d.ts", "api/@internal/global.d.ts", + "api/common/full/canvaspattern.d.ts", "api/common/full/featureability.d.ts", ] outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] @@ -191,6 +192,7 @@ ohos_declaration_template("ohos_declaration_common") { ohos_copy("internal_full") { sources = [ + "api/common/full/canvaspattern.d.ts", "api/common/full/console.d.ts", "api/common/full/dom.d.ts", "api/common/full/featureability.d.ts", diff --git a/api/@internal/component/ets/canvas.d.ts b/api/@internal/component/ets/canvas.d.ts index 45f68e8070..7e320334ef 100644 --- a/api/@internal/component/ets/canvas.d.ts +++ b/api/@internal/component/ets/canvas.d.ts @@ -252,14 +252,7 @@ declare class Path2D extends CanvasPath { * Describes an opaque object of a template, which is created using the createPattern() method. * @since 8 */ -declare interface CanvasPattern { - /** - * Adds the matrix transformation effect to the current template. - * @param transform transformation matrix - * @since 8 - */ - setTransform(transform?: Matrix2D): void; -} + declare type CanvasPattern = import('../api/@internal/full/canvaspattern').CanvasPattern; /** * Size information of the text diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 70402c47b1..04c09db4c5 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -2007,3 +2007,10 @@ declare class View { */ create(value: any): any; } + +declare module "SpecialEvent" { + module "SpecialEvent" { + // @ts-ignore + export { TouchObject, KeyEvent, MouseEvent }; + } +} diff --git a/api/@internal/component/ets/matrix2d.d.ts b/api/@internal/component/ets/matrix2d.d.ts index 982eb954c0..67ffd751c8 100644 --- a/api/@internal/component/ets/matrix2d.d.ts +++ b/api/@internal/component/ets/matrix2d.d.ts @@ -17,92 +17,4 @@ * 2D transformation matrix, supporting rotation, translation, and scaling of the X-axis and Y-axis * @since 8 */ -declare class Matrix2D { - /** - * Horizontal Zoom - * @since 8 - */ - scaleX?: number; - - /** - * Vertical Tilt - * @since 8 - */ - rotateY?: number; - - /** - * Horizontal Tilt - * @since 8 - */ - rotateX?: number; - - /** - * Vertical Zoom - * @since 8 - */ - scaleY?: number; - - /** - * Horizontal movement - * @since 8 - */ - translateX?: number; - - /** - * Vertical movement - * @since 8 - */ - translateY?: number; - - /** - * Transforms the current 2D matrix back to the identity matrix (i.e., without any rotational - * translation scaling effect) - * @since 8 - */ - identity(): Matrix2D; - - /** - * Transform the current 2D matrix into an inverse matrix (that is, the transformation effect - * is the opposite effect of the original) - * @since 8 - */ - invert(): Matrix2D; - - /** - * The matrix is superimposed in right multiplication mode. When the input parameter is empty, - * the matrix is superimposed. - * @param other Matrix to be superimposed - * @since 8 - */ - multiply(other?: Matrix2D): Matrix2D; - - /** - * Adds the rotation effect of the X and Y axes to the current matrix. - * @param rx Rotation effect of the X axis - * @param ry Rotation effect of the Y-axis - * @since 8 - */ - rotate(rx?: number, ry?: number): Matrix2D; - - /** - * Adds the translation effect of the X and Y axes to the current matrix. - * @param tx X-axis translation effect - * @param ty Y-axis translation effect - * @since 8 - */ - translate(tx?: number, ty?: number): Matrix2D; - - /** - * Adds the scaling effect of the X and Y axes to the current matrix. - * @param sx X-axis scaling effect - * @param sy Y-axis scaling effect - * @since 8 - */ - scale(sx?: number, sy?: number): Matrix2D; - - /** - * Constructs a 2D change matrix object. The default value is the unit matrix. - * @since 8 - */ - constructor(); -} +declare type Matrix2D = import('../api/@internal/full/canvaspattern').Matrix2D diff --git a/api/@internal/component/ets/state_management.d.ts b/api/@internal/component/ets/state_management.d.ts index fbbbef9b4e..a6868a7889 100644 --- a/api/@internal/component/ets/state_management.d.ts +++ b/api/@internal/component/ets/state_management.d.ts @@ -192,4 +192,11 @@ declare class LocalStorage { * @since 9 */ clear(): boolean; -} \ No newline at end of file +} + +declare module "StateManagement" { + module "StateManagement" { + // @ts-ignore + export { LocalStorage }; + } +} diff --git a/api/@internal/component/ets/units.d.ts b/api/@internal/component/ets/units.d.ts index 0c5f6819e4..725a91d3e3 100644 --- a/api/@internal/component/ets/units.d.ts +++ b/api/@internal/component/ets/units.d.ts @@ -418,3 +418,10 @@ declare interface BorderOptions { */ style?: EdgeStyles | BorderStyle; } + +declare module "GlobalResource" { + module "GlobalResource" { + // @ts-ignore + export { Resource }; + } +} diff --git a/api/@internal/ets/lifecycle.d.ts b/api/@internal/ets/lifecycle.d.ts index 627b634d44..7a083c22f1 100644 --- a/api/@internal/ets/lifecycle.d.ts +++ b/api/@internal/ets/lifecycle.d.ts @@ -14,7 +14,7 @@ */ import Want from "../../@ohos.application.want"; -import { ResultSet } from "../../data/rdb/resultSet"; +import ResultSet from "../../data/rdb/resultSet"; import { AbilityInfo } from "../../bundle/abilityInfo"; import { DataAbilityResult } from "../../ability/dataAbilityResult"; import { DataAbilityOperation } from "../../ability/dataAbilityOperation"; @@ -25,6 +25,7 @@ import rdb from "../../@ohos.data.rdb"; import rpc from "../../@ohos.rpc"; import resourceManager from "../../@ohos.resourceManager"; import { PacMap } from "../../ability/dataAbilityHelper"; +import { AsyncCallback } from "../../basic"; /** * interface of form lifecycle. diff --git a/api/@internal/global.d.ts b/api/@internal/global.d.ts index 0f1b1586da..8040d61a98 100644 --- a/api/@internal/global.d.ts +++ b/api/@internal/global.d.ts @@ -13,6 +13,10 @@ * limitations under the License. */ +/// + +import { TouchObject, KeyEvent, MouseEvent } from 'SpecialEvent'; + /** * Defines the console info. * @syscap SystemCapability.ArkUI.ArkUI.Full diff --git a/api/@ohos.prompt.d.ts b/api/@ohos.prompt.d.ts index 1236165183..c9a68f29b8 100644 --- a/api/@ohos.prompt.d.ts +++ b/api/@ohos.prompt.d.ts @@ -13,7 +13,10 @@ * limitations under the License. */ +/// + import {AsyncCallback} from './basic'; +import { Resource } from 'GlobalResource'; /** * @syscap SystemCapability.ArkUI.ArkUI.Full diff --git a/api/common/full/canvaspattern.d.ts b/api/common/full/canvaspattern.d.ts new file mode 100644 index 0000000000..8e855021a0 --- /dev/null +++ b/api/common/full/canvaspattern.d.ts @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Describes an opaque object of a template, which is created using the createPattern() method. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +export interface CanvasPattern { + /** + * Adds the matrix transformation effect to the current template. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param transform transformation matrix + * @since 8 + */ + setTransform(transform?: Matrix2D): void; +} + +/** + * 2D transformation matrix, supporting rotation, translation, and scaling of the X-axis and Y-axis + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +export class Matrix2D { + /** + * Horizontal Zoom + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + scaleX?: number; + + /** + * Vertical Tilt + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + rotateY?: number; + + /** + * Horizontal Tilt + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + rotateX?: number; + + /** + * Vertical Zoom + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + scaleY?: number; + + /** + * Horizontal movement + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + translateX?: number; + + /** + * Vertical movement + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + translateY?: number; + + /** + * Transforms the current 2D matrix back to the identity matrix (i.e., without any rotational + * translation scaling effect) + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + identity(): Matrix2D; + + /** + * Transform the current 2D matrix into an inverse matrix (that is, the transformation effect + * is the opposite effect of the original) + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + invert(): Matrix2D; + + /** + * The matrix is superimposed in right multiplication mode. When the input parameter is empty, + * the matrix is superimposed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param other Matrix to be superimposed + * @since 8 + */ + multiply(other?: Matrix2D): Matrix2D; + + /** + * Adds the rotation effect of the X and Y axes to the current matrix. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param rx Rotation effect of the X axis + * @param ry Rotation effect of the Y-axis + * @since 8 + */ + rotate(rx?: number, ry?: number): Matrix2D; + + /** + * Adds the translation effect of the X and Y axes to the current matrix. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param tx X-axis translation effect + * @param ty Y-axis translation effect + * @since 8 + */ + translate(tx?: number, ty?: number): Matrix2D; + + /** + * Adds the scaling effect of the X and Y axes to the current matrix. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param sx X-axis scaling effect + * @param sy Y-axis scaling effect + * @since 8 + */ + scale(sx?: number, sy?: number): Matrix2D; + + /** + * Constructs a 2D change matrix object. The default value is the unit matrix. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + constructor(); +} diff --git a/api/common/full/dom.d.ts b/api/common/full/dom.d.ts index 2efda42009..6d9ea5aeea 100644 --- a/api/common/full/dom.d.ts +++ b/api/common/full/dom.d.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -export { Element } from './viewmodel'; +import { Element } from './viewmodel'; /** * global dom diff --git a/api/common/full/global.d.ts b/api/common/full/global.d.ts index a3729cd8f2..8162470099 100644 --- a/api/common/full/global.d.ts +++ b/api/common/full/global.d.ts @@ -13,6 +13,8 @@ * limitations under the License. */ +import { OffscreenCanvasRenderingContext2D } from './viewmodel'; + /** * Sets the interval for repeatedly calling a function. * @syscap SystemCapability.ArkUI.ArkUI.Full diff --git a/api/common/full/viewmodel.d.ts b/api/common/full/viewmodel.d.ts index 91e57e8a96..06b578c7fd 100644 --- a/api/common/full/viewmodel.d.ts +++ b/api/common/full/viewmodel.d.ts @@ -13,10 +13,11 @@ * limitations under the License. */ -import { Image, ImageData } from "./global"; +import { Image, ImageData, ImageBitmap } from "./global"; import { WebGLContextAttributes, WebGLRenderingContext } from "../../webgl/webgl"; import { WebGL2RenderingContext } from "../../webgl/webgl2"; -import { PixelMap } from "../../@ohos.multimedia.image"; +import image from "../../@ohos.multimedia.image"; +import { CanvasPattern } from './canvaspattern'; /** * Defines the foucs param. @@ -1161,7 +1162,7 @@ export interface OffscreenCanvasRenderingContext2D { * @param dh Image The height drawn on the target canvas. * @since 9 */ - drawImage(image: PixelMap, dx: number, dy: number, dw: number, dh: number): void; + drawImage(image: image.PixelMap, dx: number, dy: number, dw: number, dh: number): void; /** * Draw an Image object. @@ -1177,7 +1178,7 @@ export interface OffscreenCanvasRenderingContext2D { * @since 9 */ drawImage( - image: PixelMap, + image: image.PixelMap, sx: number, sy: number, sw: number, @@ -1344,7 +1345,7 @@ export interface OffscreenCanvasRenderingContext2D { * @returns getPixelMap An getPixelMap object that contains the rectangular ImageData given by the canvas. * @since 9 */ - getPixelMap(sx: number, sy: number, sw: number, sh: number): PixelMap + getPixelMap(sx: number, sy: number, sw: number, sh: number): image.PixelMap /** * Draws the specified ImageData object to the canvas. @@ -2049,7 +2050,7 @@ export interface CanvasRenderingContext2D { * @param dHeight Height of the drawing area. * @since 9 */ - drawImage(image: PixelMap, dx: number, dy: number, dWidth: number, dHeight: number): void; + drawImage(image: image.PixelMap, dx: number, dy: number, dWidth: number, dHeight: number): void; /** * Draws an image. @@ -2065,7 +2066,7 @@ export interface CanvasRenderingContext2D { * @since 9 */ drawImage( - image: PixelMap, + image: image.PixelMap, sx: number, sy: number, sWidth: number, @@ -2124,7 +2125,7 @@ export interface CanvasRenderingContext2D { * @returns getPixelMap An getPixelMap object that contains the rectangular ImageData given by the canvas. * @since 9 */ - getPixelMap(sx: number, sy: number, sw: number, sh: number): PixelMap + getPixelMap(sx: number, sy: number, sw: number, sh: number): image.PixelMap /** * Puts the ImageData onto a rectangular area on the canvas. -- Gitee From 4cfead18af5097d5729a4c0639bff0a1a3fcfb34 Mon Sep 17 00:00:00 2001 From: yqhan Date: Tue, 30 Aug 2022 19:32:12 +0800 Subject: [PATCH 46/48] Modify the @ohos.worker.d.ts problems issue: https://gitee.com/openharmony/interface_sdk-js/issues/I5OS1L Signed-off-by: yqhan --- api/@ohos.worker.d.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/api/@ohos.worker.d.ts b/api/@ohos.worker.d.ts index c87b14f383..fffe7241f1 100644 --- a/api/@ohos.worker.d.ts +++ b/api/@ohos.worker.d.ts @@ -241,7 +241,7 @@ declare interface WorkerGlobalScope extends EventTarget { * @since 7 * @syscap SystemCapability.Utils.Lang */ - onmessage?: (this: DedicatedWorkerGlobalScope, ev: MessageEvent) => void; + onmessage?: (this: DedicatedWorkerGlobalScope, ev: MessageEvent) => void; /** * The onmessage attribute of parentPort specifies the event handler @@ -251,7 +251,7 @@ declare interface WorkerGlobalScope extends EventTarget { * @since 7 * @syscap SystemCapability.Utils.Lang */ - onmessageerror?: (this: DedicatedWorkerGlobalScope, ev: MessageEvent) => void; + onmessageerror?: (this: DedicatedWorkerGlobalScope, ev: MessageEvent) => void; /** * Close the worker thread to stop the worker from receiving messages @@ -265,10 +265,20 @@ declare interface WorkerGlobalScope extends EventTarget { * @param messageObject Data to be sent to the worker * @param transfer array cannot contain null. * @since 7 + * @deprecated since 9 * @syscap SystemCapability.Utils.Lang */ postMessage(messageObject: Object, transfer: Transferable[]): void; postMessage(messageObject: Object, options?: PostMessageOptions): void; + + /** + * Send a message to host thread from the worker + * @param messageObject Data to be sent to the worker + * @param transfer array cannot contain null. + * @since 9 + * @syscap SystemCapability.Utils.Lang + */ + postMessage(messageObject: Object, transfer: ArrayBuffer[]): void; } /** @@ -277,7 +287,7 @@ declare interface WorkerGlobalScope extends EventTarget { * @syscap SystemCapability.Utils.Lang */ declare namespace worker { - class Worker extends EventTarget { + class Worker implements EventTarget { /** * Creates a worker instance * @param scriptURL URL of the script to be executed by the worker @@ -314,7 +324,7 @@ declare namespace worker { * @since 7 * @syscap SystemCapability.Utils.Lang */ - onmessage?: (event: MessageEvent) => void; + onmessage?: (event: MessageEvent) => void; /** * The onmessage attribute of the worker specifies the event handler @@ -323,7 +333,7 @@ declare namespace worker { * @since 7 * @syscap SystemCapability.Utils.Lang */ - onmessageerror?: (event: MessageEvent) => void; + onmessageerror?: (event: MessageEvent) => void; /** * Sends a message to the worker thread. -- Gitee From 06fc34bc1bf1ab0b786b27b8f151becbf84777a5 Mon Sep 17 00:00:00 2001 From: zhao_zhen_zhou Date: Tue, 30 Aug 2022 05:02:29 -0700 Subject: [PATCH 47/48] =?UTF-8?q?HUKS=E4=BF=AE=E6=94=B9=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=A3=B0=E6=98=8E=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhao_zhen_zhou --- api/@ohos.security.huks.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.security.huks.d.ts b/api/@ohos.security.huks.d.ts index be039ffb05..8209c1d539 100755 --- a/api/@ohos.security.huks.d.ts +++ b/api/@ohos.security.huks.d.ts @@ -505,7 +505,7 @@ declare namespace huks { * @since 8 * @syscap SystemCapability.Security.Huks */ - declare enum HuksTagType { + export enum HuksTagType { HUKS_TAG_TYPE_INVALID = 0 << 28, HUKS_TAG_TYPE_INT = 1 << 28, HUKS_TAG_TYPE_UINT = 2 << 28, -- Gitee From f99d1ed3c3721b389c3c8b725a5f2c862c89188b Mon Sep 17 00:00:00 2001 From: magekkkk Date: Wed, 31 Aug 2022 19:03:05 +0800 Subject: [PATCH 48/48] fixed f38f0d9 from https://gitee.com/magekkkk/interface_sdk-js/pulls/2608 pick changes to monthly Signed-off-by: magekkkk --- api/@ohos.multimedia.audio.d.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index bdb1d01c64..8a0203b666 100644 --- a/api/@ohos.multimedia.audio.d.ts +++ b/api/@ohos.multimedia.audio.d.ts @@ -547,12 +547,14 @@ declare namespace audio { * Enumerates the focus type. * @since 9 * @syscap SystemCapability.Multimedia.Audio.Core + * @systemapi */ enum FocusType { /** * Recording type. * @since 9 * @syscap SystemCapability.Multimedia.Audio.Core + * @systemapi */ FOCUS_TYPE_RECORDING = 0, } @@ -1898,7 +1900,7 @@ declare namespace audio { * @since 8 * @syscap SystemCapability.Multimedia.Audio.Renderer */ - on(type: "markReach", frame: number, callback: (position: number) => {}): void; + on(type: "markReach", frame: number, callback: Callback): void; /** * Unsubscribes from mark reached events. * @since 8 @@ -1913,7 +1915,7 @@ declare namespace audio { * @since 8 * @syscap SystemCapability.Multimedia.Audio.Renderer */ - on(type: "periodReach", frame: number, callback: (position: number) => {}): void; + on(type: "periodReach", frame: number, callback: Callback): void; /** * Unsubscribes from period reached events. * @since 8 @@ -2144,7 +2146,7 @@ declare namespace audio { * @since 8 * @syscap SystemCapability.Multimedia.Audio.Capturer */ - on(type: "markReach", frame: number, callback: (position: number) => {}): void; + on(type: "markReach", frame: number, callback: Callback): void; /** * Unsubscribes from the mark reached events. * @since 8 @@ -2160,7 +2162,7 @@ declare namespace audio { * @since 8 * @syscap SystemCapability.Multimedia.Audio.Capturer */ - on(type: "periodReach", frame: number, callback: (position: number) => {}): void; + on(type: "periodReach", frame: number, callback: Callback): void; /** * Unsubscribes from period reached events. * @since 8 -- Gitee