Merge branch 'master' of gitee.com:openharmony/interface_sdk-js into 1117

This commit is contained in:
li-yaoyao777 2023-11-20 09:55:44 +08:00
commit e3746053be
32 changed files with 2038 additions and 37 deletions

View File

@ -211,6 +211,16 @@ declare class ColumnAttribute extends CommonMethod<ColumnAttribute> {
* @form
*/
justifyContent(value: FlexAlign): ColumnAttribute;
/**
* Defines the PointLight
*
* @param { PointLightStyle } value - The point light style.
* @returns { ColumnAttribute } The attribute of the column.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
pointLight(value: PointLightStyle): ColumnAttribute;
}
/**

View File

@ -9699,6 +9699,17 @@ declare class CommonMethod<T> {
* @since 11
*/
attributeModifier(modifier: AttributeModifier<T>): T;
/**
* When a gesture bound to this component will be accepted, a user-defined callback is triggered to get the result
*
* @param { function } callback - A callback instance used when a gesture bound to this component will be accepted.
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): T;
}
/**
@ -11147,4 +11158,92 @@ declare interface EdgeEffectOptions {
* @since 11
*/
alwaysEnabled: boolean;
}
}
/**
* PointLightStyle info
*
* @interface PointLightStyle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
declare interface PointLightStyle {
/**
* Defines the PointLight light intensity and position.
*
* @type { ?LightSource }
* @default undefined
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
lightSource?: LightSource;
/**
* Defines the PointLight illuminated type.
*
* @type { ?IlluminateType }
* @default IlluminateType.NONE
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
illuminated?: IlluminateType;
/**
* Defines the PointLight bloom.
*
* @type { ?number }
* @default 0
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
bloom?: number;
}
/**
* LightSource info
*
* @interface LightSource
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
declare interface LightSource {
/**
* Defines the PointLight light positionX.
*
* @type { Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
positionX: Dimension;
/**
* Defines the PointLight light positionX.
*
* @type { Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
positionY: Dimension;
/**
* Defines the PointLight light positionX.
*
* @type { Dimension }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
positionZ: Dimension;
/**
* Defines the PointLight light intensity.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
intensity: number;
}

View File

@ -6042,4 +6042,63 @@ declare module 'CommonEnums' {
// @ts-ignore
export type { Color, FontStyle, Nullable };
}
}
/**
* Enum of Illuminated type
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
declare enum IlluminatedType {
/**
* Component is not illuminated.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
NONE = 0,
/**
* Border is illuminated.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
BORDER = 1,
/**
* Content is illuminated.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
CONTENT = 2,
/**
* Border and Content is illuminated.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
BORDER_CONTENT = 3,
/**
* Border is illuminated, and the border have a bloom effect.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
BLOOM_BORDER = 4,
/**
* Border and Content is illuminated, and the border have a bloom effect.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
BLOOM_BORDER_CONTENT = 5
}

View File

@ -339,7 +339,18 @@ interface FlexInterface {
* @since 11
* @form
*/
declare class FlexAttribute extends CommonMethod<FlexAttribute> {}
declare class FlexAttribute extends CommonMethod<FlexAttribute> {
/**
* Defines the PointLight
*
* @param { PointLightStyle } value - The point light style.
* @returns { FlexAttribute } The attribute of the flex.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
pointLight(value: PointLightStyle): FlexAttribute;
}
/**
* Defines Flex Component.

View File

@ -66,6 +66,16 @@ declare enum FormDimension {
* @since 9
*/
Dimension_2_1,
/**
* 1 x 1 cards
* The default value is 6
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
DIMENSION_1_1 = 6,
}
/**

View File

@ -336,6 +336,158 @@ declare enum GestureMask {
IgnoreInternal,
}
/**
* Creating an Object
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
declare enum GestureJudgeResult {
/**
* The system gesture determination is not affected.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
CONTINUE = 0,
/**
* The user-defined gesture determination result of the current component is fail.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
REJECT = 1,
}
declare namespace GestureControl {
/**
* Creating an Object
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
enum GestureType {
/**
* TapGesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
TAP_GESTURE = 0,
/**
* LongPressGesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
LONG_PRESS_GESTURE = 1,
/**
* PanGesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
PAN_GESTURE = 2,
/**
* PinchGesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
PINCH_GESTURE = 3,
/**
* SwipeGesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
SWIPE_GESTURE = 4,
/**
* RotationGesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
ROTATION_GESTURE = 5,
/**
* Drag.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
DRAG = 6,
/**
* Click.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
CLICK = 7,
}
}
/**
* The description of gesture information.
*
* @interface GestureInfo
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
declare interface GestureInfo {
/**
* The tag of gesture.
*
* @type { ?string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
tag?: string;
/**
* The type of gesture.
*
* @type { GestureControl.GestureType }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
type: GestureControl.GestureType;
/**
* The flag whether it is a system gesture.
*
* @type { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
isSystemGesture: boolean;
}
/**
* Type of the finger information.
*
@ -460,6 +612,218 @@ declare type GestureType =
| RotationGestureInterface
| GestureGroupInterface;
/**
* Defines the gesture base event.
*
* @extends BaseEvent
* @interface BaseGestureEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
interface BaseGestureEvent extends BaseEvent {
/**
* All finger information.
*
* @type { FingerInfo[] }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
fingerList: FingerInfo[];
}
/**
* Defines event info for tap gesture.
*
* @extends BaseGestureEvent
* @interface TapGestureEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
interface TapGestureEvent extends BaseGestureEvent {
}
/**
* Defines event info for long press gesture.
*
* @extends BaseGestureEvent
* @interface LongPressGestureEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
interface LongPressGestureEvent extends BaseGestureEvent {
/**
* Indicates whether an event is triggered repeatedly.
*
* @type { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
repeat: boolean;
}
/**
* Defines event info for pan gesture.
*
* @extends BaseGestureEvent
* @interface PanGestureEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
interface PanGestureEvent extends BaseGestureEvent {
/**
* Gesture event offset X.
* The unit is vp.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
offsetX: number;
/**
* Gesture event offset Y.
* The unit is vp.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
offsetY: number;
/**
* X-axis velocity of the gesture.
* @type {number}
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
velocityX: number;
/**
* Y-axis velocity of the gesture.
* @type {number}
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
velocityY: number;
/**
* velocity of the gesture.
* @type {number}
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
velocity: number;
}
/**
* Defines event info for pinch gesture.
*
* @extends BaseGestureEvent
* @interface PinchGestureEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
interface PinchGestureEvent extends BaseGestureEvent {
/**
* Scaling ratio.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
scale: number;
/**
* X-axis coordinate of the kneading center point.
* The unit is vp.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
pinchCenterX: number;
/**
* Y-axis coordinate of the kneading center point.
* The unit is vp.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
pinchCenterY: number;
}
/**
* Defines event info for rotation gesture.
*
* @extends BaseGestureEvent
* @interface RotationGestureEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
interface RotationGestureEvent extends BaseGestureEvent {
/**
* Gesture event direction angle.
* The unit is deg.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
angle: number;
}
/**
* Defines event info for swipe gesture.
*
* @extends BaseGestureEvent
* @interface SwipeGestureEvent
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
interface SwipeGestureEvent extends BaseGestureEvent {
/**
* Gesture event direction angle.
* The unit is deg.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
angle: number;
/**
* Gesture event slide speed.
* The unit is vp.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
speed: number;
}
/**
* Defines event info for gesture.
*
@ -687,6 +1051,27 @@ interface GestureEvent extends BaseEvent {
velocity: number;
}
/**
* Defines Gesture interface.
*
* @interface GestureInterface
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
interface GestureInterface<T> {
/**
* Set gesture's tag.
*
* @param { string } tag
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
tag(tag: string): T;
}
/**
* Defines TapGesture interface.
*
@ -702,7 +1087,16 @@ interface GestureEvent extends BaseEvent {
* @crossplatform
* @since 10
*/
interface TapGestureInterface {
/**
* Defines TapGesture interface extends GestureInterface<TapGestureInterface>.
*
* @extends GestureInterface<TapGestureInterface>
* @interface TapGestureInterface
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
interface TapGestureInterface extends GestureInterface<TapGestureInterface> {
/**
* Set the value.
* count:Number of consecutive clicks recognized. If the value is less than 1, the default value is used.
@ -761,7 +1155,16 @@ interface TapGestureInterface {
* @crossplatform
* @since 10
*/
interface LongPressGestureInterface {
/**
* Defines LongPressGesture interface extends GestureInterface<LongPressGestureInterface>.
*
* @extends GestureInterface<LongPressGestureInterface>
* @interface LongPressGestureInterface
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
interface LongPressGestureInterface extends GestureInterface<LongPressGestureInterface> {
/**
* Set the value.
* fingers: Indicates the hand index that triggers the long press.
@ -943,7 +1346,16 @@ declare class PanGestureOptions {
* @crossplatform
* @since 10
*/
interface PanGestureInterface {
/**
* Defines PanGesture interface extends GestureInterface<PanGestureInterface>.
*
* @extends GestureInterface<PanGestureInterface>
* @interface PanGestureInterface
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
interface PanGestureInterface extends GestureInterface<PanGestureInterface> {
/**
* Set the value.
*
@ -1055,7 +1467,16 @@ interface PanGestureInterface {
* @crossplatform
* @since 10
*/
interface SwipeGestureInterface {
/**
* Defines SwipeGesture interface extends GestureInterface<SwipeGestureInterface>.
*
* @extends GestureInterface<SwipeGestureInterface>
* @interface SwipeGestureInterface
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
interface SwipeGestureInterface extends GestureInterface<SwipeGestureInterface> {
/**
* Set the value.
*
@ -1110,7 +1531,16 @@ interface SwipeGestureInterface {
* @crossplatform
* @since 10
*/
interface PinchGestureInterface {
/**
* Defines PinchGesture interface extends GestureInterface<PinchGestureInterface>.
*
* @extends GestureInterface<PinchGestureInterface>
* @interface PinchGestureInterface
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
interface PinchGestureInterface extends GestureInterface<PinchGestureInterface> {
/**
* Set the value.
*
@ -1222,7 +1652,16 @@ interface PinchGestureInterface {
* @crossplatform
* @since 10
*/
interface RotationGestureInterface {
/**
* Defines RotationGesture interface extends GestureInterface<RotationGestureInterface>.
*
* @extends GestureInterface<RotationGestureInterface>
* @interface RotationGestureInterface
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
interface RotationGestureInterface extends GestureInterface<RotationGestureInterface> {
/**
* Set the value.
*

View File

@ -203,6 +203,16 @@ declare class RowAttribute extends CommonMethod<RowAttribute> {
* @form
*/
justifyContent(value: FlexAlign): RowAttribute;
/**
* Defines the PointLight
*
* @param { PointLightStyle } value - The point light style.
* @returns { RowAttribute } The attribute of the row.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 11
*/
pointLight(value: PointLightStyle): RowAttribute;
}
/**

View File

@ -1242,6 +1242,17 @@ declare class TextInputAttribute extends CommonMethod<TextInputAttribute> {
*/
showCounter(value: boolean): TextInputAttribute;
/**
* Set the cancel button style
*
* @param { object } value - indicates the style of the cancel button.
* @returns { TextInputAttribute } returns the instance of the TextInputAttribute.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
cancelButton(value: { style?: CancelButtonStyle, icon?: IconOptions }): TextInputAttribute;
/**
* Sets selection when on focus.
*

View File

@ -44,7 +44,15 @@ declare interface TimePickerResult {
* @crossplatform
* @since 10
*/
hour?: number;
/**
* Hour portion of the selected time.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
hour: number;
/**
* Application minute
@ -61,7 +69,50 @@ declare interface TimePickerResult {
* @crossplatform
* @since 10
*/
minute?: number;
/**
* Minute portion of the selected time.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
minute: number;
/**
* Second portion of the selected time.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
second: number;
}
/**
* Type of the TimePicker that need to be displayed.
* @enum {number}
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
declare enum TimePickerFormat {
/**
* Hour and minute.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
HOUR_MINUTE,
/**
* Hour and minute and second
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
HOUR_MINUTE_SECOND,
}
/**
@ -96,6 +147,17 @@ declare interface TimePickerOptions {
* @since 10
*/
selected?: Date;
/**
* Specifies the format of the TimePicker that need to be displayed.
*
* @type { ?TimePickerFormat }
* @default HOUR_MINUTE
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
format?: TimePickerFormat;
}
/**
@ -169,6 +231,16 @@ declare class TimePickerAttribute extends CommonMethod<TimePickerAttribute> {
*/
useMilitaryTime(value: boolean): TimePickerAttribute;
/**
* Sets whether to enable the wheel mode.
* @param { boolean } value - indicates whether to enable the wheel mode.
* @returns { TimePickerAttribute } the attribute of the time picker
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
loop(value: boolean): TimePickerAttribute;
/**
* Sets the text style of disappearing items
*

View File

@ -0,0 +1,119 @@
/*
* Copyright (c) 2023 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.
*/
import ExtensionAbility from './@ohos.app.ability.ExtensionAbility';
import type UIExtensionContentSession from './@ohos.app.ability.UIExtensionContentSession';
import type AutoFillExtensionContext from './application/AutoFillExtensionContext';
import type { FillRequest, SaveRequest, FillRequestCallback, SaveRequestCallback } from './application/AutoFillRequest';
/**
* The class of auto fill extension ability.
*
* @extends ExtensionAbility
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export default class AutoFillExtensionAbility extends ExtensionAbility {
/**
* Indicates configuration information about an auto fill extension ability context.
*
* @type { AutoFillExtensionContext }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
context: AutoFillExtensionContext;
/**
* Called back when an auto fill extension is started for initialization.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
onCreate(): void;
/**
* Called back when a fill request is coming.
*
* @param { UIExtensionContentSession } session - Indicates the session of the UI extension page.
* @param { FillRequest } request - Indicates the fill request.
* @param { FillRequestCallback } callback - Indicates the fill request callback.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
onFillRequest(session: UIExtensionContentSession, request: FillRequest, callback: FillRequestCallback): void;
/**
* Called back when a save request is coming.
*
* @param { UIExtensionContentSession } session - Indicates the session of the UI extension page.
* @param { SaveRequest } request - Indicates the fill request.
* @param { SaveRequestCallback } callback - Indicates the fill request callback.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
onSaveRequest(session: UIExtensionContentSession, request: SaveRequest, callback: SaveRequestCallback): void;
/**
* Called back when an auto fill extension session is destroyed.
*
* @param { UIExtensionContentSession } session - Indicates the session of the UI extension page.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
onSessionDestroy(session: UIExtensionContentSession): void;
/**
* Called back when the state of an auto fill extension changes to foreground.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
onForeground(): void;
/**
* Called back when the state of an auto fill extension changes to background.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
onBackground(): void;
/**
* Called back before an auto fill extension is destroyed.
*
* @returns { void | Promise<void> } the promise returned by the function.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
onDestroy(): void | Promise<void>;
}

View File

@ -19,6 +19,7 @@ import { Configuration } from './@ohos.app.ability.Configuration';
import { AbilityRunningInfo as _AbilityRunningInfo } from './application/AbilityRunningInfo';
import { ExtensionRunningInfo as _ExtensionRunningInfo } from './application/ExtensionRunningInfo';
import { ElementName } from './bundleManager/ElementName';
import * as _AbilityForegroundStateObserver from './application/AbilityForegroundStateObserver';
import * as _AbilityStateData from './application/AbilityStateData';
/**
@ -94,6 +95,38 @@ declare namespace abilityManager {
BACKGROUNDING = 12
}
/**
* Register Ability foreground or background state observer.
*
* @permission ohos.permission.RUNNING_STATE_OBSERVER
* @param { 'abilityForegroundState' } type - ability foreground or background state.
* @param { AbilityForegroundStateObserver } observer - The ability foreground state observer.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 11
*/
function on(type: 'abilityForegroundState', observer: AbilityForegroundStateObserver): void;
/**
* Unregister Ability foreground or background state observer.
*
* @permission ohos.permission.RUNNING_STATE_OBSERVER
* @param { 'abilityForegroundState' } type - ability foreground or background state.
* @param { AbilityForegroundStateObserver } [observer] - The ability foreground state observer.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 11
*/
function off(type: 'abilityForegroundState', observer?: AbilityForegroundStateObserver): void;
/**
* Updates the configuration by modifying the configuration.
*
@ -328,6 +361,15 @@ declare namespace abilityManager {
* @since 9
*/
export type ExtensionRunningInfo = _ExtensionRunningInfo;
/**
* The ability foreground state observer.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 11
*/
export type AbilityForegroundStateObserver = _AbilityForegroundStateObserver.default;
}
export default abilityManager;

View File

@ -15,6 +15,7 @@
import { AsyncCallback } from './@ohos.base';
import * as _ApplicationStateObserver from './application/ApplicationStateObserver';
import type * as _AppForegroundStateObserver from './application/AppForegroundStateObserver';
import * as _AbilityStateData from './application/AbilityStateData';
import * as _AppStateData from './application/AppStateData';
import type * as _ProcessData from './application/ProcessData';
@ -218,6 +219,22 @@ declare namespace appManager {
*/
function on(type: 'applicationState', observer: ApplicationStateObserver, bundleNameList: Array<string>): number;
/**
* Register app foreground or background state observer.
*
* @permission ohos.permission.RUNNING_STATE_OBSERVER
* @param { 'appForegroundState' } type - app foreground or background state.
* @param { AppForegroundStateObserver } observer - The app foreground state observer.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 11
*/
function on(type: 'appForegroundState', observer: AppForegroundStateObserver): void;
/**
* Unregister application state observer.
*
@ -252,6 +269,22 @@ declare namespace appManager {
*/
function off(type: 'applicationState', observerId: number): Promise<void>;
/**
* Unregister app foreground or background state observer.
*
* @permission ohos.permission.RUNNING_STATE_OBSERVER
* @param { 'appForegroundState' } type - app foreground or background state.
* @param { AppForegroundStateObserver } [observer] - The app foreground state observer.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 11
*/
function off(type: 'appForegroundState', observer?: AppForegroundStateObserver): void;
/**
* getForegroundApplications.
*
@ -695,6 +728,15 @@ declare namespace appManager {
*/
export type ApplicationStateObserver = _ApplicationStateObserver.default;
/**
* The application foreground state observer.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 11
*/
export type AppForegroundStateObserver = _AppForegroundStateObserver.default;
/**
* The class of a process information.
*

View File

@ -0,0 +1,153 @@
/*
* Copyright (c) 2023 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.
*/
import type { UIContext } from './@ohos.arkui.UIContext';
import type * as _ViewData from './application/ViewData';
import type * as _PageNodeInfo from './application/PageNodeInfo';
import { AutoFillType } from './application/AutoFillType';
import type * as _AutoFillRequest from './application/AutoFillRequest';
/**
* This module provides the function of auto fill manager.
*
* @namespace autoFillManager
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
* @since 11
*/
declare namespace autoFillManager {
/**
* Auto save callback.
*
* @interface AutoSaveCallback
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
* @since 11
*/
export interface AutoSaveCallback {
/**
* Called when auto save request is successfully handled.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
* @since 11
*/
onSuccess(): void;
/**
* Called when auto save request is failed to be handled.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
* @since 11
*/
onFailure(): void;
}
/**
* Trigger an auto save request.
*
* @param { UIContext } context - Indicates the ui context where the save operation will be performed.
* @param { AutoSaveCallback } [callback] - Indicates the callback that used to receive the result.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
* @since 11
*/
export function requestAutoSave(context: UIContext, callback?: AutoSaveCallback): void;
/**
* The interface of view data.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export type ViewData = _ViewData.default;
/**
* The interface of page node info.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export type PageNodeInfo = _PageNodeInfo.default;
/**
* The enum of auto fill type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export { AutoFillType };
/**
* The interface of fill request.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export type FillRequest = _AutoFillRequest.FillRequest;
/**
* The interface of save request.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export type SaveRequest = _AutoFillRequest.SaveRequest;
/**
* The interface of fill response.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export type FillResponse = _AutoFillRequest.FillResponse;
/**
* The interface of fill request callback.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export type FillRequestCallback = _AutoFillRequest.FillRequestCallback;
/**
* The interface of save request callback.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export type SaveRequestCallback = _AutoFillRequest.SaveRequestCallback;
}
export default autoFillManager;

View File

@ -15,6 +15,7 @@
import * as _UIAbilityContext from './application/UIAbilityContext';
import type * as _UIExtensionContext from './application/UIExtensionContext';
import type * as _AutoFillExtensionContext from './application/AutoFillExtensionContext';
import * as _AbilityStageContext from './application/AbilityStageContext';
import * as _ApplicationContext from './application/ApplicationContext';
import * as _BaseContext from './application/BaseContext';
@ -310,6 +311,17 @@ declare namespace common {
*/
export type UIExtensionContext = _UIExtensionContext.default;
/**
* The context of auto fill extension. It allows access to
* AutoFillExtension-specific resources.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @StageModelOnly
* @since 11
*/
export type AutoFillExtensionContext = _AutoFillExtensionContext.default;
/**
* The function Called when some error occurred except disconnected from UIAbility or UIExtensionAbility
*

View File

@ -1045,7 +1045,16 @@ declare namespace formInfo {
* @atomicservice
* @since 11
*/
Dimension_2_1
Dimension_2_1,
/**
* 1 x 1 form
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 11
*/
DIMENSION_1_1,
}
/**
* The visibility of a form.

View File

@ -61,6 +61,19 @@ declare namespace access {
* @syscap SystemCapability.Communication.Bluetooth.Core
* @since 10
*/
/**
* Obtains the Bluetooth status of a device.
*
* @permission ohos.permission.ACCESS_BLUETOOTH
* @returns { BluetoothState } Returns the Bluetooth status.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 2900001 - Service stopped.
* @throws { BusinessError } 2900099 - Operation failed.
* @syscap SystemCapability.Communication.Bluetooth.Core
* @atomicservice
* @since 11
*/
function getState(): BluetoothState;
/**

View File

@ -107,6 +107,16 @@ declare namespace contact {
* @syscap SystemCapability.Applications.Contacts
* @since 10
*/
/**
* Select contact.
*
* @param { AsyncCallback<Array<Contact>> } callback - Indicates the callback for getting the result of the call.
* Returns the contact list which user select; returns empty contact list if user not select.
* @throws { BusinessError } 401 - Parameter error.
* @syscap SystemCapability.Applications.Contacts
* @atomicservice
* @since 11
*/
function selectContacts(callback: AsyncCallback<Array<Contact>>): void;
/**
@ -130,6 +140,15 @@ declare namespace contact {
* @syscap SystemCapability.Applications.Contacts
* @since 10
*/
/**
* Select contact.
*
* @returns { Promise<Array<Contact>> } Returns the contact list which user select;
* returns empty contact list if user not select.
* @syscap SystemCapability.Applications.Contacts
* @atomicservice
* @since 11
*/
function selectContacts(): Promise<Array<Contact>>;
/**
@ -141,6 +160,16 @@ declare namespace contact {
* @syscap SystemCapability.Applications.Contacts
* @since 10
*/
/**
* Select contact with option.
*
* @param { ContactSelectionOptions } options - Indicates the Single-select or multiple-select.
* @param { AsyncCallback<Array<Contact>> } callback - Indicates the callback for getting the result of the call.
* @throws { BusinessError } 401 - Parameter error.
* @syscap SystemCapability.Applications.Contacts
* @atomicservice
* @since 11
*/
function selectContacts(options: ContactSelectionOptions, callback: AsyncCallback<Array<Contact>>): void;
/**
@ -153,6 +182,17 @@ declare namespace contact {
* @syscap SystemCapability.Applications.Contacts
* @since 10
*/
/**
* Select contact with option.
*
* @param { ContactSelectionOptions } options - Indicates the Single-select or multiple-select.
* @returns { Promise<Array<Contact>> } Returns the contact list which user select;
* returns empty contact list if user not select.
* @throws { BusinessError } 401 - Parameter error.
* @syscap SystemCapability.Applications.Contacts
* @atomicservice
* @since 11
*/
function selectContacts(options: ContactSelectionOptions): Promise<Array<Contact>>;
/**

View File

@ -3858,6 +3858,16 @@ declare namespace audio {
* @since 10
*/
SOURCE_TYPE_WAKEUP = 3,
/**
* Voice call source type.
* @permission ohos.permission.RECORD_VOICE_CALL
* @syscap SystemCapability.Multimedia.Audio.Core
* @systemapi
* @since 11
*/
SOURCE_TYPE_VOICE_CALL = 4,
/**
* Voice communication source type.
* @syscap SystemCapability.Multimedia.Audio.Core

View File

@ -3409,7 +3409,9 @@ declare namespace resourceManager {
*
* @param { number } resId - Indicates the resource ID.
* @param { number } density - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
* to use the density of current system dpi.
* to use the density of current system dpi.
* @param { number } type - The optional parameter means the media type, the default value 0 means
* the normal media.
* @returns { DrawableDescriptor } The DrawableDescriptor class to get drawable image.
* @throws { BusinessError } 401 - If the input parameter invalid.
* @throws { BusinessError } 9001001 - If the resId invalid.
@ -3418,7 +3420,7 @@ declare namespace resourceManager {
* @atomicservice
* @since 11
*/
getDrawableDescriptor(resId: number, density?: number): DrawableDescriptor;
getDrawableDescriptor(resId: number, density?: number, type?: number): DrawableDescriptor;
/**
* Obtains the DrawableDescriptor of the media file corresponding to a specified resource Name.
@ -3439,6 +3441,8 @@ declare namespace resourceManager {
* @param { string } resName - Indicates the resource name.
* @param { number } density - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
* to use the density of current system dpi.
* @param { number } type - The optional parameter means the media type, the default value 0 means
* the normal media.
* @returns { DrawableDescriptor } The DrawableDescriptor class to get drawable image.
* @throws { BusinessError } 401 - If the input parameter invalid.
* @throws { BusinessError } 9001003 - If the resName invalid.
@ -3447,7 +3451,7 @@ declare namespace resourceManager {
* @atomicservice
* @since 11
*/
getDrawableDescriptorByName(resName: string, density?: number): DrawableDescriptor;
getDrawableDescriptorByName(resName: string, density?: number, type?: number): DrawableDescriptor;
/**
* Obtains the DrawableDescriptor of the media file corresponding to a specified resource.
@ -3469,6 +3473,8 @@ declare namespace resourceManager {
* @param { Resource } resource - Indicates the resource object.
* @param { number } density - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
* to use the density of current system dpi.
* @param { number } type - The optional parameter means the media type, the default value 0 means
* the normal media.
* @returns { DrawableDescriptor } The DrawableDescriptor class to get drawable image.
* @throws { BusinessError } 401 - If the input parameter invalid.
* @throws { BusinessError } 9001001 - If the resId invalid.
@ -3478,7 +3484,7 @@ declare namespace resourceManager {
* @atomicservice
* @since 11
*/
getDrawableDescriptor(resource: Resource, density?: number): DrawableDescriptor;
getDrawableDescriptor(resource: Resource, density?: number, type?: number): DrawableDescriptor;
/**
* Obtains the rawfile resource list corresponding to the specified resource path in callback mode.

View File

@ -1710,7 +1710,14 @@ declare namespace huks {
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_CALL_SERVICE_FAILED = 12000015
HUKS_ERR_CODE_CALL_SERVICE_FAILED = 12000015,
/**
* Device password is required but not set.
*
* @syscap SystemCapability.Security.Huks.Extension
* @since 11
*/
HUKS_ERR_CODE_DEVICE_PASSWORD_UNSET = 12000016
}
/**
@ -2866,6 +2873,14 @@ declare namespace huks {
HUKS_TAG_SECURE_KEY_UUID = HuksTagType.HUKS_TAG_TYPE_BYTES | 1010,
HUKS_TAG_KEY_DOMAIN = HuksTagType.HUKS_TAG_TYPE_UINT | 1011,
/**
* Key access control based on device password setting status. True means the key can only be generated and used when the password is set.
*
* @syscap SystemCapability.Security.Huks.Extension
* @since 11
*/
HUKS_TAG_IS_DEVICE_PASSWORD_SET = HuksTagType.HUKS_TAG_TYPE_BOOL | 1012,
/* Inner-use TAG: 10001 - 10999 */
/**
* @syscap SystemCapability.Security.Huks.Core

256
api/@ohos.sensor.d.ts vendored
View File

@ -21,6 +21,13 @@ import { AsyncCallback, Callback } from './@ohos.base';
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
/**
* This module provides the capability to subscribe to sensor data.
* @namespace sensor
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
declare namespace sensor {
/**
* Enum for obtain the type of sensor.
@ -34,6 +41,12 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 9
*/
/**
* Acceleration sensor.
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
ACCELEROMETER = 1,
/**
@ -41,6 +54,12 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 9
*/
/**
* Gyroscope sensor.
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
GYROSCOPE = 2,
/**
@ -106,6 +125,12 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 9
*/
/**
* Orientation sensor.
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
ORIENTATION = 256,
/**
@ -221,7 +246,6 @@ declare namespace sensor {
/**
* Subscribe to accelerometer sensor data.
* @atomicservice.
* @permission ohos.permission.ACCELEROMETER
* @param { SensorId.ACCELEROMETER } type - Indicate the sensor type to listen for, {@code SensorId.ACCELEROMETER}.
* @param { Callback<AccelerometerResponse> } callback - callback accelerometer data.
@ -232,6 +256,19 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 9
*/
/**
* Subscribe to accelerometer sensor data.
* @permission ohos.permission.ACCELEROMETER
* @param { SensorId.ACCELEROMETER } type - Indicate the sensor type to listen for, {@code SensorId.ACCELEROMETER}.
* @param { Callback<AccelerometerResponse> } callback - callback accelerometer data.
* @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 14500101 - Service exception.
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
function on(type: SensorId.ACCELEROMETER, callback: Callback<AccelerometerResponse>,
options?: Options): void;
@ -302,7 +339,6 @@ declare namespace sensor {
/**
* Subscribe to gyroscope sensor data.
* @atomicservice.
* @permission ohos.permission.GYROSCOPE
* @param { SensorId.GYROSCOPE } type - Indicate the sensor type to listen for, {@code SensorId.GYROSCOPE}.
* @param { Callback<GyroscopeResponse> } callback - callback gyroscope data.
@ -313,6 +349,19 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 9
*/
/**
* Subscribe to gyroscope sensor data.
* @permission ohos.permission.GYROSCOPE
* @param { SensorId.GYROSCOPE } type - Indicate the sensor type to listen for, {@code SensorId.GYROSCOPE}.
* @param { Callback<GyroscopeResponse> } callback - callback gyroscope data.
* @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 14500101 - Service exception.
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
function on(type: SensorId.GYROSCOPE, callback: Callback<GyroscopeResponse>,
options?: Options): void;
@ -415,7 +464,6 @@ declare namespace sensor {
/**
* Subscribe to orientation sensor data.
* @atomicservice.
* @param { SensorId.ORIENTATION } type - Indicate the sensor type to listen for, {@code SensorId.ORIENTATION}.
* @param { Callback<OrientationResponse> } callback - callback orientation data.
* @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
@ -424,6 +472,17 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 9
*/
/**
* Subscribe to orientation sensor data.
* @param { SensorId.ORIENTATION } type - Indicate the sensor type to listen for, {@code SensorId.ORIENTATION}.
* @param { Callback<OrientationResponse> } callback - callback orientation data.
* @param { Options } [options] - Optional parameters specifying the interval at which sensor data is reported, {@code Options}.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 14500101 - Service exception.
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
function on(type: SensorId.ORIENTATION, callback: Callback<OrientationResponse>,
options?: Options): void;
@ -780,7 +839,6 @@ declare namespace sensor {
/**
* Unsubscribe to accelerometer sensor data.
* @atomicservice.
* @permission ohos.permission.ACCELEROMETER
* @param { SensorId.ACCELEROMETER } type - Indicate the sensor type to listen for, {@code SensorId.ACCELEROMETER}.
* @param { Callback<AccelerometerResponse> } callback - callback accelerometer data.
@ -789,6 +847,17 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 9
*/
/**
* Unsubscribe to accelerometer sensor data.
* @permission ohos.permission.ACCELEROMETER
* @param { SensorId.ACCELEROMETER } type - Indicate the sensor type to listen for, {@code SensorId.ACCELEROMETER}.
* @param { Callback<AccelerometerResponse> } callback - callback accelerometer data.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error.
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
function off(type: SensorId.ACCELEROMETER, callback?: Callback<AccelerometerResponse>): void;
/**
@ -846,7 +915,6 @@ declare namespace sensor {
/**
* Unsubscribe to gyroscope sensor data.
* @atomicservice.
* @permission ohos.permission.GYROSCOPE
* @param { SensorId.GYROSCOPE } type - Indicate the sensor type to listen for, {@code SensorId.GYROSCOPE}.
* @param { Callback<GyroscopeResponse> } callback - callback gyroscope data.
@ -855,6 +923,17 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 9
*/
/**
* Unsubscribe to gyroscope sensor data.
* @permission ohos.permission.GYROSCOPE
* @param { SensorId.GYROSCOPE } type - Indicate the sensor type to listen for, {@code SensorId.GYROSCOPE}.
* @param { Callback<GyroscopeResponse> } callback - callback gyroscope data.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error.
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
function off(type: SensorId.GYROSCOPE, callback?: Callback<GyroscopeResponse>): void;
/**
@ -936,13 +1015,21 @@ declare namespace sensor {
/**
* Unsubscribe to orientation sensor data.
* @atomicservice.
* @param { SensorId.ORIENTATION } type - Indicate the sensor type to listen for, {@code SensorId.ORIENTATION}.
* @param { Callback<OrientationResponse> } callback - callback orientation data.
* @throws { BusinessError } 401 - Parameter error.
* @syscap SystemCapability.Sensors.Sensor
* @since 9
*/
/**
* Unsubscribe to orientation sensor data.
* @param { SensorId.ORIENTATION } type - Indicate the sensor type to listen for, {@code SensorId.ORIENTATION}.
* @param { Callback<OrientationResponse> } callback - callback orientation data.
* @throws { BusinessError } 401 - Parameter error.
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
function off(type: SensorId.ORIENTATION, callback?: Callback<OrientationResponse>): void;
/**
@ -2202,7 +2289,7 @@ declare namespace sensor {
function getInclination(inclinationMatrix: Array<number>): Promise<number>;
/**
* Get the angle change between two rotation matrices
* Get the angle change between two rotation matrices.
* @param { Array<number> } currentRotationMatrix - Indicates the current rotation matrix.
* @param { Array<number> } preRotationMatrix - Indicates the current rotation matrix.
* @param { AsyncCallback<Array<number>> } callback - callback angle variation.
@ -2215,7 +2302,7 @@ declare namespace sensor {
callback: AsyncCallback<Array<number>>): void;
/**
* Get the angle change between two rotation matrices
* Get the angle change between two rotation matrices.
* @param { Array<number> } currentRotationMatrix - currentRotationMatrix Indicates the current rotation matrix.
* @param { Array<number> } preRotationMatrix - preRotationMatrix Indicates the current rotation matrix.
* @returns { Promise<Array<number>> } Returns the array of number(z, x and y) in which the angle variety.
@ -2318,7 +2405,7 @@ declare namespace sensor {
}
/**
* Rotate the provided rotation matrix so that it can be represented in a different way Coordinate System
* Rotate the provided rotation matrix so that it can be represented in a different way Coordinate System.
* @param { Array<number> } inRotationVector - Indicates the rotation matrix to be transformed.
* @param { CoordinatesOptions } coordinates - Indicates coordinate system guidance, {@code CoordinatesOptions}.
* @param { AsyncCallback<Array<number>> } callback - callback rotation matrix.
@ -2331,7 +2418,7 @@ declare namespace sensor {
callback: AsyncCallback<Array<number>>): void;
/**
* Rotate the provided rotation matrix so that it can be represented in a different way Coordinate System
* Rotate the provided rotation matrix so that it can be represented in a different way Coordinate System.
* @param { Array<number> } inRotationVector - inRotationVector Indicates the rotation matrix to be transformed.
* @param { CoordinatesOptions } coordinates - coordinates Indicates coordinate system guidance, {@code CoordinatesOptions}.
* @returns { Promise<Array<number>> } Returns the transformed rotation matrix.
@ -2533,16 +2620,38 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
/**
* Subscribe to the sensor's optional parameters.
* @typedef Options
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
interface Options {
/**
* Sensor event reporting event interval
* Sensor event reporting event interval.
* @type { ?number }
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
interval?: number;
/**
* Sensor event reporting event interval.
* @type {?(number | SensorFrequency) }
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
interval?: number | SensorFrequency;
}
/**
* The sensor reporting frequency is divided into three modes.
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
type SensorFrequency = 'game' | 'ui' | 'normal';
/**
* The type of number.
* @enum { number }
@ -2561,7 +2670,7 @@ declare namespace sensor {
SENSOR_TYPE_ID_ACCELEROMETER = 1,
/**
* Gyroscope sensor
* Gyroscope sensor.
* @syscap SystemCapability.Sensors.Sensor
* @since 8
* @deprecated since 9
@ -2625,7 +2734,7 @@ declare namespace sensor {
SENSOR_TYPE_ID_ORIENTATION = 256,
/**
* Gravity sensor.
* Gravity sensor.
* @syscap SystemCapability.Sensors.Sensor
* @since 8
* @deprecated since 9
@ -2725,12 +2834,14 @@ declare namespace sensor {
* Enumerates the accuracy levels of data reported by a sensor.
* @enum { number }
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
enum SensorAccuracy {
/**
* The sensor data is unreliable. It is possible that the sensor does not contact with the device to measure.
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
ACCURACY_UNRELIABLE = 0,
@ -2738,6 +2849,7 @@ declare namespace sensor {
/**
* The sensor data is at a low accuracy level. The data must be calibrated based on the environment before being used.
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
ACCURACY_LOW = 1,
@ -2745,6 +2857,7 @@ declare namespace sensor {
/**
* The sensor data is at a medium accuracy level. You are advised to calibrate the data based on the environment before using it.
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
ACCURACY_MEDIUM = 2,
@ -2752,6 +2865,7 @@ declare namespace sensor {
/**
* The sensor data is at a high accuracy level. The data can be used directly.
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
ACCURACY_HIGH = 3
@ -2763,19 +2877,34 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
/**
* The basic data structure of the sensor event.
* @typedef Response
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
interface Response {
/**
* The timestamp of the reported sensor data
* The timestamp of the reported sensor data.
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
/**
* The timestamp of the reported sensor data.
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
timestamp: number;
/**
* The accuracy levels of data reported by a sensor.
* @type { SensorAccuracy }
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
accuracy: SensorAccuracy;
@ -2787,6 +2916,13 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
/**
* Acceleration sensor event data.
* @typedef AccelerometerResponse
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
interface AccelerometerResponse extends Response {
/**
* Acceleration x-axis component.
@ -2794,6 +2930,13 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
/**
* Acceleration x-axis component.
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
x: number;
/**
@ -2802,6 +2945,13 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
/**
* Acceleration y-axis component.
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
y: number;
/**
@ -2810,6 +2960,13 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
/**
* Acceleration z-axis component
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
z: number;
}
@ -2821,7 +2978,7 @@ declare namespace sensor {
*/
interface LinearAccelerometerResponse extends Response {
/**
* Linear acceleration x-axis component
* Linear acceleration x-axis component.
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
* @since 8
@ -2829,7 +2986,7 @@ declare namespace sensor {
x: number;
/**
* Linear acceleration y-axis component
* Linear acceleration y-axis component.
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
* @since 8
@ -2837,7 +2994,7 @@ declare namespace sensor {
y: number;
/**
* Linear acceleration z-axis component
* Linear acceleration z-axis component.
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
* @since 8
@ -2886,7 +3043,7 @@ declare namespace sensor {
biasX: number;
/**
* Acceleration uncalibrated y-axis offset
* Acceleration uncalibrated y-axis offset.
*
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
@ -2895,7 +3052,7 @@ declare namespace sensor {
biasY: number;
/**
* Acceleration uncalibrated z-axis offset
* Acceleration uncalibrated z-axis offset.
*
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
@ -2942,6 +3099,13 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
/**
* Orientation sensor event data.
* @typedef OrientationResponse
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
interface OrientationResponse extends Response {
/**
* The device rotates at an angle around the Z axis.
@ -2949,6 +3113,13 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
/**
* The device rotates at an angle around the Z axis.
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
alpha: number;
/**
@ -2957,6 +3128,13 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
/**
* The device rotates at an angle around the X axis.
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
beta: number;
/**
@ -2965,6 +3143,13 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
/**
* The device rotates at an angle around the Y axis.
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
gamma: number;
}
@ -3014,6 +3199,13 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
/**
* Gyroscope sensor event data.
* @typedef GyroscopeResponse
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
interface GyroscopeResponse extends Response {
/**
* Gyroscope x-axis component.
@ -3021,6 +3213,13 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
/**
* Gyroscope x-axis component.
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
x: number;
/**
@ -3029,6 +3228,13 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
/**
* Gyroscope y-axis component.
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
y: number;
/**
@ -3037,6 +3243,13 @@ declare namespace sensor {
* @syscap SystemCapability.Sensors.Sensor
* @since 8
*/
/**
* Gyroscope z-axis component.
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
* @atomicservice
* @since 11
*/
z: number;
}
@ -3290,7 +3503,8 @@ declare namespace sensor {
*/
interface PedometerDetectionResponse extends Response {
/**
* Indicates the pedometer detection status, 1 indicates that a walking action has occurred, and 0 indicates that no movement has occurred.
* Indicates the pedometer detection status, 1 indicates that a walking action has occurred,
* and 0 indicates that no movement has occurred.
* @type { number }
* @syscap SystemCapability.Sensors.Sensor
* @since 8

View File

@ -0,0 +1,36 @@
/*
* Copyright (c) 2023 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.
*/
import AbilityStateData from './AbilityStateData';
/**
* The ability foreground state observer.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 11
*/
export default class AbilityForegroundStateObserver {
/**
* Will be called when foreground or background ability changed.
*
* @param { AbilityStateData } abilityStateData State changed ability info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 11
*/
onAbilityStateChanged(abilityStateData: AbilityStateData): void;
}

View File

@ -0,0 +1,35 @@
/*
* Copyright (c) 2023 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.
*/
import type AppStateData from './AppStateData';
/**
* The app foreground state observer.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 11
*/
export default class AppForegroundStateObserver {
/**
* Will be called when foreground or background application changed.
*
* @param { AppStateData } appStateData - State changed application info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 11
*/
onAppStateChanged(appStateData: AppStateData): void;
}

View File

@ -50,4 +50,24 @@ export default class AppStateData {
* @since 8
*/
state: number;
/**
* Indicates whether the application has splitted screens.
*
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 11
*/
isSplitScreenMode: boolean;
/**
* Indicates whether the application has floating windows.
*
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 11
*/
isFloatingWindowMode: boolean;
}

View File

@ -0,0 +1,28 @@
/*
* Copyright (c) 2023 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.
*/
import ExtensionContext from './ExtensionContext';
/**
* The context of auto fill extension. It allows access to AutoFillExtension-specific resources.
*
* @extends ExtensionContext
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export default class AutoFillExtensionContext extends ExtensionContext {
}

178
api/application/AutoFillRequest.d.ts vendored Normal file
View File

@ -0,0 +1,178 @@
/*
* Copyright (c) 2023 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.
*/
import type { AutoFillType } from './AutoFillType';
import type ViewData from './ViewData';
/**
* Fill request for automatic filling.
*
* @interface FillRequest
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export interface FillRequest {
/**
* The auto fill type.
*
* @type { AutoFillType }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
type: AutoFillType;
/**
* The view data.
*
* @type { ViewData }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
viewData: ViewData;
}
/**
* Save request for automatic filling.
*
* @interface SaveRequest
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export interface SaveRequest {
/**
* The view data.
*
* @type { ViewData }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
viewData: ViewData;
}
/**
* Fill response for automatic filling.
*
* @interface FillResponse
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export interface FillResponse {
/**
* The view data.
*
* @type { ViewData }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
viewData: ViewData;
}
/**
* Fill request callback for automatic filling.
*
* @interface FillRequestCallback
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export interface FillRequestCallback {
/**
* Notify the system that a fill request is successfully filled.
*
* @param { FillResponse } response - Indicates the fill response.
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
onSuccess(response: FillResponse): void;
/**
* Notification system a fill request failed to be filled.
*
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
onFailure(): void;
/**
* Notification system that filling has been cancelled.
*
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
onCancel(): void;
}
/**
* Save request callback for automatic filling.
*
* @interface SaveRequestCallback
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export interface SaveRequestCallback {
/**
* Notify the system that a save request is successfully handled.
*
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
onSuccess(): void;
/**
* Notify the system that a save request is failed to be handled.
*
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
onFailure(): void;
}

65
api/application/AutoFillType.d.ts vendored Normal file
View File

@ -0,0 +1,65 @@
/*
* Copyright (c) 2023 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.
*/
/**
* Type of auto fill.
*
* @enum { number }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export enum AutoFillType {
/**
* Indicates the type of unspecified.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
UNSPECIFIED = 0,
/**
* Indicates the type of password.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
PASSWORD = 1,
/**
* Indicates the type of user name.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
USER_NAME = 2,
/**
* Indicates the type of new password.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
NEW_PASSWORD = 3
}

115
api/application/PageNodeInfo.d.ts vendored Normal file
View File

@ -0,0 +1,115 @@
/*
* Copyright (c) 2023 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.
*/
import type { AutoFillType } from './AutoFillType';
/**
* Page node info for automatic filling.
*
* @interface PageNodeInfo
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export default interface PageNodeInfo {
/**
* The id of page node.
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
id: number;
/**
* The depth of page node.
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
depth: number;
/**
* The auto fill type of page node.
*
* @type { AutoFillType }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
autoFillType: AutoFillType;
/**
* The tag of page node.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
tag: string;
/**
* The value of page node.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
value: string;
/**
* The placeholder of page node.
*
* @type { ?string }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
placeholder?: string;
/**
* The password rules of page node.
*
* @type { ?string }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
passwordRules?: string;
/**
* The auto fill flag of page node.
*
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
enableAutoFill: boolean;
}

82
api/application/ViewData.d.ts vendored Normal file
View File

@ -0,0 +1,82 @@
/*
* Copyright (c) 2023 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.
*/
import type PageNodeInfo from './PageNodeInfo';
/**
* View data for automatic filling.
*
* @interface ViewData
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
export default interface ViewData {
/**
* The bundle name.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
bundleName: string;
/**
* The module name.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
moduleName: string;
/**
* The ability name.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
abilityName: string;
/**
* The page url.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
pageUrl: string;
/**
* The page node infos.
*
* @type { Array<PageNodeInfo> }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @StageModelOnly
* @since 11
*/
pageNodeInfos: Array<PageNodeInfo>;
}

View File

@ -26,6 +26,7 @@
* @typedef CommonEventData
* @syscap SystemCapability.Notification.CommonEvent
* @crossplatform
* @atomicservice
* @since 11
*/
export interface CommonEventData {
@ -42,6 +43,7 @@ export interface CommonEventData {
* @type { string }
* @syscap SystemCapability.Notification.CommonEvent
* @crossplatform
* @atomicservice
* @since 11
*/
event: string;
@ -53,6 +55,14 @@ export interface CommonEventData {
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/
/**
* bundle name
*
* @type { ?string }
* @syscap SystemCapability.Notification.CommonEvent
* @atomicservice
* @since 11
*/
bundleName?: string;
/**
@ -63,6 +73,15 @@ export interface CommonEventData {
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/
/**
* The custom result code of the common event.
*
* @type { ?number }
* @default 0
* @syscap SystemCapability.Notification.CommonEvent
* @atomicservice
* @since 11
*/
code?: number;
/**
@ -72,6 +91,14 @@ export interface CommonEventData {
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/
/**
* The custom result data of the common event.
*
* @type { ?string }
* @syscap SystemCapability.Notification.CommonEvent
* @atomicservice
* @since 11
*/
data?: string;
/**
@ -81,5 +108,13 @@ export interface CommonEventData {
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/
/**
* The description of the parameters in a common event.
*
* @type { ?object }
* @syscap SystemCapability.Notification.CommonEvent
* @atomicservice
* @since 11
*/
parameters?: { [key: string]: any };
}

View File

@ -120,6 +120,16 @@ export interface NotificationSubscriber {
* @since 10
*/
onBadgeChanged?: (data: BadgeNumberCallbackData) => void;
/**
* Callback when badge cancel notifications.
*
* @type { ?function }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
onBatchCancel?: (data: Array<SubscribeCallbackData>) => void;
}
/**

View File

@ -29074,6 +29074,7 @@ hoydenish
hoyle
hoyt
hp
hpa
hpp
hq
hql