diff --git a/BUILD.gn b/BUILD.gn index aee10d9f6cb57e40314e83f41009df624c44aa69..ee627bc4b29030189a9b257423810cf6fdcf43f3 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") @@ -21,6 +22,8 @@ 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}}" ] module_source_dir = target_out_dir + "/$target_name" @@ -122,6 +125,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 = "" @@ -134,21 +147,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), @@ -172,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", @@ -192,6 +213,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 = "" diff --git a/api/@internal/component/ets/canvas.d.ts b/api/@internal/component/ets/canvas.d.ts index 45f68e8070149ba2fab45690d3b90d425155df87..7e320334ef14f50a0cff300a8e35febbd5fd721a 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 70402c47b1934d2fc6dad01a64503e2adeb7c16d..04c09db4c54eebeb64c875faa0881da492351289 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/grid_col.d.ts b/api/@internal/component/ets/grid_col.d.ts index 82f21622927f9445fb9526628e914417f6813659..cb493ec093033e36f73a172fd6722e372a6a935e 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 8ce36fd3622e30022efff663ac8952acb36302b3..7418da6909a7ed6bec9c25fa2efac4f1b1d16f11 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. @@ -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 diff --git a/api/@internal/component/ets/matrix2d.d.ts b/api/@internal/component/ets/matrix2d.d.ts index 982eb954c091e3ee5a77c3efa8e48000d43108f3..67ffd751c8a678a1e2e5ba522841305c6d1944d3 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 fbbbef9b4ecd603f68ed049492c6aa777564f3a1..a6868a7889674c2a8c455ddda6a9361b9cccaa64 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 0c5f6819e4165454fa46cbc07ab9a627239a239a..725a91d3e397dcde744bea94ec8d5af613e1eeac 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/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index f2b0c93a3ab1832e567521d3739245d1836f51f5..ffb8faf6bca9a2372b00e93545aee89d4fcc88b4 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. diff --git a/api/@internal/ets/index.d.ts b/api/@internal/ets/index.d.ts index 4a9e2b6b33809e76eb91f12c8ba4779d2bb51a1b..6199f456664bd425babb063bc9eabf0c99663b13 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/@internal/ets/lifecycle.d.ts b/api/@internal/ets/lifecycle.d.ts index 627b634d449d6a8dc3ab08d1c637050c07a78cd3..7a083c22f18e7ddf0513c9160702d579f242e0c6 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 0f1b1586da3b761202d309dd45218d2249e9609b..8040d61a9866e0ba3f9787ae224eb5cd1a140096 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.account.appAccount.d.ts b/api/@ohos.account.appAccount.d.ts index 652bdda1fc2cd4f868fd4233aea773d4963d5f33..89e9e7b32b80642a74519add5cb696dc5873a6dc 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 25f559d21904f303f76a84baf05d134b2aa1e30d..db2cc594f449b8d91199c96df4102ca7c0b86d91 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. diff --git a/api/@ohos.application.Ability.d.ts b/api/@ohos.application.Ability.d.ts index 8a89bbc773dd031738df5eb734d28273a913024c..4642593dcdb25587737924c8f6627cf53612f86e 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. diff --git a/api/@ohos.application.AccessibilityExtensionAbility.d.ts b/api/@ohos.application.AccessibilityExtensionAbility.d.ts index 12add9c4facf542b2564913ad09bc88ec37962ca..4dc895a4032a8fb338f35f9da4ed8ea5a315c684 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; } /** diff --git a/api/@ohos.application.abilityManager.d.ts b/api/@ohos.application.abilityManager.d.ts index 1546b095a45657e84908068ad75eec0d05927704..a4f2b287c04b2be7093ef0584bfc3057694e640b 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/@ohos.application.appManager.d.ts b/api/@ohos.application.appManager.d.ts index a116e01990c216652bfb601333d4d062b628654b..2d5c500c2a320e76db8d03366229abc36eb837e3 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/@ohos.bluetooth.d.ts b/api/@ohos.bluetooth.d.ts index 54bdf747c167a82593973ca38841e2a56821dc7d..a02fe6c08fdea067fcf277d72860ee526ded6725 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; diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index 0b2eff47d641a924da0e2dcaff70dcd78bb5046d..c27071385fc983bd4d8d1e4909538f0ab5e0b3c8 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. diff --git a/api/@ohos.effectKit.d.ts b/api/@ohos.effectKit.d.ts index 3164c81f25eaf2dbc74468ec04119524e0653e97..78ffb0c148c94351fdceebeff7ce3583c8e7371d 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 diff --git a/api/@ohos.fileManager.d.ts b/api/@ohos.fileManager.d.ts index e9676f7e977203de6f3d2ac022a862e1b3355b9a..61d7d6c4d4b2605a3e5877cbea3eec10fd9861de 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 }; diff --git a/api/@ohos.geolocation.d.ts b/api/@ohos.geolocation.d.ts index 56c14d6488e668727d08b12e6eb7553e4ac752f8..97e12ddc0a5ed61363ea1b497a3e30a66d1f1902 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, @@ -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, diff --git a/api/@ohos.hiTraceChain.d.ts b/api/@ohos.hiTraceChain.d.ts index 1fd2fd00265c6ddde08b4fec3c4f2704d30a14db..30d805b3722e70615b6c334b1dac219e46fe969e 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 diff --git a/api/@ohos.inputmethod.d.ts b/api/@ohos.inputmethod.d.ts index 7a47e7b3c78875c1cddc6f816403de0c477d8554..0dbd6256dc16364303a7c284f7a57a8e45c7864e 100644 --- a/api/@ohos.inputmethod.d.ts +++ b/api/@ohos.inputmethod.d.ts @@ -59,43 +59,10 @@ 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 */ 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 51f2366f931b501d6349d5f4cc04a4f883efb97f..82e19e796c967b3321e0de9287849d0795fbf8d4 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; @@ -113,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 { @@ -164,83 +135,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; diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index bdb1d01c644d59a9d8f6d8792435445d696e70bb..8a0203b6662945755cc6243add6653ec75f90340 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 diff --git a/api/@ohos.multimedia.image.d.ts b/api/@ohos.multimedia.image.d.ts index 682810e42a1e44d52631ad591eff152b5944fbd4..6564ea82b2891e761b2a924d57a0166e6420497d 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; diff --git a/api/@ohos.multimedia.mediaLibrary.d.ts b/api/@ohos.multimedia.mediaLibrary.d.ts index f3de0ad29ef085e340cc5ca828c39d9ef7c42ae8..cdd692b8fe8db0165fa1f2c461d4ad4af44d8189 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'; /** diff --git a/api/@ohos.process.d.ts b/api/@ohos.process.d.ts index 02b7e123eadc87d0134c66a73260165ee024263e..d2d4243470ff410cad906dfa87ab83743c43071d 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.prompt.d.ts b/api/@ohos.prompt.d.ts index 123616518373e6db2cd6203e1bee08ced2b8d50a..c9a68f29b841bc3b9b62cb7c1a2e6e742421c801 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/@ohos.rpc.d.ts b/api/@ohos.rpc.d.ts index 2f2119fc3a54bb9dacae874dfda3f8afc01f8d7e..aef94e9497f2c9d588248207b060a1f913dbfbff 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. * @@ -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. + * Sends a {@link MessageParcel} message to the peer process asynchronously. * - *

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 + *

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. @@ -957,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 16 * @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. @@ -986,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. @@ -1026,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. * @@ -1070,6 +1101,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 +1131,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. @@ -1154,40 +1204,55 @@ 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. + * + * @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. @@ -1226,6 +1291,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 +1322,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. @@ -1419,27 +1503,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. diff --git a/api/@ohos.runninglock.d.ts b/api/@ohos.runninglock.d.ts index 9f9c4b49790d90158e8bf55ac44cdb792e13b883..d9365fbcf38354c149b12a47f207b70fa82fed55 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 diff --git a/api/@ohos.security.huks.d.ts b/api/@ohos.security.huks.d.ts index be039ffb0538317ed3a389482631ab95e7ffcb8b..8209c1d539096a136397d5f73f0661df82f563e7 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, diff --git a/api/@ohos.sensor.d.ts b/api/@ohos.sensor.d.ts index c3d3c65bfef44061f12d28369b9e8b34a4b3bae7..696c80a97723fcd934a340a5a4982530876952bb 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.systemTime.d.ts b/api/@ohos.systemTime.d.ts index c45ec6977303f95f122b92ff66d84745ea0b97b4..ef8856074dcafb4a0be901e19ee73cccc5492e30 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; /** diff --git a/api/@ohos.telephony.call.d.ts b/api/@ohos.telephony.call.d.ts index ea018eefd1f7c8cf596c419a53266c809ad5f8c9..2a48ba7418b654723231e5e6e2f6c91b4b92c33c 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 diff --git a/api/@ohos.telephony.observer.d.ts b/api/@ohos.telephony.observer.d.ts index 5ea7c6a3250c18ec1f8c0b4340252e424a1e087c..7e0ac5b3e9b55d442749d0f41844b5f8d0dfbca3 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; diff --git a/api/@ohos.uitest.d.ts b/api/@ohos.uitest.d.ts index 237ac9e7896e5482c8579cf74b494f94edfe236d..9cf5af81d7a878a60bc122ff0e5e7044ef0cffef 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}; diff --git a/api/@ohos.usb.d.ts b/api/@ohos.usb.d.ts index 4cf2b5f84f1c469566642e92cc665f2c6bac7343..00588468d50fb21fe16de0c73e33a267a6d3f450 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 { diff --git a/api/@ohos.util.d.ts b/api/@ohos.util.d.ts index f3f42ea249fa30585f6ce7c5218294bd8d5efef8..18ccd2420ded4c152a5aa53543c8b9d8fa03a14f 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) => @@ -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 diff --git a/api/@ohos.vibrator.d.ts b/api/@ohos.vibrator.d.ts index 7fb0183ac9ddd79886c7b0b2016ac523183c1e07..e8f1bece16b6cd6c15fc896440b372e2a19a900d 100755 --- a/api/@ohos.vibrator.d.ts +++ b/api/@ohos.vibrator.d.ts @@ -22,6 +22,13 @@ import { AsyncCallback } from './basic'; * @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 { /** * The trigger motor vibrates for a specified length of time. diff --git a/api/@ohos.volumeManager.d.ts b/api/@ohos.volumeManager.d.ts index 42a714605f633ae5f0881dd647e0797f7c77efc9..416ed23c03b9a8d1248a43fbffbc42acb571219d 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; diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index aded7ac14a9e909f31d5f3c4cb82881c1d8b7c33..2b56a8cc4c2a51e13ddd4daa41ecccc34074aba0 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 diff --git a/api/@ohos.worker.d.ts b/api/@ohos.worker.d.ts index c87b14f383b17ef0f10724e4f2ff13d1f6a037e3..fffe7241f19c8401af8ed3339aae376fb07a5bbf 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. diff --git a/api/@system.router.d.ts b/api/@system.router.d.ts index 27f7c78351f5369bf094c83a97821199d4d6534c..0867df975c4ec5ef7654ac8ddd35db46df7881be 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 { diff --git a/api/ability/dataAbilityHelper.d.ts b/api/ability/dataAbilityHelper.d.ts index bb5cba6122b0bc0499773769271ff1447a11e3cc..eb5e181bdfbb1b4262225a433ddb7ad9c9913d06 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 27b8c3ab1ce32255805bc7fc9504bc3703a0f2b4..38a246f52b1e56dacb0bc116c07bff4c1dc72c44 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/ApplicationStateObserver.d.ts b/api/application/ApplicationStateObserver.d.ts index 96341bd8a353877a4c6ea313e527c8ab4b4ec8b6..320238f2cadf66d4561a10c75860925bb53098fd 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/ExtensionContext.d.ts b/api/application/ExtensionContext.d.ts index c265080057b90ac12fea7b381c2f739a90cfa5af..3e20d41b8e4306a128b5142a89b509a5067cdcb1 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/ProcessData.d.ts b/api/application/ProcessData.d.ts index 8be5e311efff552f8eb946333d61bd2c7c7f7f33..e96fe473aeb76300f0dc17f7c8fed921f104fadf 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 3e1e68917964413180805909c68a715989133b51..434f35369b155d7165204256d95cd2ce004f5a31 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 0000000000000000000000000000000000000000..91bff0ab854ea25458d75df9438c6e6394a965d6 --- /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 diff --git a/api/application/ServiceExtensionContext.d.ts b/api/application/ServiceExtensionContext.d.ts index ee956cba6d1ba2249a270a3d942be694188814e3..87bfcc90b70990855319c1b5a55a34e09cfbaad7 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 diff --git a/api/application/abilityDelegator.d.ts b/api/application/abilityDelegator.d.ts index 156c222b32410b171b7085f14a30e416f77cfc68..f45d15cf070839fff12f8235e0987fd39763fa57 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; diff --git a/api/bundle/bundleStatusCallback.d.ts b/api/bundle/bundleStatusCallback.d.ts index d42bbf232980d8b3113e98a8b25181bd4ffc9261..b5c4d368583d4bffdefc1f34d8fe4d41654cdf0c 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 diff --git a/api/common/full/canvaspattern.d.ts b/api/common/full/canvaspattern.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8e855021a06e654c3d09a093a99ac1a014309f0e --- /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 2efda420093a152bc836c990eb5dfb3f87f05c96..6d9ea5aeeae658167606152d6a6901a1c23cbc0f 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 a3729cd8f2ab2156eca1ba9650ab72cff953e59d..8162470099c76dda0bba3958c679a15bdfa001b3 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 91e57e8a969a13fa6c65ddc69ff6780a12184398..06b578c7fd23c3d18b30769cf2e4ccc94282f23d 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. diff --git a/api/notification/notificationContent.d.ts b/api/notification/notificationContent.d.ts index b50b426a0fef22a2c9ff7af9607d85e7245ac8d0..055523bdca82131d55cae1bc0860b87820303f6a 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. diff --git a/api/webgl/webgl2.d.ts b/api/webgl/webgl2.d.ts index 60347494bba2eb08a6d7f818bd9a3b0fcc45200a..724191f7b25938d6cc2559f1eabc320b8acad4e3 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 diff --git a/build-tools/delete_systemapi_plugin.js b/build-tools/delete_systemapi_plugin.js index fcf3223a4f6ff5f7dfa3e01d31cb178d5a61c108..a85e5a1b1afdfbc74d0a7b6bd7c767a024a5500a 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); }