diff --git a/api/@internal/ets/global.d.ts b/api/@internal/ets/global.d.ts index c3309811d..a9a19e993 100644 --- a/api/@internal/ets/global.d.ts +++ b/api/@internal/ets/global.d.ts @@ -38,6 +38,15 @@ import { TouchObject, KeyEvent, MouseEvent } from 'SpecialEvent'; * @since 10 * @form */ +/** + * Defines the console info. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @form + */ export declare class console { /** * Prints "debug" logs. @@ -66,6 +75,17 @@ export declare class console { * @since 10 * @form */ + /** + * Prints "debug" logs. + * + * @param { string } message - Text to print. + * @param { any[] } arguments + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @form + */ static debug(message: string, ...arguments: any[]): void; /** @@ -95,6 +115,17 @@ export declare class console { * @since 10 * @form */ + /** + * Prints "log" logs. + * + * @param { string } message - Text to print. + * @param { any[] } arguments + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @form + */ static log(message: string, ...arguments: any[]): void; /** @@ -124,6 +155,17 @@ export declare class console { * @since 10 * @form */ + /** + * Prints "info" logs. + * + * @param { string } message - Text to print. + * @param { any[] } arguments + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @form + */ static info(message: string, ...arguments: any[]): void; /** @@ -153,6 +195,17 @@ export declare class console { * @since 10 * @form */ + /** + * Prints "warn" logs. + * + * @param { string } message - Text to print. + * @param { any[] } arguments + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @form + */ static warn(message: string, ...arguments: any[]): void; /** @@ -182,6 +235,17 @@ export declare class console { * @since 10 * @form */ + /** + * Prints "error" logs. + * + * @param { string } message - Text to print. + * @param { any[] } arguments + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @form + */ static error(message: string, ...arguments: any[]): void; /** @@ -362,6 +426,20 @@ export declare class console { * @crossplatform * @since 10 */ +/** + * Sets the interval for repeatedly calling a function. + * + * @param { Function | string } handler - Indicates the function to be called after the timer goes off. + * For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. + * For devices of "lite wearable" and "smartVision" types, this parameter must be a function. + * @param { number } delay - Indicates the interval between each two calls, in milliseconds. The function will be called after this delay. + * @param { any[] } arguments - Indicates additional arguments to pass to "handler" when the timer goes off. + * @returns { number } Returns the timer ID. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ export declare function setInterval(handler: Function | string, delay: number, ...arguments: any[]): number; /** @@ -391,6 +469,21 @@ export declare function setInterval(handler: Function | string, delay: number, . * @crossplatform * @since 10 */ +/** + * Sets a timer after which a function will be executed. + * + * @param { Function | string } handler - Indicates the function to be called after the timer goes off. + * For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. + * For devices of "lite wearable" and "smartVision" types, this parameter must be a function. + * @param { number } [delay] - Indicates the delay (in milliseconds) after which the function will be called. + * If this parameter is left empty, default value "0" will be used, which means that the function will be called immediately or as soon as possible. + * @param { any[] } [arguments] - Indicates additional arguments to pass to "handler" when the timer goes off. + * @returns { number } Returns the timer ID. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ export declare function setTimeout(handler: Function | string, delay?: number, ...arguments: any[]): number; /** @@ -408,6 +501,15 @@ export declare function setTimeout(handler: Function | string, delay?: number, . * @crossplatform * @since 10 */ +/** + * Cancel the interval set by " setInterval()". + * + * @param { number } [intervalID] - Indicates the timer ID returned by "setInterval()". + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ export declare function clearInterval(intervalID?: number): void; /** @@ -425,6 +527,15 @@ export declare function clearInterval(intervalID?: number): void; * @crossplatform * @since 10 */ +/** + * Cancel the timer set by "setTimeout()". + * + * @param { number } [timeoutID] - Indicates the timer ID returned by "setTimeout()". + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ export declare function clearTimeout(timeoutID?: number): void; /** @@ -444,6 +555,16 @@ export declare function clearTimeout(timeoutID?: number): void; * @crossplatform * @since 10 */ +/** + * Defining syscap function. + * + * @param { string } syscap + * @returns { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ export declare function canIUse(syscap: string): boolean; /** @@ -465,6 +586,17 @@ export declare function canIUse(syscap: string): boolean; * @since 10 * @test */ +/** + * Obtains all attributes of the component with the specified ID. + * + * @param { string } id - ID of the component whose attributes are to be obtained. + * @returns { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @test + */ export declare function getInspectorByKey(id: string): string; /** @@ -484,6 +616,16 @@ export declare function getInspectorByKey(id: string): string; * @since 10 * @test */ +/** + * Get components tree. + * + * @returns { Object } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @test + */ export declare function getInspectorTree(): Object; /** @@ -509,6 +651,19 @@ export declare function getInspectorTree(): Object; * @since 10 * @test */ +/** + * Sends an event to the component with the specified ID. + * + * @param { string } id - ID of the component for which the event is to be sent. + * @param { number } action - Type of the event to be sent. The options are as follows: Click event: 10 LongClick: 11. + * @param { string } params - Event parameters. If there is no parameter, pass an empty string "". + * @returns { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @test + */ export declare function sendEventByKey(id: string, action: number, params: string): boolean; /** @@ -530,6 +685,17 @@ export declare function sendEventByKey(id: string, action: number, params: strin * @since 10 * @test */ +/** + * Send touch event. + * + * @param { TouchObject } event - TouchObject to be sent. + * @returns { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @test + */ export declare function sendTouchEvent(event: TouchObject): boolean; /** @@ -551,6 +717,17 @@ export declare function sendTouchEvent(event: TouchObject): boolean; * @since 10 * @test */ +/** + * Send key event. + * + * @param { KeyEvent } event - KeyEvent to be sent. + * @returns { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @test + */ export declare function sendKeyEvent(event: KeyEvent): boolean; /** @@ -572,6 +749,17 @@ export declare function sendKeyEvent(event: KeyEvent): boolean; * @since 10 * @test */ +/** + * Send mouse event. + * + * @param { MouseEvent } event - MouseEvent to be sent. + * @returns { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @test + */ export declare function sendMouseEvent(event: MouseEvent): boolean; /** diff --git a/api/@ohos.animator.d.ts b/api/@ohos.animator.d.ts index 08ab11050..3a8ffbdb6 100644 --- a/api/@ohos.animator.d.ts +++ b/api/@ohos.animator.d.ts @@ -26,6 +26,14 @@ * @crossplatform * @since 10 */ +/** + * Defines the animator options. + * @interface AnimatorOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ export interface AnimatorOptions { /** * Duration of the animation, in milliseconds. @@ -42,6 +50,15 @@ export interface AnimatorOptions { * @crossplatform * @since 10 */ + /** + * Duration of the animation, in milliseconds. + * The default value is 0. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ duration: number; /** @@ -89,6 +106,30 @@ export interface AnimatorOptions { * @crossplatform * @since 10 */ + /** + * Time curve of the animation. For details about the supported types. + * linear The animation speed keeps unchanged. + * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0). + * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0). + * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0). + * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0). + * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0). + * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0). + * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0). + * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0). + * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0). + * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0). + * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0). + * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0). + * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1. + * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end. + * The default value is ease. + * @type {string} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ easing: string; /** @@ -106,6 +147,15 @@ export interface AnimatorOptions { * @crossplatform * @since 10 */ + /** + * Delay for the animation start. The default value indicates no delay. + * The default value is 0. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ delay: number; /** @@ -125,6 +175,16 @@ export interface AnimatorOptions { * @crossplatform * @since 10 */ + /** + * Whether to resume to the initial state after the animation is executed. + * none: The initial state is restored after the animation is executed. + * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed. + * @type {"none" | "forwards" | "backwards" | "both"} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ fill: "none" | "forwards" | "backwards" | "both"; /** @@ -142,6 +202,15 @@ export interface AnimatorOptions { * @crossplatform * @since 10 */ + /** + * The animation playback mode. + * The default value is "normal". + * @type {"normal" | "reverse" | "alternate" | "alternate-reverse"} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ direction: "normal" | "reverse" | "alternate" | "alternate-reverse"; /** @@ -159,6 +228,15 @@ export interface AnimatorOptions { * @crossplatform * @since 10 */ + /** + * Number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations. + * The default value is 1. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ iterations: number; /** @@ -176,6 +254,15 @@ export interface AnimatorOptions { * @crossplatform * @since 10 */ + /** + * Starting point of animator interpolation. + * The default value is 0. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ begin: number; /** @@ -193,6 +280,15 @@ export interface AnimatorOptions { * @crossplatform * @since 10 */ + /** + * Ending point of Dynamic Interpolation + * The default value is 1. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ end: number; } @@ -209,6 +305,14 @@ export interface AnimatorOptions { * @crossplatform * @since 10 */ +/** + * Defines the Animator result interface. + * @interface AnimatorResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ export interface AnimatorResult { /** * Update the options for current animator. @@ -237,6 +341,16 @@ export interface AnimatorResult { * @crossplatform * @since 10 */ + /** + * Reset the options for current animator. + * @param { AnimatorOptions } options - Options. + * @throws { BusinessError } 401 - if the type of the parameter 1 is not object. + * @throws { BusinessError } 100001 - if no page is found for pageId or fail to get object property list. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ reset(options: AnimatorOptions): void; /** @@ -250,6 +364,13 @@ export interface AnimatorResult { * @crossplatform * @since 10 */ + /** + * Starts the animation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ play(): void; /** @@ -263,6 +384,13 @@ export interface AnimatorResult { * @crossplatform * @since 10 */ + /** + * Ends the animation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ finish(): void; /** @@ -276,6 +404,13 @@ export interface AnimatorResult { * @crossplatform * @since 10 */ + /** + * Pauses the animation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ pause(): void; /** @@ -289,6 +424,13 @@ export interface AnimatorResult { * @crossplatform * @since 10 */ + /** + * Cancels the animation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ cancel(): void; /** @@ -302,6 +444,13 @@ export interface AnimatorResult { * @crossplatform * @since 10 */ + /** + * Plays the animation in reverse direction. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ reverse(): void; /** @@ -315,6 +464,13 @@ export interface AnimatorResult { * @crossplatform * @since 10 */ + /** + * Trigger when vsync callback. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ onframe: (progress: number) => void; /** @@ -328,6 +484,13 @@ export interface AnimatorResult { * @crossplatform * @since 10 */ + /** + * The animation is finished. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ onfinish: () => void; /** @@ -341,6 +504,13 @@ export interface AnimatorResult { * @crossplatform * @since 10 */ + /** + * The animation is canceled. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ oncancel: () => void; /** @@ -354,6 +524,13 @@ export interface AnimatorResult { * @crossplatform * @since 10 */ + /** + * The animation is repeated. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ onrepeat: () => void; } @@ -368,6 +545,13 @@ export interface AnimatorResult { * @crossplatform * @since 10 */ +/** + * Defines the Animator class. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ export default class Animator { /** * Create an animator object for custom animation. @@ -397,5 +581,15 @@ export default class Animator { * @crossplatform * @since 10 */ + /** + * Create an animator object for custom animation. + * @param { AnimatorOptions } options - Options. + * @returns { AnimatorResult } animator result + * @throws { BusinessError } 401 - if parameter error. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ static create(options: AnimatorOptions): AnimatorResult; } diff --git a/api/@ohos.arkui.advanced.Filter.d.ets b/api/@ohos.arkui.advanced.Filter.d.ets index d8263fff6..7f484e9c5 100644 --- a/api/@ohos.arkui.advanced.Filter.d.ets +++ b/api/@ohos.arkui.advanced.Filter.d.ets @@ -23,6 +23,13 @@ import { ResourceStr } from 'GlobalResource'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Declare FilterType + * @enum { FilterType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare enum FilterType { MULTI_LINE_FILTER = 0, LIST_FILTER = 1 @@ -33,6 +40,12 @@ export declare enum FilterType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * This parameter is used to define the input of each filtering dimension. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare class FilterParams { /** * filter item name. @@ -40,6 +53,13 @@ export declare class FilterParams { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * filter item name. + * type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ name: ResourceStr; /** * filter options. @@ -47,6 +67,13 @@ export declare class FilterParams { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * filter options. + * type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ options: Array; } @@ -56,6 +83,13 @@ export declare class FilterParams { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * This parameter specifies the selection result of a filtering dimension. + * The index starts from 0. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare class FilterResult { /** * result name. @@ -63,6 +97,13 @@ export declare class FilterResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * result name. + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ name: ResourceStr; /** * result index. @@ -70,6 +111,13 @@ export declare class FilterResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * result index. + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ index: number; /** * result value. @@ -77,6 +125,13 @@ export declare class FilterResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * result value. + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ value: ResourceStr; } @@ -85,6 +140,12 @@ export declare class FilterResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Declare Filter.The Filter is used in scenarios where multi-dimensional filtering is required. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Component export declare struct Filter { /** @@ -92,6 +153,12 @@ export declare struct Filter { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Container in the user-defined filtering result display area. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @BuilderParam container: () => void; /** @@ -100,6 +167,13 @@ export declare struct Filter { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Multi-dimensional filtering parameters. + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Prop multiFilters: Array; /** @@ -108,6 +182,13 @@ export declare struct Filter { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * FilterParams, Additional filter item parameter. The filter item name is displayed and can be deselected. + * @type { FilterParams } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Prop additionFilters?: FilterParams; /** @@ -116,6 +197,13 @@ export declare struct Filter { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * FilterParams, Callback method after a user clicks a filter item. + * @param {filterType} FilterType, Filter display style type. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ onFilterChanged: (filterResults: Array) => void; /** @@ -124,5 +212,12 @@ export declare struct Filter { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * FilterType, Filter display style type. + * @type { FilterType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Prop filterType?: FilterType; } \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.ProgressButton.d.ets b/api/@ohos.arkui.advanced.ProgressButton.d.ets index 7256e5152..2c78a45fb 100644 --- a/api/@ohos.arkui.advanced.ProgressButton.d.ets +++ b/api/@ohos.arkui.advanced.ProgressButton.d.ets @@ -18,6 +18,12 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Declare Component ProgressButton + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Component export declare struct ProgressButton { /** @@ -26,6 +32,13 @@ export declare struct ProgressButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Sets the ProgressButton progress. + * @type { number }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Prop progress: number; /** @@ -34,6 +47,13 @@ export declare struct ProgressButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Sets the ProgressButton content. + * @type { string }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Prop content: string; /** @@ -42,12 +62,24 @@ export declare struct ProgressButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Sets the ProgressButton progressButtonWidth. + * @type { Length }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ progressButtonWidth?: Length; /** * Sets the ProgressButton clickCallback. * @since 10 */ + /** + * Sets the ProgressButton clickCallback. + * @atomicservice + * @since 11 + */ clickCallback: () => void; /** @@ -56,5 +88,12 @@ export declare struct ProgressButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Sets the ProgressButton enable state. + * @type { boolean }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Prop enable: boolean; } \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.SplitLayout.d.ets b/api/@ohos.arkui.advanced.SplitLayout.d.ets index e01c5f6f5..5c58738cd 100644 --- a/api/@ohos.arkui.advanced.SplitLayout.d.ets +++ b/api/@ohos.arkui.advanced.SplitLayout.d.ets @@ -22,12 +22,24 @@ import { ResourceStr } from 'GlobalResource'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Declare SplitLayout.The SplitLayout is used for upper and lower graphic layouts. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Component export declare struct SplitLayout { /** * Container in the user-defined splitlayout display area. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 + */ + /** + * Container in the user-defined splitlayout display area. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 */ @BuilderParam container: () => void; @@ -37,6 +49,13 @@ export declare struct SplitLayout { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Image in the layout. + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @State mainImage: ResourceStr; /** @@ -45,6 +64,13 @@ export declare struct SplitLayout { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Title text in the layout. + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Prop primaryText: ResourceStr; /** @@ -53,6 +79,13 @@ export declare struct SplitLayout { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Description text in the layout. + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Prop secondaryText?: ResourceStr; /** @@ -61,5 +94,12 @@ export declare struct SplitLayout { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Auxiliary text in the layout. + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Prop tertiaryText?: ResourceStr; } \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.SubHeader.d.ets b/api/@ohos.arkui.advanced.SubHeader.d.ets index 41eba960a..3ec329030 100644 --- a/api/@ohos.arkui.advanced.SubHeader.d.ets +++ b/api/@ohos.arkui.advanced.SubHeader.d.ets @@ -23,12 +23,25 @@ import { ResourceStr } from 'GlobalResource'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Control style of operation element + * @enum { OperationStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare enum OperationType { /** * The TextArrow style. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * The TextArrow style. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ TEXT_ARROW = 0, /** @@ -36,6 +49,12 @@ export declare enum OperationType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * The Button style. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ BUTTON = 1, /** @@ -43,6 +62,12 @@ export declare enum OperationType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * The IconGroup style. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ ICON_GROUP = 2, /** @@ -50,6 +75,12 @@ export declare enum OperationType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * The LoadingProgress style. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ LOADING = 3 } @@ -58,12 +89,24 @@ export declare enum OperationType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Declare type OperationOption + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare class OperationOption { /** * The content of text or the address of icon. * @type { ResourceStr }. * @since 10 */ + /** + * The content of text or the address of icon. + * @type { ResourceStr }. + * @atomicservice + * @since 11 + */ value: ResourceStr; /** @@ -71,6 +114,12 @@ export declare class OperationOption { * @type { () => void }. * @since 10 */ + /** + * callback function when operate the text or icon. + * @type { () => void }. + * @atomicservice + * @since 11 + */ action?: () => void; } @@ -79,12 +128,24 @@ export declare class OperationOption { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Declare type SelectOption + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare class SelectOptions { /** * SubOption array of the select. * @type { Array }. * @since 10 */ + /** + * SubOption array of the select. + * @type { Array }. + * @atomicservice + * @since 11 + */ options: Array; /** @@ -92,6 +153,12 @@ export declare class SelectOptions { * @type { number }. * @since 10 */ + /** + * The default selected index. + * @type { number }. + * @atomicservice + * @since 11 + */ selected?: number; /** @@ -99,6 +166,12 @@ export declare class SelectOptions { * @type { string }. * @since 10 */ + /** + * The default text value. + * @type { string }. + * @atomicservice + * @since 11 + */ value?: string; /** @@ -106,6 +179,12 @@ export declare class SelectOptions { * @type { (index: number, value?: string) => void }. * @since 10 */ + /** + * Callback when the select is selected. + * @type { (index: number, value?: string) => void }. + * @atomicservice + * @since 11 + */ onSelect?: (index: number, value?: string) => void; } @@ -114,6 +193,12 @@ export declare class SelectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Declare struct SubHeader + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Component export declare struct SubHeader { @@ -123,6 +208,13 @@ export declare struct SubHeader { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Icon resource of content area. + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Prop icon?: ResourceStr; /** @@ -131,6 +223,13 @@ export declare struct SubHeader { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * The first line text of content area. + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Prop primaryTitle?: ResourceStr; /** @@ -139,6 +238,13 @@ export declare struct SubHeader { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * The secondary line text of content area. + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Prop secondaryTitle?: ResourceStr; /** @@ -147,6 +253,13 @@ export declare struct SubHeader { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Select option of content area. + * @type { SelectOptions }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ select?: SelectOptions; /** @@ -155,6 +268,13 @@ export declare struct SubHeader { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Operation style of SubHeader. + * @type { OperationStyle }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Prop operationType?: OperationType; /** @@ -163,5 +283,12 @@ export declare struct SubHeader { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * operation item. + * @type { Array }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ operationItem?: Array; } \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.ToolBar.d.ets b/api/@ohos.arkui.advanced.ToolBar.d.ets index e1800f9df..fefdde830 100644 --- a/api/@ohos.arkui.advanced.ToolBar.d.ets +++ b/api/@ohos.arkui.advanced.ToolBar.d.ets @@ -23,24 +23,49 @@ import { ResourceStr } from 'GlobalResource'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Declare enum ItemState + * @enum { ItemState } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare enum ItemState { /** * Enable type. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Enable type. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ ENABLE = 1, /** * Disable type. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Disable type. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ DISABLE = 2, /** * Activate type. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Activate type. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ ACTIVATE = 3 } @@ -49,6 +74,12 @@ export declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Declare type ToolBarOption + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Observed export declare class ToolBarOption { /** @@ -56,23 +87,46 @@ export declare class ToolBarOption { * @type { ResourceStr }. * @since 10 */ + /** + * Define text content. + * @type { ResourceStr }. + * @atomicservice + * @since 11 + */ content: ResourceStr; /** * Define the action event. * @since 10 */ + /** + * Define the action event. + * @atomicservice + * @since 11 + */ action?: () => void; /** * Define icon resource. * @type { Resource }. * @since 10 */ + /** + * Define icon resource. + * @type { Resource }. + * @atomicservice + * @since 11 + */ icon?: Resource; /** * Define item type. * @type { Resource }. * @since 10 */ + /** + * Define item type. + * @type { Resource }. + * @atomicservice + * @since 11 + */ state?: ItemState; } @@ -81,6 +135,12 @@ export declare class ToolBarOption { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Declare ToolBarOptions use in ToolBar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Observed export declare class ToolBarOptions extends Array { } @@ -90,6 +150,12 @@ export declare class ToolBarOptions extends Array { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Declare Component ToolBar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Component export declare struct ToolBar { /** @@ -98,6 +164,13 @@ export declare struct ToolBar { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Define toolbar list array. + * @type { ToolBarOptions }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @ObjectLink toolBarList: ToolBarOptions; /** * Define toolbar activate item index, default is -1. @@ -105,6 +178,13 @@ export declare struct ToolBar { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Define toolbar activate item index, default is -1. + * @type { number }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ @Prop activateIndex?: number; /** * Define toolbar controller. @@ -112,5 +192,12 @@ export declare struct ToolBar { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Define toolbar controller. + * @type { TabsController }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ controller: TabsController; } \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.TreeView.d.ets b/api/@ohos.arkui.advanced.TreeView.d.ets index f8f8e63e7..cfcc45ad7 100644 --- a/api/@ohos.arkui.advanced.TreeView.d.ets +++ b/api/@ohos.arkui.advanced.TreeView.d.ets @@ -23,36 +23,73 @@ import { ResourceStr } from 'GlobalResource'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Control style of operation element + * @enum { TreeListenType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare enum TreeListenType { /** * register listener after a node is clicked. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * register listener after a node is clicked. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ NODE_CLICK = "NodeClick", /** * register listener after a node is add. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * register listener after a node is add. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ NODE_ADD = "NodeAdd", /** * register listener after a node is delected. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * register listener after a node is delected. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ NODE_DELETE = "NodeDelete", /** * register listener after a node is modified. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * register listener after a node is modified. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ NODE_MODIFY = "NodeModify", /** * register listener after a node is moved. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * register listener after a node is moved. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ NODE_MOVE = "NodeMove", } @@ -61,6 +98,12 @@ export declare enum TreeListenType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Declare class TreeListener + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare class TreeListener { /** * Event registration and processing. @@ -71,6 +114,16 @@ export declare class TreeListener { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Event registration and processing. + * The event will not be destroyed after being processed. + * + * @param { type } event Registered Events. + * @param callback. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ on(type: TreeListenType, callback: (callbackParam: CallbackParam) => void): void; /** @@ -82,6 +135,16 @@ export declare class TreeListener { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Event registration and processing. + * After the event is processed once, it will be destroyed. + * + * @param { type } event Registered Events. + * @param callback. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ once(type: TreeListenType, callback: (callbackParam: CallbackParam) => void): void; /** @@ -92,6 +155,15 @@ export declare class TreeListener { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Destroy event. + * + * @param { type } event Registered Events. + * @param callback. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ off(type: TreeListenType, callback?: (callbackParam: CallbackParam) => void): void; } @@ -100,6 +172,12 @@ export declare class TreeListener { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Declare class TreeListenerManager + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare class TreeListenerManager { /** * Get instance of treeListenerManager. @@ -108,6 +186,14 @@ export declare class TreeListenerManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Get instance of treeListenerManager. + * @return treeListenerManager instance + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ static getInstance(): TreeListenerManager; /** @@ -116,6 +202,13 @@ export declare class TreeListenerManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Get treeListener. + * @return treeListener object + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ getTreeListener(): TreeListener; } @@ -132,6 +225,13 @@ export declare struct TreeView { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Node data source of TreeView. + * @type TreeController + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ treeController: TreeController; } @@ -141,6 +241,13 @@ export declare struct TreeView { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Declare CallbackParam + * @typedef CallbackParam + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface CallbackParam { /** * Get the currentNodeId. @@ -148,6 +255,13 @@ export interface CallbackParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Get the currentNodeId. + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ currentNodeId: number, /** @@ -156,6 +270,13 @@ export interface CallbackParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Get the parentNodeId. + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ parentNodeId?: number, /** @@ -164,6 +285,13 @@ export interface CallbackParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Get the childIndex. + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ childIndex?: number } @@ -173,6 +301,13 @@ export interface CallbackParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Declare NodeParam + * @typedef NodeParam + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface NodeParam { /** * Set the parentNodeId. @@ -180,6 +315,13 @@ export interface NodeParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Set the parentNodeId. + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ parentNodeId?: number, /** @@ -188,6 +330,13 @@ export interface NodeParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Set currentNodeId. + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ currentNodeId?: number, /** @@ -196,6 +345,13 @@ export interface NodeParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Set catalog whether is floder. + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ isFolder?: boolean; /** @@ -204,6 +360,13 @@ export interface NodeParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Set the icon resource. + * @type { Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ icon?: ResourceStr; /** @@ -212,6 +375,13 @@ export interface NodeParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Set selected icon resource. + * @type { Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ selectedIcon?: ResourceStr; /** @@ -220,6 +390,13 @@ export interface NodeParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Set edit icon resource. + * @type { Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ editIcon?: ResourceStr; /** @@ -228,6 +405,13 @@ export interface NodeParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Set primary title content. + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ primaryTitle?: ResourceStr; /** @@ -236,6 +420,13 @@ export interface NodeParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Set secondary title content. + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ secondaryTitle?: ResourceStr; /** @@ -244,6 +435,13 @@ export interface NodeParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * set subcomponent binded on tree item. + * @type { () => void } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ container?: () => void; } @@ -252,6 +450,12 @@ export interface NodeParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ +/** + * Declare TreeController + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare class TreeController { /** * Delete a node. @@ -259,6 +463,13 @@ export declare class TreeController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Delete a node. + * Register an ON_ITEM_DELETE callback through the ListTreeListener mechanism to obtain the IDs of all deleted nodes. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ removeNode(): void; /** @@ -267,6 +478,13 @@ export declare class TreeController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Modify the node name. + * Register an ON_ITEM_MODIFY callback to obtain the ID, parent node ID, and node name of the modified node. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ modifyNode(): void; /** @@ -282,6 +500,20 @@ export declare class TreeController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * Initialize the interface of the tree view. This interface is used to generate ListNodeDataSource data. + * addNode is only designed for initialization. It can only be invoked during initialization. + * + * A maximum of 50 directory levels can be added. + * + * @param nodeParam Configuration information of the newly added node. + * + * For details, see the comment description of NodeParam. + * @return ListTreeNode Tree view component proxy class. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ addNode(nodeParam?: NodeParam): TreeController; /** @@ -294,6 +526,17 @@ export declare class TreeController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * This interface is called when a secondaryTitle needs to be updated + * + * @param parentId ID of the parent node. + * @param parentSubTitle secondaryTitle of parent node. + * @param currentSubtitle secondaryTitle of current node. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ refreshNode(parentId: number, parentSubTitle: ResourceStr, currentSubtitle: ResourceStr): void; /** @@ -304,5 +547,14 @@ export declare class TreeController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + /** + * After the initialization is complete by calling the addNode interface, + * call this interface to complete initialization. + * + * This interface must be called when you finish initializing the ListTreeView by addNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ buildDone(): void; } \ No newline at end of file diff --git a/api/@ohos.curves.d.ts b/api/@ohos.curves.d.ts index 35f383c5d..d4cbfea64 100644 --- a/api/@ohos.curves.d.ts +++ b/api/@ohos.curves.d.ts @@ -28,6 +28,15 @@ * @crossplatform * @since 10 */ +/** + * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. + * + * @namespace curves + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ declare namespace curves { /** * enum Curve. @@ -44,6 +53,15 @@ declare namespace curves { * @crossplatform * @since 10 */ + /** + * enum Curve. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ enum Curve { Linear, Ease, @@ -75,6 +93,15 @@ declare namespace curves { * @crossplatform * @since 10 */ + /** + * Interface for curve object. + * + * @typedef ICurve + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ interface ICurve { /** * Get curve value by fraction. @@ -93,6 +120,16 @@ declare namespace curves { * @crossplatform * @since 10 */ + /** + * Get curve value by fraction. + * + * @param { number } fraction + * @returns { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ interpolate(fraction: number): number; } @@ -113,6 +150,16 @@ declare namespace curves { * @crossplatform * @since 10 */ + /** + * Initializes the interpolator curve when called. + * + * @param { Curve } [curve] + * @returns { ICurve } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ function initCurve(curve?: Curve): ICurve; /** @@ -146,6 +193,17 @@ declare namespace curves { * @crossplatform * @since 10 */ + /** + * Constructs a step curve when called. + * + * @param { number } count + * @param { boolean } end + * @returns { ICurve } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ function stepsCurve(count: number, end: boolean): ICurve; /** @@ -157,6 +215,16 @@ declare namespace curves { * @crossplatform * @since 10 */ + /** + * Constructs a custom curve when called. + * + * @param { function } interpolate - fraction range is [0,1], the return number must between [0,1]. + * @returns { ICurve } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ function customCurve(interpolate: (fraction: number) => number): ICurve; /** @@ -195,6 +263,19 @@ declare namespace curves { * @crossplatform * @since 10 */ + /** + * Constructs a third-order Bezier curve when called. + * + * @param { number } x1 + * @param { number } y1 + * @param { number } x2 + * @param { number } y2 + * @returns { ICurve } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve; /** @@ -235,6 +316,19 @@ declare namespace curves { * @crossplatform * @since 10 */ + /** + * Constructs a spring curve when called. + * + * @param { number } velocity + * @param { number } mass + * @param { number } stiffness + * @param { number } damping + * @returns { ICurve } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve; /** @@ -273,6 +367,18 @@ declare namespace curves { * @crossplatform * @since 10 */ + /** + * Constructs a spring motion when called. + * + * @param { number } [response] + * @param { number } [dampingFraction] + * @param { number } [overlapDuration] + * @returns { ICurve } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; /** @@ -296,6 +402,18 @@ declare namespace curves { * @crossplatform * @since 10 */ + /** + * Constructs a responsive spring motion when called. + * + * @param { number } [response] + * @param { number } [dampingFraction] + * @param { number } [overlapDuration] + * @returns { ICurve } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; /** @@ -312,6 +430,21 @@ declare namespace curves { * @crossplatform * @since 10 */ + /** + * Constructs an interpolating spring curve when called, the animation duration can not be specified manually, + * and is determined by parameters of the curve. It produces values change from 0 to 1, and then uses interpolator + * to calculate the actual animation values. + * + * @param { number } velocity - the initial velocity of the spring, and is a normalized speed corresponding to the value changes from 0 to 1 + * @param { number } mass - the mass of object in the mass-damper-spring system + * @param { number } stiffness - the stiffness of spring + * @param { number } damping - the damping value of spring + * @returns { ICurve } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ function interpolatingSpring(velocity: number, mass: number, stiffness: number, damping: number): ICurve; } diff --git a/api/@ohos.matrix4.d.ts b/api/@ohos.matrix4.d.ts index 2b52ed4ce..e583caff5 100644 --- a/api/@ohos.matrix4.d.ts +++ b/api/@ohos.matrix4.d.ts @@ -28,6 +28,15 @@ * @crossplatform * @since 10 */ +/** + * Used to do matrix operations + * + * @namespace matrix4 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ declare namespace matrix4 { /** * Set translation parameters @@ -44,6 +53,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Set translation parameters + * + * @interface TranslateOption + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ interface TranslateOption { /** * Indicates the translation distance of the x-axis, in px. @@ -60,6 +78,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Indicates the translation distance of the x-axis, in px. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ x?: number; /** @@ -77,6 +104,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Indicates the translation distance of the y-axis, in px. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ y?: number; /** @@ -94,6 +130,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Indicates the translation distance of the z-axis, in px. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ z?: number; } @@ -112,6 +157,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Set scaling parameters + * + * @interface ScaleOption + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ interface ScaleOption { /** * Zoom factor of the x-axis. @@ -128,6 +182,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Zoom factor of the x-axis. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ x?: number; /** @@ -145,6 +208,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Zoom factor of the y-axis. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ y?: number; /** @@ -162,6 +234,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Zoom factor of the z-axis. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ z?: number; /** @@ -179,6 +260,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Transform the x-axis coordinate of the center point. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ centerX?: number; /** @@ -196,6 +286,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Transform the y-axis coordinate of the center point. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ centerY?: number; } @@ -214,6 +313,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Set Rotation Parameters. + * + * @interface RotateOption + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ interface RotateOption { /** * Axis of rotation vector x coordinate. @@ -230,6 +338,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Axis of rotation vector x coordinate. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ x?: number; /** @@ -247,6 +364,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Axis of rotation vector y coordinate. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ y?: number; /** @@ -264,6 +390,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Axis of rotation vector z coordinate. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ z?: number; /** @@ -281,6 +416,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Transform the x-axis coordinate of the center point. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ centerX?: number; /** @@ -298,6 +442,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Transform the y-axis coordinate of the center point. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ centerY?: number; /** @@ -315,6 +468,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Rotation angle. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ angle?: number; } @@ -333,6 +495,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Matrix4Transit. + * + * @interface Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ interface Matrix4Transit { /** * Copy function of Matrix, which can copy a copy of the current matrix object. @@ -349,6 +520,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Copy function of Matrix, which can copy a copy of the current matrix object. + * + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ copy(): Matrix4Transit; /** @@ -366,6 +546,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * The inverse function of Matrix returns an inverse matrix of the current matrix object, that is, the effect is exactly the opposite. + * + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ invert(): Matrix4Transit; /** @@ -385,6 +574,16 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Matrix superposition function, which can superpose the effects of two matrices to generate a new matrix object. + * + * @param { Matrix4Transit } options + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ combine(options: Matrix4Transit): Matrix4Transit; /** @@ -404,6 +603,16 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Matrix translation function, which can add the x-axis, Y-axis, or Z-axis translation effect to the current matrix. + * + * @param { TranslateOption } options + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ translate(options: TranslateOption): Matrix4Transit; /** @@ -423,6 +632,16 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Scaling function of the Matrix, which can add the x-axis, Y-axis, or Z-axis scaling effect to the current matrix. + * + * @param { ScaleOption } options + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ scale(options: ScaleOption): Matrix4Transit; /** @@ -442,6 +661,16 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Rotation function of the Matrix. You can add the x-axis, Y-axis, or Z-axis rotation effect to the current matrix. + * + * @param { RotateOption } options + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ rotate(options: RotateOption): Matrix4Transit; /** @@ -461,6 +690,16 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Matrix coordinate point conversion function, which can apply the current transformation effect to a coordinate point. + * + * @param { [number, number] } options + * @returns { [number, number] } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ transformPoint(options: [number, number]): [number, number]; } @@ -483,6 +722,17 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Constructor of Matrix, which can create a fourth-order matrix based on the input parameters. The matrix is column-first. + * + * @param { [number,number,number,number,number,number,number,number,number,number,number,number,number,number,number,number] } options + * options indicates a fourth-order matrix + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ function init( options: [ number, @@ -519,6 +769,15 @@ declare namespace matrix4 { * @crossplatform * @since 10 */ + /** + * Matrix initialization function, which can return an identity matrix object. + * + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ function identity(): Matrix4Transit; /** diff --git a/api/@system.app.d.ts b/api/@system.app.d.ts index 0b0ea38c1..d527a45be 100644 --- a/api/@system.app.d.ts +++ b/api/@system.app.d.ts @@ -65,6 +65,14 @@ export interface AppResponse { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ +/** + * Defines the option of screenOnVisible interface. + * + * @interface ScreenOnVisibleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface ScreenOnVisibleOptions { /** * Whether to keep the application visible. The default value is false. @@ -73,6 +81,14 @@ export interface ScreenOnVisibleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Whether to keep the application visible. The default value is false. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ visible?: boolean; /** @@ -82,6 +98,14 @@ export interface ScreenOnVisibleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Called when the application always keeps visible. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ success?: () => void; /** @@ -91,6 +115,14 @@ export interface ScreenOnVisibleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Called when the application fails to keep visible. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ fail?: (data: string, code: number) => void; /** @@ -100,6 +132,14 @@ export interface ScreenOnVisibleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Called when the execution is completed. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ complete?: () => void; } @@ -110,6 +150,14 @@ export interface ScreenOnVisibleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ +/** + * Defines the option of RequestFullWindow interface. + * + * @interface RequestFullWindowOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface RequestFullWindowOptions { /** * Defines the number of animation options. @@ -118,6 +166,14 @@ export interface RequestFullWindowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Defines the number of animation options. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ duration: number; } diff --git a/api/@system.mediaquery.d.ts b/api/@system.mediaquery.d.ts index 8f1bb5a7b..17b9a8268 100644 --- a/api/@system.mediaquery.d.ts +++ b/api/@system.mediaquery.d.ts @@ -20,6 +20,14 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ +/** + * Defines the MediaQuery event. + * + * @interface MediaQueryEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface MediaQueryEvent { /** * The result of match result. @@ -28,6 +36,14 @@ export interface MediaQueryEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * The result of match result. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ matches: boolean; } @@ -38,6 +54,14 @@ export interface MediaQueryEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ +/** + * Defines the MediaQuery list info. + * + * @interface MediaQueryList + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface MediaQueryList { /** * Serialized media query condition. @@ -47,6 +71,15 @@ export interface MediaQueryList { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Serialized media query condition. + * This parameter is read-only. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ media?: string; /** @@ -57,6 +90,15 @@ export interface MediaQueryList { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Whether the query is successful. True if the query condition is matched successfully, false otherwise. + * This parameter is read-only. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ matches?: boolean; /** @@ -66,6 +108,14 @@ export interface MediaQueryList { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Called when the matches value changes. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ onchange?: (matches: boolean) => void; /** @@ -76,6 +126,15 @@ export interface MediaQueryList { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Adds a listening function to MediaQueryList. + * The listening function must be added before onShow is called, that is, added to the onInit or onReady function. + * + * @param { function } callback + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ addListener(callback: (event: MediaQueryEvent) => void): void; /** @@ -85,6 +144,14 @@ export interface MediaQueryList { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Removes a listening function from MediaQueryList. + * + * @param { function } callback + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ removeListener(callback: (event: MediaQueryEvent) => void): void; } @@ -94,6 +161,13 @@ export interface MediaQueryList { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ +/** + * Defines the mediaquery interface. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export default class MediaQuery { /** * Queries a media item and returns a MediaQueryList object. @@ -103,5 +177,14 @@ export default class MediaQuery { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Queries a media item and returns a MediaQueryList object. + * + * @param { string } condition + * @returns { MediaQueryList } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ static matchMedia(condition: string): MediaQueryList; } diff --git a/api/@system.prompt.d.ts b/api/@system.prompt.d.ts index 7d3471773..df42c6057 100644 --- a/api/@system.prompt.d.ts +++ b/api/@system.prompt.d.ts @@ -114,6 +114,14 @@ export interface Button { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ +/** + * Defines the response of ShowDialog. + * + * @interface ShowDialogSuccessResponse + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface ShowDialogSuccessResponse { /** * Defines the index of data. @@ -122,6 +130,14 @@ export interface ShowDialogSuccessResponse { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Defines the index of data. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ index: number; } @@ -132,6 +148,14 @@ export interface ShowDialogSuccessResponse { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ +/** + * Defines the option of show dialog. + * + * @interface ShowDialogOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface ShowDialogOptions { /** * Title of the text to display. @@ -140,6 +164,14 @@ export interface ShowDialogOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Title of the text to display. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ title?: string; /** @@ -149,6 +181,14 @@ export interface ShowDialogOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Text body. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ message?: string; /** @@ -160,6 +200,16 @@ export interface ShowDialogOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Array of buttons in the dialog box. + * The array structure is {text:'button', color: '#666666'}. + * One to three buttons are supported. The first button is of the positiveButton type, the second is of the negativeButton type, and the third is of the neutralButton type. + * + * @type { ?[Button, Button?, Button?] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ buttons?: [Button, Button?, Button?]; /** @@ -169,6 +219,14 @@ export interface ShowDialogOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Called when the dialog box is displayed. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ success?: (data: ShowDialogSuccessResponse) => void; /** @@ -178,6 +236,14 @@ export interface ShowDialogOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Called when the operation is cancelled. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ cancel?: (data: string, code: string) => void; /** @@ -187,6 +253,14 @@ export interface ShowDialogOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Called when the dialog box is closed. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ complete?: (data: string) => void; } @@ -197,6 +271,14 @@ export interface ShowDialogOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ +/** + * Defines the option of ShowActionMenu. + * + * @interface ShowActionMenuOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface ShowActionMenuOptions { /** * Title of the text to display. @@ -205,6 +287,14 @@ export interface ShowActionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Title of the text to display. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ title?: string; /** @@ -216,6 +306,16 @@ export interface ShowActionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Array of buttons in the dialog box. + * The array structure is {text:'button', color: '#666666'}. + * One to six buttons are supported. + * + * @type { [Button, Button?, Button?, Button?, Button?, Button?] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ buttons: [Button, Button?, Button?, Button?, Button?, Button?]; /** @@ -225,6 +325,14 @@ export interface ShowActionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Called when the dialog box is displayed. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ success?: (tapIndex: number, errMsg: string) => void; /** @@ -234,6 +342,14 @@ export interface ShowActionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Called when the operation is cancelled. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ fail?: (errMsg: string) => void; /** @@ -243,6 +359,14 @@ export interface ShowActionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Called when the dialog box is closed. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ complete?: () => void; } @@ -252,6 +376,13 @@ export interface ShowActionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ +/** + * Defines the prompt interface. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export default class Prompt { /** * Displays the notification text. @@ -260,6 +391,14 @@ export default class Prompt { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Displays the notification text. + * + * @param { ShowToastOptions } options - Options. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ static showToast(options: ShowToastOptions): void; /** @@ -269,6 +408,14 @@ export default class Prompt { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Displays the dialog box. + * + * @param { ShowDialogOptions } options - Options. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ static showDialog(options: ShowDialogOptions): void; /** @@ -278,5 +425,13 @@ export default class Prompt { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Displays the menu. + * + * @param { ShowActionMenuOptions } options - Options. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ static showActionMenu(options: ShowActionMenuOptions): void; } diff --git a/api/common/full/canvaspattern.d.ts b/api/common/full/canvaspattern.d.ts index 98ba5b3ce..0ac9265eb 100644 --- a/api/common/full/canvaspattern.d.ts +++ b/api/common/full/canvaspattern.d.ts @@ -28,6 +28,15 @@ * @since 9 * @form */ +/** + * Describes an opaque object of a template, which is created using the createPattern() method. + * + * @interface CanvasPattern + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + * @form + */ export interface CanvasPattern { /** * Adds the matrix transformation effect to the current template. @@ -44,6 +53,15 @@ export interface CanvasPattern { * @since 9 * @form */ + /** + * Adds the matrix transformation effect to the current template. + * + * @param { Matrix2D } [transform] - transformation matrix + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + * @form + */ setTransform(transform?: Matrix2D): void; } @@ -60,6 +78,14 @@ export interface CanvasPattern { * @since 9 * @form */ +/** + * 2D transformation matrix, supporting rotation, translation, and scaling of the X-axis and Y-axis + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + * @form + */ export class Matrix2D { /** * Horizontal Zoom @@ -76,6 +102,15 @@ export class Matrix2D { * @since 9 * @form */ + /** + * Horizontal Zoom + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + * @form + */ scaleX?: number; /** @@ -93,6 +128,15 @@ export class Matrix2D { * @since 9 * @form */ + /** + * Vertical Tilt + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + * @form + */ rotateY?: number; /** @@ -110,6 +154,15 @@ export class Matrix2D { * @since 9 * @form */ + /** + * Horizontal Tilt + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + * @form + */ rotateX?: number; /** @@ -127,6 +180,15 @@ export class Matrix2D { * @since 9 * @form */ + /** + * Vertical Zoom + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + * @form + */ scaleY?: number; /** @@ -144,6 +206,15 @@ export class Matrix2D { * @since 9 * @form */ + /** + * Horizontal movement + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + * @form + */ translateX?: number; /** @@ -161,6 +232,15 @@ export class Matrix2D { * @since 9 * @form */ + /** + * Vertical movement + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + * @form + */ translateY?: number; /** @@ -180,6 +260,16 @@ export class Matrix2D { * @since 9 * @form */ + /** + * Transforms the current 2D matrix back to the identity matrix (i.e., without any rotational + * translation scaling effect) + * + * @returns { Matrix2D } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + * @form + */ identity(): Matrix2D; /** @@ -199,6 +289,16 @@ export class Matrix2D { * @since 9 * @form */ + /** + * Transform the current 2D matrix into an inverse matrix (that is, the transformation effect + * is the opposite effect of the original) + * + * @returns { Matrix2D } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + * @form + */ invert(): Matrix2D; /** @@ -220,6 +320,17 @@ export class Matrix2D { * @since 9 * @form */ + /** + * The matrix is superimposed in right multiplication mode. When the input parameter is empty, + * the matrix is superimposed. + * + * @param { Matrix2D } [other] - Matrix to be superimposed + * @returns { Matrix2D } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + * @form + */ multiply(other?: Matrix2D): Matrix2D; /** @@ -241,6 +352,17 @@ export class Matrix2D { * @since 9 * @form */ + /** + * Adds the rotation effect of the X and Y axes to the current matrix. + * + * @param { number } [rx] - Rotation effect of the X axis + * @param { number } [ry] - Rotation effect of the Y-axis + * @returns { Matrix2D } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + * @form + */ rotate(rx?: number, ry?: number): Matrix2D; /** @@ -262,6 +384,17 @@ export class Matrix2D { * @since 9 * @form */ + /** + * Adds the translation effect of the X and Y axes to the current matrix. + * + * @param { number } [tx] - X-axis translation effect + * @param { number } [ty] - Y-axis translation effect + * @returns { Matrix2D } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + * @form + */ translate(tx?: number, ty?: number): Matrix2D; /** @@ -283,6 +416,17 @@ export class Matrix2D { * @since 9 * @form */ + /** + * Adds the scaling effect of the X and Y axes to the current matrix. + * + * @param { number } [sx] - X-axis scaling effect + * @param { number } [sy] - Y-axis scaling effect + * @returns { Matrix2D } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + * @form + */ scale(sx?: number, sy?: number): Matrix2D; /** @@ -298,5 +442,13 @@ export class Matrix2D { * @since 9 * @form */ + /** + * Constructs a 2D change matrix object. The default value is the unit matrix. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + * @form + */ constructor(); } diff --git a/api/common/full/console.d.ts b/api/common/full/console.d.ts index 5c6b6d6c9..057ce69b3 100644 --- a/api/common/full/console.d.ts +++ b/api/common/full/console.d.ts @@ -17,6 +17,11 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ +/** + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare class console { /** * Prints "debug" logs. @@ -26,6 +31,15 @@ export declare class console { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Prints "debug" logs. + * + * @param { string } message - Text to print. + * @param { any[] } arguments + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ static debug(message: string, ...arguments: any[]): void; /** @@ -36,6 +50,15 @@ export declare class console { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Prints "log" logs. + * + * @param { string } message - Text to print. + * @param { any[] } arguments + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ static log(message: string, ...arguments: any[]): void; /** @@ -46,6 +69,15 @@ export declare class console { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Prints "info" logs. + * + * @param { string } message - Text to print. + * @param { any[] } arguments + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ static info(message: string, ...arguments: any[]): void; /** @@ -56,6 +88,15 @@ export declare class console { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Prints "warn" logs. + * + * @param { string } message - Text to print. + * @param { any[] } arguments + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ static warn(message: string, ...arguments: any[]): void; /** @@ -66,5 +107,14 @@ export declare class console { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Prints "error" logs. + * + * @param { string } message - Text to print. + * @param { any[] } arguments + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ static error(message: string, ...arguments: any[]): void; } diff --git a/api/common/full/dom.d.ts b/api/common/full/dom.d.ts index 1b735eeb5..2e0ea16e5 100644 --- a/api/common/full/dom.d.ts +++ b/api/common/full/dom.d.ts @@ -21,6 +21,13 @@ import { Element } from './viewmodel'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ +/** + * global dom + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare class dom { /** * create a dynamic dom by tag, return element @@ -30,5 +37,14 @@ export declare class dom { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ + /** + * create a dynamic dom by tag, return element + * + * @param { string } tag - dom tag + * @returns { Element } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ static createElement(tag: string): Element } diff --git a/api/common/full/global.d.ts b/api/common/full/global.d.ts index ff3ce5d35..34ab3192b 100644 --- a/api/common/full/global.d.ts +++ b/api/common/full/global.d.ts @@ -52,6 +52,15 @@ export declare function setTimeout(handler: Function | string, delay?: number, . * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ +/** + * Sets a vsync after which a function will be executed. + * + * @param { Function } handler - Indicates the function to be called when the vsync trigger. + * @returns { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare function requestAnimationFrame(handler: Function): number; /** @@ -61,6 +70,14 @@ export declare function requestAnimationFrame(handler: Function): number; * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ +/** + * Cancels the vsync callback set by "requestAnimationFrame()". + * + * @param { number } requestId - Indicates the vsync callback ID returned by "requestAnimationFrame()". + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare function cancelAnimationFrame(requestId: number): void; /** @@ -119,6 +136,13 @@ export declare function getApp(): object; * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * You can create an Image object by calling new Image(). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare class Image { /** * Network address or local resource. The internal URI is supported. @@ -127,6 +151,14 @@ export declare class Image { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Network address or local resource. The internal URI is supported. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ src: string; /** * Image width. @@ -135,6 +167,14 @@ export declare class Image { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Image width. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ width?: number; /** * Image height. @@ -143,6 +183,14 @@ export declare class Image { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Image height. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ height?: number; /** * Called when an image is successfully loaded. This function has no parameter. @@ -151,6 +199,14 @@ export declare class Image { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Called when an image is successfully loaded. This function has no parameter. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ onload?: () => void; /** * Called when an image fails to be loaded. This function has no parameter. @@ -159,6 +215,14 @@ export declare class Image { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Called when an image fails to be loaded. This function has no parameter. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ onerror?: () => void; } @@ -168,6 +232,13 @@ export declare class Image { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * An ImageData object is a common object that stores the actual pixel data of a Canvas object. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare class ImageData { /** * Actual width of the ImageData object, in pixels. @@ -176,6 +247,14 @@ export declare class ImageData { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Actual width of the ImageData object, in pixels. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ width: number; /** * Actual height of the ImageData object, in pixels. @@ -184,6 +263,14 @@ export declare class ImageData { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Actual height of the ImageData object, in pixels. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ height: number; /** * A one-dimensional array of color values. The color values are sorted in the RGBA order and represented by integers from 0 to 255. @@ -192,6 +279,14 @@ export declare class ImageData { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * A one-dimensional array of color values. The color values are sorted in the RGBA order and represented by integers from 0 to 255. + * + * @type { Uint8ClampedArray } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ data: Uint8ClampedArray; } @@ -202,6 +297,14 @@ export declare class ImageData { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ +/** + * OffscreenCanvas provides a Canvas object that can be rendered off-screen. + * It works in both window and Web worker environments. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare class OffscreenCanvas { /** * The width of the offScreen Canvas object @@ -212,6 +315,16 @@ export declare class OffscreenCanvas { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ + /** + * The width of the offScreen Canvas object + * The height of the offScreen Canvas object + * + * @param { number } width + * @param { number } height + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ constructor(width: number, height: number); /** @@ -221,6 +334,14 @@ export declare class OffscreenCanvas { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ + /** + * The width of the offScreen Canvas object + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ width: number; /** @@ -230,6 +351,14 @@ export declare class OffscreenCanvas { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ + /** + * The height of the offScreen Canvas object + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ height: number; /** @@ -241,6 +370,16 @@ export declare class OffscreenCanvas { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ + /** + * Gets the context object for off-screen drawing. + * + * @param { "2d" } contextId - creates a CanvasRenderingContext2D object representing a two-dimensional rendering context. + * @param { CanvasRenderingContext2DSettings } [options] - object representing a three-dimensional rendering context. + * @returns { OffscreenCanvasRenderingContext2D } a render canvas for the offScreen Canvas object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ getContext(contextId: "2d", options?: CanvasRenderingContext2DSettings): OffscreenCanvasRenderingContext2D; /** @@ -252,6 +391,16 @@ export declare class OffscreenCanvas { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ + /** + * Converts the draw contents of the current off-screen draw object to a string in the form of a Blob. + * + * @param { string } [type] - indicating the image format. + * @param { number } [quality] - between 0 and 1 indicating image quality if the type option is image/jpeg or image/webp. + * @returns { string } A Promise returning a Blob object representing the image contained in the canvas. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ toDataURL(type?: string, quality?: number): string; /** @@ -261,6 +410,14 @@ export declare class OffscreenCanvas { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ + /** + * Converts the draw content in the current off-screen draw object to a Bitmap object. + * + * @returns { ImageBitmap } Returns An ImageBitmap object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ transferToImageBitmap(): ImageBitmap; } @@ -270,6 +427,13 @@ export declare class OffscreenCanvas { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ +/** + * Defines the ImageBitmap. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export declare class ImageBitmap { /** * The height of the Image Bitmap object. @@ -278,6 +442,14 @@ export declare class ImageBitmap { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ + /** + * The height of the Image Bitmap object. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ readonly height: number; /** @@ -287,6 +459,14 @@ export declare class ImageBitmap { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ + /** + * The width of the Image Bitmap object. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ readonly width: number; } diff --git a/api/common/full/viewmodel.d.ts b/api/common/full/viewmodel.d.ts index 38fde80b2..7c6f02b14 100644 --- a/api/common/full/viewmodel.d.ts +++ b/api/common/full/viewmodel.d.ts @@ -24,6 +24,14 @@ import { CanvasPattern } from './canvaspattern'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ +/** + * Defines the focus param. + * + * @interface FocusParamObj + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface FocusParamObj { /** * Whether needs to focus. @@ -32,6 +40,14 @@ export interface FocusParamObj { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ + /** + * Whether needs to focus. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ focus: boolean; } @@ -42,30 +58,62 @@ export interface FocusParamObj { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ +/** + * RectObj + * + * @interface RectObj + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface RectObj { /** * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ width: number; /** * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ height: number; /** * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ left: number; /** * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ top: number; } @@ -76,12 +124,26 @@ export interface RectObj { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ +/** + * ContextAttrOptions + * + * @interface ContextAttrOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface ContextAttrOptions { /** * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ antialias: boolean; } @@ -92,6 +154,14 @@ export interface ContextAttrOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * AnimateStyle + * + * @interface AnimateStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface AnimateStyle { /** * Width value applied to the component after the animation is executed. @@ -100,6 +170,14 @@ export interface AnimateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Width value applied to the component after the animation is executed. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ width: number; /** * Height value applied to the component after the animation is executed. @@ -108,6 +186,14 @@ export interface AnimateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Height value applied to the component after the animation is executed. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ height: number; /** * left offset applied to the component after the animation is executed. @@ -116,6 +202,14 @@ export interface AnimateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * left offset applied to the component after the animation is executed. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ left: number; /** * top offset applied to the component after the animation is executed. @@ -124,6 +218,14 @@ export interface AnimateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * top offset applied to the component after the animation is executed. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ top: number; /** * right offset applied to the component after the animation is executed. @@ -132,6 +234,14 @@ export interface AnimateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * right offset applied to the component after the animation is executed. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ right: number; /** * bottom offset applied to the component after the animation is executed. @@ -140,6 +250,14 @@ export interface AnimateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * bottom offset applied to the component after the animation is executed. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ bottom: number; /** * Background color applied to the component after the animation is executed. @@ -149,6 +267,15 @@ export interface AnimateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Background color applied to the component after the animation is executed. + * The default value is none. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ backgroundColor: string; /** * Opacity applied to the component. The value ranges from 0 to 1. @@ -158,6 +285,15 @@ export interface AnimateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Opacity applied to the component. The value ranges from 0 to 1. + * The default value is 1. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ opacity: number; /** * The value format is "x y", in percentage or pixels. @@ -168,6 +304,16 @@ export interface AnimateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * The value format is "x y", in percentage or pixels. + * The first value indicates the horizontal position, and the second value indicates the vertical position. + * If only one value is specified, the other value is 50% by default. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ backgroundPosition: string; /** * Origin position of the transformed element. @@ -178,6 +324,16 @@ export interface AnimateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Origin position of the transformed element. + * The first value indicates the x-axis position. The value can be left, center, right, a length, or percentage. + * The second value indicates the y-axis position. The value can be top, center, bottom, a length, or a percentage. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ transformOrigin: string; /** * Transformation type applied to an element. @@ -186,6 +342,14 @@ export interface AnimateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Transformation type applied to an element. + * + * @type { "none" | TransformObject } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ transform: "none" | TransformObject; /** * The value of offset must be within (0.0,1.0] and sorted in ascending order if it is provided. @@ -196,6 +360,16 @@ export interface AnimateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * The value of offset must be within (0.0,1.0] and sorted in ascending order if it is provided. + * If there are only two frames, offset can be left empty. + * If there are more than two frames, offset is mandatory. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ offset?: number; } @@ -206,6 +380,14 @@ export interface AnimateStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * TransformObject + * + * @interface TransformObject + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface TransformObject { /** * Defines a 2D transformation, using a matrix of six values.. @@ -219,6 +401,19 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Defines a 2D transformation, using a matrix of six values.. + * + * @param { number } scaleX - the scale value for x-axis + * @param { number } skewX - the skew value for y-axis + * @param { number } skewY - the skew value for x-axis + * @param { number } scaleY - the scale value for y-axis + * @param { number } translateX - the translate value for x-axis + * @param { number } translateY - the translate value for y-axis + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ matrix(scaleX: number, skewX: number, skewY: number, scaleY: number, translateX: number, translateY: number): void; /** * Defines a 3D transformation using a 4x4 matrix of 16 values. @@ -242,6 +437,29 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Defines a 3D transformation using a 4x4 matrix of 16 values. + * + * @param { number } n00 - the value of the 0 row and 0 column of the 4x4 matrix + * @param { number } n01 - the value of the 0 row and 1 column of the 4x4 matrix + * @param { number } n02 - the value of the 0 row and 2 column of the 4x4 matrix + * @param { number } n03 - the value of the 0 row and 3 column of the 4x4 matrix + * @param { number } n10 - the value of the 1 row and 0 column of the 4x4 matrix + * @param { number } n11 - the value of the 1 row and 1 column of the 4x4 matrix + * @param { number } n12 - the value of the 1 row and 2 column of the 4x4 matrix + * @param { number } n13 - the value of the 1 row and 3 column of the 4x4 matrix + * @param { number } n20 - the value of the 2 row and 0 column of the 4x4 matrix + * @param { number } n21 - the value of the 2 row and 1 column of the 4x4 matrix + * @param { number } n22 - the value of the 2 row and 2 column of the 4x4 matrix + * @param { number } n23 - the value of the 2 row and 3 column of the 4x4 matrix + * @param { number } n30 - the value of the 3 row and 0 column of the 4x4 matrix + * @param { number } n31 - the value of the 3 row and 1 column of the 4x4 matrix + * @param { number } n32 - the value of the 3 row and 2 column of the 4x4 matrix + * @param { number } n33 - the value of the 3 row and 3 column of the 4x4 matrix + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ matrix3d( n00: number, n01: number, @@ -268,6 +486,15 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Defines 2D transformations for translation of the X and Y axes + * + * @param { number } x - the translate value for x-axis + * @param { number } y - the translate value for y-axis + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ translate(x: number, y: number): void; /** * Defines 3D transformations for translation of the X / Y / Z axes @@ -278,6 +505,16 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Defines 3D transformations for translation of the X / Y / Z axes + * + * @param { number } x - the translate value for x-axis + * @param { number } y - the translate value for y-axis + * @param { number } z - the translate value for z-axis + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ translate3d(x: number, y: number, z: number): void; /** * Defines 2D transformations for translation of the X axes @@ -286,6 +523,14 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Defines 2D transformations for translation of the X axes + * + * @param { number } x - the translate value for x-axis + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ translateX(x: number): void; /** * Defines 2D transformations for translation of the Y axes @@ -294,6 +539,14 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Defines 2D transformations for translation of the Y axes + * + * @param { number } y - the translate value for y-axis + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ translateY(y: number): void; /** * Defines 3D transformations for translation of the Z axes @@ -302,6 +555,14 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Defines 3D transformations for translation of the Z axes + * + * @param { number } z the translate value for z-axis + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ translateZ(z: number): void; /** * Defines 2D transformations for scaling of the X and Y axes @@ -311,6 +572,15 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Defines 2D transformations for scaling of the X and Y axes + * + * @param { number } x - the scale value for x-axis + * @param { number } y - the scale value for y-axis + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ scale(x: number, y: number): void; /** * Defines 3D transformations for scaling of the X / Y / Z axes @@ -321,6 +591,16 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Defines 3D transformations for scaling of the X / Y / Z axes + * + * @param { number } x - the scale value for x-axis + * @param { number } y - the scale value for y-axis + * @param { number } z - the scale value for z-axis + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ scale3d(x: number, y: number, z: number): void; /** * Defines 2D transformations for scaling of the X axes @@ -329,6 +609,14 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Defines 2D transformations for scaling of the X axes + * + * @param { number } x - the scale value for x-axis + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ scaleX(x: number): void; /** * Defines 2D transformations for scaling of the Y axes @@ -337,6 +625,14 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Defines 2D transformations for scaling of the Y axes + * + * @param { number } y - the scale value for y-axis + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ scaleY(y: number): void; /** * Defines 3D transformations for scaling of the Z axes @@ -345,6 +641,14 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Defines 3D transformations for scaling of the Z axes + * + * @param { number } z - the scale value for z-axis + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ scaleZ(z: number): void; /** * Define the 2D rotation and specify the angle in the parameters. @@ -353,6 +657,14 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Define the 2D rotation and specify the angle in the parameters. + * + * @param { number } angle - the rotate value for z-axis + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ rotate(angle: number): void; /** * Defines a 3D transformation for rotating the X / Y / Z axes. @@ -364,6 +676,17 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Defines a 3D transformation for rotating the X / Y / Z axes. + * + * @param { number } x - the vector value of the x-axis + * @param { number } y - the vector value of the y-axis + * @param { number } z - the vector value of the z-axis + * @param { number } angle - the rotate value for x&y&z vector. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ rotate3d(x: number, y: number, z: number, angle: number): void; /** * Defines 3D transformations for rotating of the X axes. @@ -372,6 +695,14 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Defines 3D transformations for rotating of the X axes. + * + * @param { number } angle - the scale value for x-axis + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ rotateX(angle: number): void; /** * Defines 3D transformations for rotating of the Y axes. @@ -380,6 +711,14 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Defines 3D transformations for rotating of the Y axes. + * + * @param { number } angle - the scale value for y-axis + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ rotateY(angle: number): void; /** * Defines 3D transformations for rotating of the Z axes. @@ -388,6 +727,14 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Defines 3D transformations for rotating of the Z axes. + * + * @param { number } angle - the scale value for z-axis + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ rotateZ(angle: number): void; /** * Defines the 2D skew transition along the X and Y axes. @@ -397,6 +744,15 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Defines the 2D skew transition along the X and Y axes. + * + * @param { number } xAngle - the angle of inclination along the x axis. + * @param { number } yAngle - the angle of inclination along the y axis. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ skew(xAngle: number, yAngle: number): void; /** * Defines the 2D skew transition along the X axes. @@ -405,6 +761,14 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Defines the 2D skew transition along the X axes. + * + * @param { number } angle - the angle of inclination along the x axis. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ skewX(angle: number): void; /** * Defines the 2D skew transition along the Y axes. @@ -413,6 +777,14 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Defines the 2D skew transition along the Y axes. + * + * @param { number } angle - the angle of inclination along the y axis. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ skewY(angle: number): void; /** * Defines a perspective view for the 3D transformation element. @@ -421,6 +793,14 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Defines a perspective view for the 3D transformation element. + * + * @param { number } verticalDistance - the vertical distance from the observation point to the component plane. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ perspective(verticalDistance: number): void; } @@ -431,6 +811,14 @@ export interface TransformObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * AnimateOptions + * + * @interface AnimateOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface AnimateOptions { /** * Duration of the animation, in milliseconds. @@ -440,6 +828,15 @@ export interface AnimateOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Duration of the animation, in milliseconds. + * The default value is 0. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ duration: number; /** @@ -466,6 +863,31 @@ export interface AnimateOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Time curve of the animation. For details about the supported types. + * linear The animation speed keeps unchanged. + * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0). + * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0). + * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0). + * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0). + * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0). + * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0). + * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0). + * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0). + * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0). + * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0). + * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0). + * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0). + * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. + * The x and y values of each input parameter must be between 0 and 1. + * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end. + * The default value is ease. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ easing: string; /** @@ -476,6 +898,15 @@ export interface AnimateOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Delay for the animation start. The default value indicates no delay. + * The default value is 0. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ delay: number; /** @@ -487,6 +918,16 @@ export interface AnimateOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Number of times the animation will be played. number indicates a fixed number of playback operations, + * and Infinity indicates an unlimited number of playback operations. + * The default value is 1. + * + * @type { number | string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ iterations: number | string; /** @@ -497,6 +938,15 @@ export interface AnimateOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * The animation playback mode. + * The default value is "normal". + * + * @type { "normal" | "reverse" | "alternate" | "alternate-reverse" } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ direction: "normal" | "reverse" | "alternate" | "alternate-reverse"; /** @@ -508,6 +958,16 @@ export interface AnimateOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Whether to resume to the initial state after the animation is executed. + * none: The initial state is restored after the animation is executed. + * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed. + * + * @type { "none" | "forwards" | "backwards" | "both" } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ fill: "none" | "forwards" | "backwards" | "both"; } @@ -518,6 +978,14 @@ export interface AnimateOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * AnimationResult + * + * @interface AnimationResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface AnimationResult { /** * Read-only attribute, which indicates whether the animation playback is complete. @@ -526,6 +994,14 @@ export interface AnimationResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Read-only attribute, which indicates whether the animation playback is complete. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ finished: boolean; /** * Read-only attribute, which indicates whether an animation is waiting for the completion of other asynchronous operations @@ -535,6 +1011,15 @@ export interface AnimationResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Read-only attribute, which indicates whether an animation is waiting for the completion of other asynchronous operations + * (for example, start an animation with a delay). + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ pending: boolean; /** * Animation running state: @@ -547,6 +1032,18 @@ export interface AnimationResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Animation running state: + * idle: The animation is not running (playback ended or not started). + * running: The animation is running. + * paused: The animation is paused. + * finished: Animation playback ends. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ playstate: string; /** * Animation start time. This attribute is similar to that of delay in the options parameters. @@ -555,6 +1052,14 @@ export interface AnimationResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Animation start time. This attribute is similar to that of delay in the options parameters. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ startTime: number; /** * Starts the animation. @@ -562,6 +1067,13 @@ export interface AnimationResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Starts the animation. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ play(): void; /** * Ends the animation. @@ -569,6 +1081,13 @@ export interface AnimationResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Ends the animation. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ finish(): void; /** * Pauses the animation. @@ -576,6 +1095,13 @@ export interface AnimationResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Pauses the animation. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ pause(): void; /** * Cancels the animation. @@ -583,6 +1109,13 @@ export interface AnimationResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Cancels the animation. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ cancel(): void; /** * Plays the animation in reverse direction. @@ -590,6 +1123,13 @@ export interface AnimationResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Plays the animation in reverse direction. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ reverse(): void; /** * The animation is started. @@ -598,6 +1138,14 @@ export interface AnimationResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * The animation is started. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ onstart: () => void; /** * The animation is finished. @@ -606,6 +1154,14 @@ export interface AnimationResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * The animation is finished. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ onfinish: () => void; /** * The animation is canceled. @@ -614,6 +1170,14 @@ export interface AnimationResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * The animation is canceled. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ oncancel: () => void; /** * The animation is repeated. @@ -622,6 +1186,14 @@ export interface AnimationResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * The animation is repeated. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ onrepeat: () => void; } @@ -632,6 +1204,14 @@ export interface AnimationResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * Element + * + * @interface Element + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface Element { /** * Requests or cancels the focus for a component. @@ -643,6 +1223,17 @@ export interface Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Requests or cancels the focus for a component. + * If focus is set to true, the focus is requested for the component. + * If focus is set to false, the focus is canceled for the component. + * This attribute can be defaulted to true. + * + * @param { FocusParamObj } [obj] - { focus: true | false } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ focus(obj?: FocusParamObj): void; /** @@ -655,6 +1246,17 @@ export interface Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Requests or cancels the crown rotation focus for a component. + * If focus is set to true, the crown event focus is requested. + * If focus is set to false, the crown event focus is canceled. + * This attribute can be defaulted to true. + * + * @param { FocusParamObj } [obj] - { focus: true | false } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ rotation(obj?: FocusParamObj): void; /** @@ -666,6 +1268,16 @@ export interface Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Creates and runs an animation shortcut on the component. Specify the keyframes and options required for the animation. + * + * @param { Array } keyframes - keyframes is used to describe key frame parameters of the animation. + * @param { AnimateOptions } options - Options. is used to describe animation parameters. + * @returns { AnimationResult } This method returns the animation object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ animate(keyframes: Array, options: AnimateOptions): AnimationResult; /** @@ -675,6 +1287,14 @@ export interface Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Obtains the size and position of the element. + * + * @returns { RectObj } RectObj the size position of the element. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ getBoundingClientRect(): RectObj; /** @@ -695,6 +1315,15 @@ export interface Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * If 0.5 is returned, 50% of the current component is visible. + * + * @param { object } param - Scope of Monitoring components. + * @returns { observer } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ createIntersectionObserver(param: { ratios: Array }): observer; /** @@ -704,6 +1333,14 @@ export interface Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ + /** + * Adds a node to the end of the child node list of the current node. + * + * @param { Element } child - Subnode object to be added + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ addChild(child: Element): void; /** @@ -714,6 +1351,15 @@ export interface Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ + /** + * Sets the value of an attribute on a specified element. If the attribute already exists, update the value. Otherwise, a new attribute is added with the specified name and value. + * + * @param { string } name - attribute name + * @param { string } value - attribute value¡¢ + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ setAttribute(name: string, value: string): void; /** @@ -725,6 +1371,16 @@ export interface Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ + /** + * Sets a style value on a specified element. If the style exists and the style value is valid, the setting is successful. Otherwise, the setting is invalid. + * + * @param { string } name - style name + * @param { string } value - style value + * @returns { boolean } If the setting is successful, true is returned. If the setting fails, false is returned. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ setStyle(name: string, value: string): boolean; } @@ -735,6 +1391,14 @@ export interface Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ +/** + * Defines the observer interface. + * + * @interface observer + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface observer { /** * Turn on the listener. @@ -743,6 +1407,14 @@ export interface observer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Turn on the listener. + * + * @param { string } callback + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ observe(callback: string): void; /** @@ -751,6 +1423,13 @@ export interface observer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Turn off the listener. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ unobserve(): void; } @@ -761,6 +1440,14 @@ export interface observer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * animation element + * + * @interface AnimationElement + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface AnimationElement extends Element { /** * Starts the animation. @@ -768,6 +1455,13 @@ export interface AnimationElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Starts the animation. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ play(): void; /** * Ends the animation. @@ -775,6 +1469,13 @@ export interface AnimationElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Ends the animation. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ finish(): void; /** * Pauses the animation. @@ -782,6 +1483,13 @@ export interface AnimationElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Pauses the animation. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ pause(): void; /** * Cancels the animation. @@ -789,6 +1497,13 @@ export interface AnimationElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Cancels the animation. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ cancel(): void; /** * Plays the animation in reverse direction. @@ -796,6 +1511,13 @@ export interface AnimationElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Plays the animation in reverse direction. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ reverse(): void; } @@ -806,6 +1528,14 @@ export interface AnimationElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * ScrollParam + * + * @interface ScrollParam + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface ScrollParam { /** * Offset for scrolling in the horizontal direction, in px. @@ -814,6 +1544,14 @@ export interface ScrollParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Offset for scrolling in the horizontal direction, in px. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ dx?: number; /** @@ -823,6 +1561,14 @@ export interface ScrollParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Offset for scrolling in the vertical direction, in px. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ dy?: number; /** @@ -832,6 +1578,14 @@ export interface ScrollParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Whether a sliding animation is displayed when scroll position is changed. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ smooth?: boolean; } @@ -842,6 +1596,14 @@ export interface ScrollParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * CurrentOffsetResultValue + * + * @interface CurrentOffsetResultValue + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface CurrentOffsetResultValue { /** * Scrolling offset in the x-axis, in px. @@ -850,6 +1612,14 @@ export interface CurrentOffsetResultValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Scrolling offset in the x-axis, in px. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ x: number; /** @@ -859,6 +1629,14 @@ export interface CurrentOffsetResultValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Scrolling offset in the y-axis, in px. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ y: number; } @@ -869,6 +1647,14 @@ export interface CurrentOffsetResultValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * ListScrollToOptions + * + * @interface ListScrollToOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface ListScrollToOptions { /** * specified position. @@ -887,6 +1673,14 @@ export interface ListScrollToOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * The component provides a list container. + * + * @interface ListElement + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface ListElement extends Element { /** * Scrolls the list to the position of the item at the specified index. @@ -905,6 +1699,15 @@ export interface ListElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Scrolls the list for a certain distance. + * This method applies only to smart TVs. + * + * @param { ScrollParam } data + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ scrollBy(data: ScrollParam): void; /** @@ -915,6 +1718,15 @@ export interface ListElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * If smooth is set to false (default value), the list is directly scrolled to the top. + * If smooth is set to true, the list is smoothly scrolled to the top. + * + * @param { object } param + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ scrollTop(param: { smooth: boolean }): void; /** @@ -925,6 +1737,15 @@ export interface ListElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * If smooth is set to false (default value), the list is directly scrolled to the bottom. + * If smooth is set to true, the list is smoothly scrolled to the bottom. + * + * @param { object } param + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ scrollBottom(param: { smooth: boolean }): void; /** @@ -937,6 +1758,17 @@ export interface ListElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * If reverse is set to false (default value), the next page is displayed. If there is no next page, the list scrolls to the bottom. + * If reverse is set to true, the previous page is displayed. If there is no previous page, the list scrolls to the top. + * If smooth is set to false (default value), the list is directly scrolled to another page. + * If smooth is set to true, the list is smoothly scrolled to another page. + * + * @param { object } params + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ scrollPage(params: { reverse: boolean; smooth: boolean }): void; /** @@ -949,6 +1781,17 @@ export interface ListElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * If reverse is set to false (default value), the list scrolls towards the bottom for a certain distance. If there is no sufficient distance, the list scrolls to the bottom. + * If reverse is set to true, the list scrolls towards the top for a certain distance. If there is no sufficient distance, the list scrolls to the top. + * If smooth is set to false (default value), the list is directly scrolled. + * If smooth is set to true, the list is smoothly scrolled. + * + * @param { object } params + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ scrollArrow(params: { reverse: boolean; smooth: boolean }): void; /** @@ -958,6 +1801,14 @@ export interface ListElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Collapses a group. + * + * @param { object } param + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ collapseGroup(param: { /** * groupid: ID of the group to collapse. @@ -967,6 +1818,15 @@ export interface ListElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * groupid: ID of the group to collapse. + * All groups are collapsed when groupid is not specified. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ groupid: string; }): void; @@ -977,6 +1837,14 @@ export interface ListElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Expands a group. + * + * @param { object } param + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ expandGroup(param: { /** * groupid: ID of the group to expand. @@ -986,6 +1854,15 @@ export interface ListElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * groupid: ID of the group to expand. + * All groups are expanded when groupid is not specified. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ groupid: string; }): void; @@ -996,6 +1873,14 @@ export interface ListElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Returns the offset of the current scrolling. The return value type is Object. + * + * @returns { CurrentOffsetResultValue } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ currentOffset(): CurrentOffsetResultValue; } @@ -1006,6 +1891,14 @@ export interface ListElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * The component provides a swiper container. + * + * @interface SwiperElement + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface SwiperElement extends Element { /** * Scrolls the child component to the position at the specified index. @@ -1014,6 +1907,14 @@ export interface SwiperElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Scrolls the child component to the position at the specified index. + * + * @param { object } position + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ swipeTo(position: { /** * specified position. @@ -1022,6 +1923,14 @@ export interface SwiperElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * specified position. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ index: number; }): void; @@ -1031,6 +1940,13 @@ export interface SwiperElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Shows the next child component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ showNext(): void; /** @@ -1039,6 +1955,13 @@ export interface SwiperElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Shows the previous child component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ showPrevious(): void; } @@ -1049,6 +1972,14 @@ export interface SwiperElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ +/** + * CameraTakePhotoOptions + * + * @interface CameraTakePhotoOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface CameraTakePhotoOptions { /** * Picture quality. @@ -1057,6 +1988,14 @@ export interface CameraTakePhotoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Picture quality. + * + * @type { "high" | "normal" | "low" } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ quality: "high" | "normal" | "low"; /** @@ -1066,6 +2005,14 @@ export interface CameraTakePhotoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Callback function for successful interface invocation. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ success?: (result: Object) => void; /** @@ -1075,6 +2022,14 @@ export interface CameraTakePhotoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Callback function for interface invocation failure. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ fail?: (result: Object) => void; /** @@ -1084,6 +2039,14 @@ export interface CameraTakePhotoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Callback function at the end of the interface invoking (executed both successfully and unsuccessfully). + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ complete?: (result: Object) => void; } @@ -1094,6 +2057,14 @@ export interface CameraTakePhotoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ +/** + * The component provides preview and photographing functions. + * + * @interface CameraElement + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface CameraElement extends Element { /** * Take photos with specified parameters. @@ -1102,6 +2073,14 @@ export interface CameraElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Take photos with specified parameters. + * + * @param { CameraTakePhotoOptions } options - the parameters of camera. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ takePhoto(options: CameraTakePhotoOptions): void; } @@ -1112,6 +2091,14 @@ export interface CameraElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ +/** + * The component is a container for displaying web page content. + * + * @interface WebElement + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface WebElement extends Element { /** * Reload the web page content @@ -1119,6 +2106,13 @@ export interface WebElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Reload the web page content + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ reload(): void; } @@ -1129,6 +2123,14 @@ export interface WebElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * The component is a custom pop-up container. + * + * @interface DialogElement + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface DialogElement extends Element { /** * Shows a dialog box. @@ -1136,6 +2138,13 @@ export interface DialogElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Shows a dialog box. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ show(): void; /** * Closes a dialog box. @@ -1143,6 +2152,13 @@ export interface DialogElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Closes a dialog box. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ close(): void; } @@ -1153,6 +2169,14 @@ export interface DialogElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 4 */ +/** + * The component is used to provide an image frame animator. + * + * @interface ImageAnimatorElement + * @syscap SystemCapability.ArkUI.ArkUI.Lite + * @atomicservice + * @since 11 + */ export interface ImageAnimatorElement extends Element { /** * Starts to play the frame animation of an image. If this method is called again, the playback starts from the first frame. @@ -1160,6 +2184,13 @@ export interface ImageAnimatorElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Starts to play the frame animation of an image. If this method is called again, the playback starts from the first frame. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ start(): void; /** * Pauses the frame animation playback of an image. @@ -1167,6 +2198,13 @@ export interface ImageAnimatorElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Pauses the frame animation playback of an image. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ pause(): void; /** * Stops the frame animation playback of an image. @@ -1174,6 +2212,13 @@ export interface ImageAnimatorElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Stops the frame animation playback of an image. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ stop(): void; /** * Resumes the frame animation playback of an image. @@ -1181,6 +2226,13 @@ export interface ImageAnimatorElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Resumes the frame animation playback of an image. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ resume(): void; /** * Obtains the playback state. Available values are as follows: @@ -1192,6 +2244,17 @@ export interface ImageAnimatorElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Obtains the playback state. Available values are as follows: + * Playing + * Paused + * Stopped + * + * @returns { "Playing" | "Paused" | "Stopped" } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ getState(): "Playing" | "Paused" | "Stopped"; } @@ -1203,6 +2266,15 @@ export interface ImageAnimatorElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * The component inserts scrolling text, which is displayed in a single line by default. + * When the text length exceeds the display area of the component, the marquee effect is displayed. + * + * @interface MarqueeElement + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface MarqueeElement extends Element { /** * Starts scrolling. @@ -1210,6 +2282,13 @@ export interface MarqueeElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Starts scrolling. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ start(): void; /** @@ -1218,6 +2297,13 @@ export interface MarqueeElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Stops scrolling. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ stop(): void; } @@ -1228,6 +2314,14 @@ export interface MarqueeElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * The component provides menus as temporary pop-up windows to display operations that can be performed by users. + * + * @interface MenuElement + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface MenuElement extends Element { /** * Displays the menu. @@ -1242,6 +2336,20 @@ export interface MenuElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Displays the menu. + * x and y specify the position of the displayed menu. + * x indicates the X-axis coordinate from the left edge of the visible area, and does not include any scrolling offset. + * y indicates the Y-axis coordinate from the upper edge of the visible area, and does not include any scrolling offset or a status bar. + * The menu is preferentially displayed in the lower right corner. + * When the visible space on the right is insufficient, the menu is moved leftward. + * When the visible space in the lower part is insufficient, the menu is moved upward. + * + * @param { object } position + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ show(position: { x: number; y: number }): void; } @@ -1252,6 +2360,14 @@ export interface MenuElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * The component displays line charts, gauge charts, and bar charts. + * + * @interface ChartElement + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface ChartElement extends Element { /** * Data is dynamically added to an existing data sequence. @@ -1263,6 +2379,17 @@ export interface ChartElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Data is dynamically added to an existing data sequence. + * The target sequence is specified based on serial, which is the subscript of the datasets array and starts from 0. + * datasets[index].data is not updated. Only line charts support this attribute. + * The value is incremented by 1 based on the horizontal coordinate and is related to the xAxis min/max setting. + * + * @param { object } params + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ append(params: { /** * Set the data subscript of the line chart to be updated. @@ -1271,6 +2398,14 @@ export interface ChartElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Set the data subscript of the line chart to be updated. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ serial: number; /** * Set the new data. @@ -1279,6 +2414,14 @@ export interface ChartElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Set the new data. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ data: Array; }): void; } @@ -1290,6 +2433,14 @@ export interface ChartElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * The component provides an interactive interface to receive user input, which is displayed in a single line by default. + * + * @interface InputElement + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ export interface InputElement extends Element { /** * Obtains or loses the focus of a component. @@ -1299,6 +2450,15 @@ export interface InputElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Obtains or loses the focus of a component. + * When the component type is set to text, email, date, time, number, or password, the input method can be displayed or collapsed. + * + * @param { object } param - If focus is not passed, the default value true is used. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ focus(param: { focus: boolean }): void; /** @@ -1309,6 +2469,15 @@ export interface InputElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ + /** + * Displays the error message. + * This attribute is available when the component type is set to text, email, date, time, number, or password. + * + * @param { object } param + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ showError(param: { error: string }): void; /** @@ -1317,6 +2486,13 @@ export interface InputElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ + /** + * Deletes the previous character at the cursor position. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ delete(): void; } @@ -1327,6 +2503,14 @@ export interface InputElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ +/** + * The