From 255fae91a4b4840ceb17922ec38853047a55f6d2 Mon Sep 17 00:00:00 2001 From: sd-wu Date: Thu, 24 Jul 2025 14:50:26 +0800 Subject: [PATCH 1/4] =?UTF-8?q?modifiers=20skd=20=E6=8B=86=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sd-wu --- api/@internal/component/ets/circle.d.ts | 37 +- api/@internal/component/ets/ellipse.d.ts | 37 +- api/@internal/component/ets/line.d.ts | 79 +-- api/@internal/component/ets/path.d.ts | 37 +- api/@internal/component/ets/polygon.d.ts | 52 +- api/@internal/component/ets/polyline.d.ts | 52 +- api/@internal/component/ets/rect.d.ts | 87 +--- api/@internal/component/ets/shape.d.ts | 106 +--- api/@internal/component/ets/video.d.ts | 252 ++-------- api/@ohos.arkui.modifier.d.ets | 57 +++ api/arkui/LineModifier.d.ets | 32 ++ api/arkui/PathModifier.d.ets | 32 ++ api/arkui/PolygonModifier.d.ets | 32 ++ api/arkui/PolylineModifier.d.ets | 32 ++ api/arkui/RectModifier.d.ets | 32 ++ api/arkui/ShapeModifier.d.ets | 32 ++ api/arkui/VideoModifier.d.ets | 32 ++ api/arkui/component/circle.static.d.ets | 66 +++ api/arkui/component/ellipse.static.d.ets | 66 +++ api/arkui/component/line.static.d.ets | 105 ++++ api/arkui/component/path.static.d.ets | 86 ++++ api/arkui/component/polygon.static.d.ets | 79 +++ api/arkui/component/polyline.static.d.ets | 79 +++ api/arkui/component/rect.static.d.ets | 184 +++++++ api/arkui/component/shape.static.d.ets | 249 +++++++++ api/arkui/component/video.static.d.ets | 584 ++++++++++++++++++++++ 26 files changed, 1858 insertions(+), 660 deletions(-) create mode 100644 api/arkui/LineModifier.d.ets create mode 100644 api/arkui/PathModifier.d.ets create mode 100644 api/arkui/PolygonModifier.d.ets create mode 100644 api/arkui/PolylineModifier.d.ets create mode 100644 api/arkui/RectModifier.d.ets create mode 100644 api/arkui/ShapeModifier.d.ets create mode 100644 api/arkui/VideoModifier.d.ets create mode 100644 api/arkui/component/circle.static.d.ets create mode 100644 api/arkui/component/ellipse.static.d.ets create mode 100644 api/arkui/component/line.static.d.ets create mode 100644 api/arkui/component/path.static.d.ets create mode 100644 api/arkui/component/polygon.static.d.ets create mode 100644 api/arkui/component/polyline.static.d.ets create mode 100644 api/arkui/component/rect.static.d.ets create mode 100644 api/arkui/component/shape.static.d.ets create mode 100644 api/arkui/component/video.static.d.ets diff --git a/api/@internal/component/ets/circle.d.ts b/api/@internal/component/ets/circle.d.ts index 845dd4b638..42e6cc834a 100644 --- a/api/@internal/component/ets/circle.d.ts +++ b/api/@internal/component/ets/circle.d.ts @@ -18,10 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonShapeMethod,CommonMethod } from './common'; -/*** endif */ - /** * Defines circle options for Circle component. * @@ -54,8 +50,7 @@ import { CommonShapeMethod,CommonMethod } from './common'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface CircleOptions { /** @@ -299,8 +294,7 @@ interface CircleInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class CircleAttribute extends CommonShapeMethod {} @@ -367,30 +361,3 @@ declare const Circle: CircleInterface; * @since 11 */ declare const CircleInstance: CircleAttribute; - -/** - * Defines circle component. - * - * @interface CircleInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface CircleInterface { - /** - * Set the options for circle component. - * - * @param { CircleOptions } [value] - options to create circle component. - * @returns { CircleAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (value?: CircleOptions): CircleAttribute; -} diff --git a/api/@internal/component/ets/ellipse.d.ts b/api/@internal/component/ets/ellipse.d.ts index 4f9cd5433e..678b414146 100644 --- a/api/@internal/component/ets/ellipse.d.ts +++ b/api/@internal/component/ets/ellipse.d.ts @@ -18,10 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonShapeMethod } from './common'; -/*** endif */ - /** * Ellipse constructor options. * @@ -30,8 +26,7 @@ import { CommonShapeMethod } from './common'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface EllipseOptions { /** @@ -313,8 +308,7 @@ interface EllipseInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class EllipseAttribute extends CommonShapeMethod {} @@ -381,30 +375,3 @@ declare const Ellipse: EllipseInterface; * @since 11 */ declare const EllipseInstance: EllipseAttribute; - -/** - * Ellipse drawing. - * - * @interface EllipseInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface EllipseInterface { - /** - * Set the value. - * - * @param { EllipseOptions } [options] - ellipse options - * @returns { EllipseAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (options?: EllipseOptions): EllipseAttribute; -} diff --git a/api/@internal/component/ets/line.d.ts b/api/@internal/component/ets/line.d.ts index 278f936daa..52525bc39e 100644 --- a/api/@internal/component/ets/line.d.ts +++ b/api/@internal/component/ets/line.d.ts @@ -18,24 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonShapeMethod, CommonMethod } from './common'; -import { Length } from './units'; -/*** endif */ - -/** - * Defines the Shape Point, the first element is the x-axis offset and the second is the y-axis. - * - * @typedef { [Length, Length] } ShapePoint - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -export type ShapePoint = [Length, Length]; - /** * Defines Line constructor options. * @@ -44,8 +26,7 @@ export type ShapePoint = [Length, Length]; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface LineOptions { /** @@ -351,8 +332,7 @@ interface LineInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class LineAttribute extends CommonShapeMethod { /** @@ -395,20 +375,6 @@ declare class LineAttribute extends CommonShapeMethod { */ startPoint(value: Array): LineAttribute; - /** - * Coordinate of the start point of the line (relative coordinate). - * - * @param { ShapePoint } value - * @returns { LineAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - startPoint(value: ShapePoint): LineAttribute; - /** * Line end coordinates (relative coordinates). * @@ -448,20 +414,6 @@ declare class LineAttribute extends CommonShapeMethod { * @since 11 */ endPoint(value: Array): LineAttribute; - - /** - * Line end coordinates (relative coordinates). - * - * @param { ShapePoint } value - * @returns { LineAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - endPoint(value: ShapePoint): LineAttribute; } /** @@ -527,30 +479,3 @@ declare const Line: LineInterface; * @since 11 */ declare const LineInstance: LineAttribute; - -/** - * Line drawing component. - * - * @interface LineInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface LineInterface { - /** - * The return value of the parameter is Line. - * - * @param { LineOptions } [options] - Line options - * @returns { LineAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (options?: LineOptions): LineAttribute; -} diff --git a/api/@internal/component/ets/path.d.ts b/api/@internal/component/ets/path.d.ts index af9beaf1e7..924c278aab 100644 --- a/api/@internal/component/ets/path.d.ts +++ b/api/@internal/component/ets/path.d.ts @@ -18,10 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonShapeMethod } from './common'; -/*** endif */ - /** * Define options used to construct a path. * @@ -30,8 +26,7 @@ import { CommonShapeMethod } from './common'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface PathOptions { /** @@ -363,8 +358,7 @@ interface PathInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class PathAttribute extends CommonShapeMethod { /** @@ -482,30 +476,3 @@ declare const Path: PathInterface; * @since 11 */ declare const PathInstance: PathAttribute; - -/** - * Provides the path drawing interface. - * - * @interface PathInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface PathInterface { - /** - * Called when drawing path. - * - * @param { PathOptions } [options] - path options - * @returns { PathAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (options?: PathOptions): PathAttribute; -} \ No newline at end of file diff --git a/api/@internal/component/ets/polygon.d.ts b/api/@internal/component/ets/polygon.d.ts index 589a025455..2dc8c65f33 100644 --- a/api/@internal/component/ets/polygon.d.ts +++ b/api/@internal/component/ets/polygon.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonShapeMethod } from './common'; -import { ShapePoint } from './line'; -/*** endif */ - /** * Define options used to construct a polygon. * @@ -31,8 +26,7 @@ import { ShapePoint } from './line'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface PolygonOptions { /** @@ -313,8 +307,7 @@ interface PolygonInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class PolygonAttribute extends CommonShapeMethod { /** @@ -356,20 +349,6 @@ declare class PolygonAttribute extends CommonShapeMethod { * @since 11 */ points(value: Array): PolygonAttribute; - - /** - * Called when the vertex coordinate list of a polygon is set. - * - * @param { Array } value - * @returns { PolygonAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - points(value: Array): PolygonAttribute; } /** @@ -435,30 +414,3 @@ declare const Polygon: PolygonInterface; * @since 11 */ declare const PolygonInstance: PolygonAttribute; - -/** - * Provides the polygon drawing interface. - * - * @interface PolygonInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface PolygonInterface { - /** - * Called when drawing a polygon. - * - * @param { PolygonOptions } [options] - Polygon options - * @returns { PolygonAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (options?: PolygonOptions): PolygonAttribute; -} diff --git a/api/@internal/component/ets/polyline.d.ts b/api/@internal/component/ets/polyline.d.ts index f6937400d1..d2ddef1e82 100644 --- a/api/@internal/component/ets/polyline.d.ts +++ b/api/@internal/component/ets/polyline.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonShapeMethod } from './common'; -import { ShapePoint } from './line'; -/*** endif */ - /** * Define options used to construct a polyline. * @@ -31,8 +26,7 @@ import { ShapePoint } from './line'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface PolylineOptions { /** @@ -306,8 +300,7 @@ interface PolylineInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class PolylineAttribute extends CommonShapeMethod { /** @@ -349,20 +342,6 @@ declare class PolylineAttribute extends CommonShapeMethod { * @since 11 */ points(value: Array): PolylineAttribute; - - /** - * Called when the polyline is set to pass through the coordinate point list. - * - * @param { Array } value - * @returns { PolylineAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - points(value: Array): PolylineAttribute; } /** @@ -428,30 +407,3 @@ declare const Polyline: PolylineInterface; * @since 11 */ declare const PolylineInstance: PolylineAttribute; - -/** - * Provides an interface for drawing polylines. - * - * @interface PolylineInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface PolylineInterface { - /** - * Set options for polyline component. - * - * @param { PolylineOptions } [options] - Poly line options - * @returns { PolylineAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (options?: PolylineOptions): PolylineAttribute; -} diff --git a/api/@internal/component/ets/rect.d.ts b/api/@internal/component/ets/rect.d.ts index 84c8ecde7b..a382feb79c 100644 --- a/api/@internal/component/ets/rect.d.ts +++ b/api/@internal/component/ets/rect.d.ts @@ -18,24 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonShapeMethod } from './common'; -import { Length } from './units'; -/*** endif */ - -/** - * Defines the RadiusItem, the first element is the width of the rounded corner, the second is the height of the rounded corner. - * - * @typedef { [Length, Length] } RadiusItem - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare type RadiusItem = [Length, Length]; - /** * Define options used to construct a rectangle. * @@ -44,8 +26,7 @@ declare type RadiusItem = [Length, Length]; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface RectOptions { /** @@ -102,7 +83,6 @@ declare interface RectOptions { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ width?: Length; @@ -160,7 +140,6 @@ declare interface RectOptions { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ height?: Length; @@ -220,19 +199,6 @@ declare interface RectOptions { * @since 20 */ radius?: Length | Array; - - /** - * Corner radius of the rectangle. - * - * @type { ?(Length | Array) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - radius?: Length | Array; } /** @@ -243,8 +209,7 @@ declare interface RectOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface RoundedRectOptions { /** @@ -656,8 +621,7 @@ interface RectInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class RectAttribute extends CommonShapeMethod { /** @@ -792,7 +756,7 @@ declare class RectAttribute extends CommonShapeMethod { /** * Called when the fillet size is set. * - * @param { Length | Array } value + * @param { number | string | Array } value * @returns { RectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -812,20 +776,6 @@ declare class RectAttribute extends CommonShapeMethod { * @since 20 */ radius(value: Length | Array): RectAttribute; - - /** - * Called when the fillet size is set. - * - * @param { number | string | Array } value - * @returns { RectAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - radius(value: number | string | Array): RectAttribute; } /** @@ -884,32 +834,3 @@ declare const RectInStance: RectAttribute; * @since 11 */ declare const RectInstance: RectAttribute; - -/** - * Provides an interface for drawing rectangles. - * - * @interface RectInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface RectInterface { - /** - * Called when a rectangle is created. - * - * @param { RectOptions | RoundedRectOptions } [options] - Rect options - * @returns { RectAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - ( - options?: RectOptions | RoundedRectOptions, - ): RectAttribute; -} \ No newline at end of file diff --git a/api/@internal/component/ets/shape.d.ts b/api/@internal/component/ets/shape.d.ts index 8acf8b8fa9..7acbca147f 100644 --- a/api/@internal/component/ets/shape.d.ts +++ b/api/@internal/component/ets/shape.d.ts @@ -18,13 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod, PixelMap } from './common'; -import { ResourceColor, Length } from './units'; -import { Resource } from '../../global/resource'; -import { LineCapStyle, LineJoinStyle } from './enums'; -/*** endif */ - /** * Viewport bounding box. * @@ -33,8 +26,7 @@ import { LineCapStyle, LineJoinStyle } from './enums'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface ViewportRect { /** @@ -91,7 +83,6 @@ declare interface ViewportRect { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ x?: Length; @@ -149,7 +140,6 @@ declare interface ViewportRect { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ y?: Length; @@ -207,7 +197,6 @@ declare interface ViewportRect { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ width?: Length; @@ -265,7 +254,6 @@ declare interface ViewportRect { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ height?: Length; } @@ -418,8 +406,7 @@ interface ShapeInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class ShapeAttribute extends CommonMethod { /** @@ -470,8 +457,7 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ viewPort(value: ViewportRect): ShapeAttribute; @@ -511,8 +497,7 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ stroke(value: ResourceColor): ShapeAttribute; @@ -552,8 +537,7 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fill(value: ResourceColor): ShapeAttribute; @@ -587,7 +571,7 @@ declare class ShapeAttribute extends CommonMethod { /** * Called when the offset of the starting point of border drawing is set. * - * @param { Length } value + * @param { number | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -605,7 +589,6 @@ declare class ShapeAttribute extends CommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ strokeDashOffset(value: Length): ShapeAttribute; @@ -649,20 +632,6 @@ declare class ShapeAttribute extends CommonMethod { */ strokeDashArray(value: Array): ShapeAttribute; - /** - * Called when the gap of the border is set. - * - * @param { Array } value - * @returns { ShapeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - strokeDashArray(value: Array): ShapeAttribute; - /** * Called when the path endpoint drawing style is set. * @@ -699,8 +668,7 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ strokeLineCap(value: LineCapStyle): ShapeAttribute; @@ -740,8 +708,7 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ strokeLineJoin(value: LineJoinStyle): ShapeAttribute; @@ -775,7 +742,7 @@ declare class ShapeAttribute extends CommonMethod { /** * Called when the limit value for drawing acute angles as oblique angles is set. * - * @param { Length } value + * @param { number | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -793,7 +760,6 @@ declare class ShapeAttribute extends CommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ strokeMiterLimit(value: Length): ShapeAttribute; @@ -833,8 +799,7 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ strokeOpacity(value: number | string | Resource): ShapeAttribute; @@ -874,8 +839,7 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fillOpacity(value: number | string | Resource): ShapeAttribute; @@ -909,7 +873,7 @@ declare class ShapeAttribute extends CommonMethod { /** * Called when the width of the border is set. * - * @param { Length } value + * @param { number | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -927,7 +891,6 @@ declare class ShapeAttribute extends CommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ strokeWidth(value: Length): ShapeAttribute; @@ -967,8 +930,7 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ antiAlias(value: boolean): ShapeAttribute; @@ -1019,22 +981,6 @@ declare class ShapeAttribute extends CommonMethod { * @since 11 */ mesh(value: Array, column: number, row: number): ShapeAttribute; - - /** - * Called when shape mesh. - * - * @param { Array } value - * @param { number } column - * @param { number } row - * @returns { ShapeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - mesh(value: Array, column: number, row: number): ShapeAttribute; } /** @@ -1100,29 +1046,3 @@ declare const Shape: ShapeInterface; * @since 11 */ declare const ShapeInstance: ShapeAttribute; - -/** - * Provides interfaces for drawing components. - * - * @interface ShapeInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface ShapeInterface { - /** - * Shape component constructor. - * - * @param { PixelMap } [value] - PixelMap object to draw. - * @returns { ShapeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (value?: PixelMap): ShapeAttribute; -} diff --git a/api/@internal/component/ets/video.d.ts b/api/@internal/component/ets/video.d.ts index 29a25dc167..36dc4bd16b 100644 --- a/api/@internal/component/ets/video.d.ts +++ b/api/@internal/component/ets/video.d.ts @@ -18,14 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Resource } from '../../global/resource'; -import { ImageAIOptions, ImageAnalyzerConfig } from './imageCommon'; -import { ImageFit } from './enums'; -import { CommonMethod, Callback, PixelMap } from './common'; -import { VoidCallback, ColorMetrics } from './units'; -/*** endif */ - /** * Seek mode. * @@ -48,8 +40,7 @@ import { VoidCallback, ColorMetrics } from './units'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum SeekMode { /** @@ -71,8 +62,7 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ PreviousKeyframe, @@ -95,8 +85,7 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ NextKeyframe, @@ -119,8 +108,7 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ ClosestKeyframe, @@ -143,8 +131,7 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Accurate, } @@ -171,8 +158,7 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum PlaybackSpeed { /** @@ -194,8 +180,7 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Speed_Forward_0_75_X, @@ -218,8 +203,7 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Speed_Forward_1_00_X, @@ -242,8 +226,7 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Speed_Forward_1_25_X, @@ -266,8 +249,7 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Speed_Forward_1_75_X, @@ -290,8 +272,7 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Speed_Forward_2_00_X, } @@ -303,8 +284,7 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface FullscreenInfo { /** @@ -331,8 +311,7 @@ interface FullscreenInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ fullscreen: boolean; } @@ -344,8 +323,7 @@ interface FullscreenInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface PreparedInfo { /** @@ -372,8 +350,7 @@ interface PreparedInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ duration: number; } @@ -385,8 +362,7 @@ interface PreparedInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface PlaybackInfo { /** @@ -413,8 +389,7 @@ interface PlaybackInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ time: number; } @@ -425,8 +400,7 @@ interface PlaybackInfo { * @interface PosterOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface PosterOptions { /** @@ -436,8 +410,7 @@ declare interface PosterOptions { * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ showFirstFrame?: boolean; } @@ -473,8 +446,7 @@ declare interface PosterOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface VideoOptions { /** @@ -499,8 +471,7 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ src?: string | Resource; @@ -526,8 +497,7 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ currentProgressRate?: number | string | PlaybackSpeed; @@ -553,8 +523,7 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ previewUri?: string | PixelMap | Resource; @@ -580,8 +549,7 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ controller?: VideoController; @@ -591,8 +559,7 @@ declare interface VideoOptions { * @type { ?ImageAIOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ imageAIOptions?: ImageAIOptions; @@ -602,8 +569,7 @@ declare interface VideoOptions { * @type { ?PosterOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ posterOptions?: PosterOptions; } @@ -627,8 +593,7 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class VideoController { /** @@ -650,8 +615,7 @@ declare class VideoController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(); @@ -678,17 +642,6 @@ declare class VideoController { */ start(); - /** - * Provides events to play. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - start(): void; - /** * Provides a pause event for playback. * @@ -712,17 +665,6 @@ declare class VideoController { */ pause(); - /** - * Provides a pause event for playback. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - pause(): void; - /** * Provides an event to stop playback. * @@ -746,17 +688,6 @@ declare class VideoController { */ stop(); - /** - * Provides an event to stop playback. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - stop(): void; - /** * Provide the progress method of video playback. * @@ -783,18 +714,6 @@ declare class VideoController { */ setCurrentTime(value: number); - /** - * Provide the progress method of video playback. - * - * @param { number } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - setCurrentTime(value: number): void; - /** * Provides a full screen playback method. * @@ -821,18 +740,6 @@ declare class VideoController { */ requestFullscreen(value: boolean); - /** - * Provides a full screen playback method. - * - * @param { boolean } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - requestFullscreen(value: boolean): void; - /** * Provides a method to exit full screen playback. * @@ -856,17 +763,6 @@ declare class VideoController { */ exitFullscreen(); - /** - * Provides a method to exit full screen playback. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - exitFullscreen(): void; - /** * Provide the progress method of video playback. * @@ -896,26 +792,12 @@ declare class VideoController { */ setCurrentTime(value: number, seekMode: SeekMode); - /** - * Provide the progress method of video playback. - * - * @param { number } value - * @param { SeekMode } seekMode - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - setCurrentTime(value: number, seekMode: SeekMode): void; - /** * Provide the reset method of video playback. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ reset(): void; } @@ -942,8 +824,7 @@ declare class VideoController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface VideoInterface { /** @@ -971,8 +852,7 @@ interface VideoInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value: VideoOptions): VideoAttribute; } @@ -999,8 +879,7 @@ interface VideoInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class VideoAttribute extends CommonMethod { /** @@ -1028,8 +907,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ muted(value: boolean): VideoAttribute; @@ -1058,8 +936,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ autoPlay(value: boolean): VideoAttribute; @@ -1088,8 +965,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ controls(value: boolean): VideoAttribute; @@ -1118,8 +994,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ loop(value: boolean): VideoAttribute; @@ -1148,8 +1023,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ objectFit(value: ImageFit): VideoAttribute; @@ -1189,8 +1063,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onStart(event: VoidCallback): VideoAttribute; @@ -1230,8 +1103,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onPause(event: VoidCallback): VideoAttribute; @@ -1271,8 +1143,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onFinish(event: VoidCallback): VideoAttribute; @@ -1312,8 +1183,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onFullscreenChange(callback: Callback): VideoAttribute; @@ -1353,8 +1223,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onPrepared(callback: Callback): VideoAttribute; @@ -1394,8 +1263,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onSeeking(callback: Callback): VideoAttribute; @@ -1435,8 +1303,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onSeeked(callback: Callback): VideoAttribute; @@ -1476,8 +1343,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onUpdate(callback: Callback): VideoAttribute; @@ -1519,19 +1385,6 @@ declare class VideoAttribute extends CommonMethod { * @since 20 */ onError(event: VoidCallback | import('../api/@ohos.base').ErrorCallback): VideoAttribute; - - /** - * Called when playback fails. - * - * @param { function } event - * @returns { VideoAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onError(event: () => void): VideoAttribute; /** * Called when the video is stopped. @@ -1541,8 +1394,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onStop(event: Callback): VideoAttribute; @@ -1553,8 +1405,7 @@ declare class VideoAttribute extends CommonMethod { * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableAnalyzer(enable: boolean): VideoAttribute; @@ -1565,8 +1416,7 @@ declare class VideoAttribute extends CommonMethod { * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ analyzerConfig(config: ImageAnalyzerConfig): VideoAttribute; @@ -1577,8 +1427,7 @@ declare class VideoAttribute extends CommonMethod { * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ surfaceBackgroundColor(color: ColorMetrics): VideoAttribute; @@ -1593,8 +1442,7 @@ declare class VideoAttribute extends CommonMethod { * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ enableShortcutKey(enabled: boolean): VideoAttribute; } diff --git a/api/@ohos.arkui.modifier.d.ets b/api/@ohos.arkui.modifier.d.ets index 4cdb3f34c0..8e6931998b 100644 --- a/api/@ohos.arkui.modifier.d.ets +++ b/api/@ohos.arkui.modifier.d.ets @@ -58,3 +58,60 @@ export { ButtonModifier } from './arkui/ButtonModifier'; * @since 20 */ export { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; + + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { LineModifier } from './arkui/LineModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { PathModifier } from './arkui/PathModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { PolygonModifier } from './arkui/PolygonModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { PolylineModifier } from './arkui/PolylineModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { RectModifier } from './arkui/RectModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { ShapeModifier } from './arkui/ShapeModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { VideoModifier } from './arkui/VideoModifier'; diff --git a/api/arkui/LineModifier.d.ets b/api/arkui/LineModifier.d.ets new file mode 100644 index 0000000000..242a8f120d --- /dev/null +++ b/api/arkui/LineModifier.d.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AttributeModifier } from './component/common'; +import { LineAttribute } from './component/line'; + +/** + * @file + * @kit ArkUI + */ + +/** + * Defines Line Modifier + * + * @implements LineAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 +*/ +export declare class LineModifier implements LineAttribute, AttributeModifier {} diff --git a/api/arkui/PathModifier.d.ets b/api/arkui/PathModifier.d.ets new file mode 100644 index 0000000000..e303ed5df2 --- /dev/null +++ b/api/arkui/PathModifier.d.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AttributeModifier } from './component/common'; +import { PathAttribute } from './component/path'; + +/** + * @file + * @kit ArkUI + */ + +/** + * Defines Path Modifier + * + * @implements PathAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 +*/ +export declare class PathModifier implements PathAttribute, AttributeModifier {} diff --git a/api/arkui/PolygonModifier.d.ets b/api/arkui/PolygonModifier.d.ets new file mode 100644 index 0000000000..726bc2466c --- /dev/null +++ b/api/arkui/PolygonModifier.d.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AttributeModifier } from './component/common'; +import { PolygonAttribute } from './component/polygon'; + +/** + * @file + * @kit ArkUI + */ + +/** + * Defines Polygon Modifier + * + * @implements PolygonAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 +*/ +export declare class PolygonModifier implements PolygonAttribute, AttributeModifier {} diff --git a/api/arkui/PolylineModifier.d.ets b/api/arkui/PolylineModifier.d.ets new file mode 100644 index 0000000000..6ccba6ff73 --- /dev/null +++ b/api/arkui/PolylineModifier.d.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AttributeModifier } from './component/common'; +import { PolylineAttribute } from './component/polyline'; + +/** + * @file + * @kit ArkUI + */ + +/** + * Defines Polyline Modifier + * + * @implements PolylineAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 +*/ +export declare class PolylineModifier implements PolylineAttribute, AttributeModifier {} diff --git a/api/arkui/RectModifier.d.ets b/api/arkui/RectModifier.d.ets new file mode 100644 index 0000000000..f7637e3c8f --- /dev/null +++ b/api/arkui/RectModifier.d.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AttributeModifier } from './component/common'; +import { RectAttribute } from './component/rect'; + +/** + * @file + * @kit ArkUI + */ + +/** + * Defines Rect Modifier + * + * @implements RectAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 +*/ +export declare class RectModifier implements RectAttribute, AttributeModifier {} diff --git a/api/arkui/ShapeModifier.d.ets b/api/arkui/ShapeModifier.d.ets new file mode 100644 index 0000000000..1dbbee97fc --- /dev/null +++ b/api/arkui/ShapeModifier.d.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AttributeModifier } from './component/common'; +import { ShapeAttribute } from './component/shape'; + +/** + * @file + * @kit ArkUI + */ + +/** + * Defines Shape Modifier + * + * @implements ShapeAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 +*/ +export declare class ShapeModifier implements ShapeAttribute, AttributeModifier {} diff --git a/api/arkui/VideoModifier.d.ets b/api/arkui/VideoModifier.d.ets new file mode 100644 index 0000000000..732f504d4e --- /dev/null +++ b/api/arkui/VideoModifier.d.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AttributeModifier } from './component/common'; +import { VideoAttribute } from './component/video'; + +/** + * @file + * @kit ArkUI + */ + +/** + * Defines Video Modifier + * + * @implements VideoAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 +*/ +export declare class VideoModifier implements VideoAttribute, AttributeModifier {} diff --git a/api/arkui/component/circle.static.d.ets b/api/arkui/component/circle.static.d.ets new file mode 100644 index 0000000000..5c5359326d --- /dev/null +++ b/api/arkui/component/circle.static.d.ets @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { CommonShapeMethod, CommonMethod, AttributeModifier } from "./common"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +/** + * Defines circle options for Circle component. + * + * @interface CircleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +export declare interface CircleOptions { + /** + * Defines the width property. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + width?: string | number; + /** + * Defines the height property. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + height?: string | number; +} +export declare interface CircleAttribute extends CommonShapeMethod { + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +@memo +@ComponentBuilder +export declare function Circle( + value?: CircleOptions, + @memo + content_?: () => void, +): CircleAttribute diff --git a/api/arkui/component/ellipse.static.d.ets b/api/arkui/component/ellipse.static.d.ets new file mode 100644 index 0000000000..6865451be7 --- /dev/null +++ b/api/arkui/component/ellipse.static.d.ets @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { CommonShapeMethod, AttributeModifier, CommonMethod } from "./common"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +/** + * Ellipse constructor options. + * + * @interface EllipseOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +export interface EllipseOptions { + /** + * Set width. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + width?: string | number; + /** + * Set height. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + height?: string | number; +} +export declare interface EllipseAttribute extends CommonShapeMethod { + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +@memo +@ComponentBuilder +export declare function Ellipse( + options?: EllipseOptions, + @memo + content_?: () => void, +): EllipseAttribute diff --git a/api/arkui/component/line.static.d.ets b/api/arkui/component/line.static.d.ets new file mode 100644 index 0000000000..d59441f8a5 --- /dev/null +++ b/api/arkui/component/line.static.d.ets @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { CommonShapeMethod, CommonMethod, AttributeModifier } from "./common"; +import { Length } from "./units"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +/** + * Defines the Shape Point, the first element is the x-axis offset and the second is the y-axis. + * + * @typedef { [Length, Length] } ShapePoint + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +export type ShapePoint = [ + Length, + Length +]; +/** + * Defines Line constructor options. + * + * @interface LineOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +export interface LineOptions { + /** + * Width of the rectangle where the line resides. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + width?: string | number; + /** + * Height of the rectangle where the line resides. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + height?: string | number; +} +export declare interface LineAttribute extends CommonShapeMethod { + /** + * Coordinate of the start point of the line (relative coordinate). + * + * @param { ShapePoint } value + * @returns { LineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default startPoint(value: ShapePoint | undefined): this; + /** + * Line end coordinates (relative coordinates). + * + * @param { ShapePoint } value + * @returns { LineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default endPoint(value: ShapePoint | undefined): this; + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +@memo +@ComponentBuilder +export declare function Line( + options?: LineOptions, + @memo + content_?: () => void, +): LineAttribute diff --git a/api/arkui/component/path.static.d.ets b/api/arkui/component/path.static.d.ets new file mode 100644 index 0000000000..a52b914c87 --- /dev/null +++ b/api/arkui/component/path.static.d.ets @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { CommonShapeMethod, AttributeModifier, CommonMethod } from "./common"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +/** + * Define options used to construct a path. + * + * @interface PathOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +export declare interface PathOptions { + /** + * Width option. + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + width?: number | string; + /** + * Height option. + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + height?: number | string; + /** + * Commands option. + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + commands?: string; +} +export declare interface PathAttribute extends CommonShapeMethod { + /** + * Called when the command string drawn by the path is set. + * + * @param { string } value + * @returns { PathAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default commands(value: string | undefined): this; + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +@memo +@ComponentBuilder +export declare function Path( + options?: PathOptions, + @memo + content_?: () => void, +): PathAttribute diff --git a/api/arkui/component/polygon.static.d.ets b/api/arkui/component/polygon.static.d.ets new file mode 100644 index 0000000000..d34bf598d0 --- /dev/null +++ b/api/arkui/component/polygon.static.d.ets @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { CommonShapeMethod, AttributeModifier, CommonMethod } from "./common"; +import { ShapePoint } from "./line"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +/** + * Define options used to construct a polygon. + * + * @interface PolygonOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +export declare interface PolygonOptions { + /** + * Polygon width. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + width?: string | number; + /** + * Polygon height. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + height?: string | number; +} +export declare interface PolygonAttribute extends CommonShapeMethod { + /** + * Called when the vertex coordinate list of a polygon is set. + * + * @param { Array } value + * @returns { PolygonAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default points(value: Array | undefined): this; + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +@memo +@ComponentBuilder +export declare function Polygon( + options?: PolygonOptions, + @memo + content_?: () => void, +): PolygonAttribute diff --git a/api/arkui/component/polyline.static.d.ets b/api/arkui/component/polyline.static.d.ets new file mode 100644 index 0000000000..2407211eec --- /dev/null +++ b/api/arkui/component/polyline.static.d.ets @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { CommonShapeMethod, AttributeModifier, CommonMethod } from "./common"; +import { ShapePoint } from "./line"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +/** + * Define options used to construct a polyline. + * + * @interface PolylineOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +export declare interface PolylineOptions { + /** + * Polyline width. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + width?: string | number; + /** + * Polyline height. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + height?: string | number; +} +export declare interface PolylineAttribute extends CommonShapeMethod { + /** + * Called when the polyline is set to pass through the coordinate point list. + * + * @param { Array } value + * @returns { PolylineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default points(value: Array | undefined): this; + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +@memo +@ComponentBuilder +export declare function Polyline( + options?: PolylineOptions, + @memo + content_?: () => void, +): PolylineAttribute diff --git a/api/arkui/component/rect.static.d.ets b/api/arkui/component/rect.static.d.ets new file mode 100644 index 0000000000..aedc2b01b8 --- /dev/null +++ b/api/arkui/component/rect.static.d.ets @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { CommonShapeMethod, AttributeModifier, CommonMethod } from "./common"; +import { Length } from "./units"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +/** + * Defines the RadiusItem, the first element is the width of the rounded corner, the second is the height of the rounded corner. + * + * @typedef { [Length, Length] } RadiusItem + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +export type RadiusItem = [ + Length, + Length +]; +/** + * Define options used to construct a rectangle. + * + * @interface RectOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +export declare interface RectOptions { + /** + * Rectangle width. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + width?: number | string; + /** + * Rectangle height. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + height?: number | string; + /** + * Corner radius of the rectangle. + * + * @type { ?(Length | Array) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + radius?: Length | Array; +} +/** + * Define options used to construct a rectangle with rounded corners. + * + * @interface RoundedRectOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +export declare interface RoundedRectOptions { + /** + * Rectangle width. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + width?: number | string; + /** + * Rectangle height. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + height?: number | string; + /** + * Width of the corner radius. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + radiusWidth?: number | string; + /** + * Height of the corner radius. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + radiusHeight?: number | string; +} +export declare interface RectAttribute extends CommonShapeMethod { + /** + * Called when the fillet width is set. + * + * @param { number | string } value + * @returns { RectAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default radiusWidth(value: number | string | undefined): this; + /** + * Called when the fillet height is set. + * + * @param { number | string } value + * @returns { RectAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default radiusHeight(value: number | string | undefined): this; + /** + * Called when the fillet size is set. + * + * @param { Length | Array } value + * @returns { RectAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default radius(value: Length | Array | undefined): this; + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +@memo +@ComponentBuilder +export declare function Rect( + options?: RectOptions | RoundedRectOptions, + @memo + content_?: () => void, +): RectAttribute diff --git a/api/arkui/component/shape.static.d.ets b/api/arkui/component/shape.static.d.ets new file mode 100644 index 0000000000..3294da6e86 --- /dev/null +++ b/api/arkui/component/shape.static.d.ets @@ -0,0 +1,249 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { CommonMethod, PixelMap, AttributeModifier } from "./common"; +import { ResourceColor, Length } from "./units"; +import { Resource } from '../../global/resource'; +import { LineCapStyle, LineJoinStyle } from "./enums"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +/** + * Viewport bounding box. + * + * @interface ViewportRect + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +export declare interface ViewportRect { + /** + * Viewport X coordinate. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + x?: number | string; + /** + * Viewport Y coordinate. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + y?: number | string; + /** + * Viewport width. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + width?: number | string; + /** + * Viewport height. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + height?: number | string; +} +export declare interface ShapeAttribute extends CommonMethod { + /** + * Viewport of shape + * + * @param { ViewportRect } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default viewPort(value: ViewportRect | undefined): this; + /** + * Called when the border color is set. + * + * @param { ResourceColor } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default stroke(value: ResourceColor | undefined): this; + /** + * Called when the fill color is set. + * + * @param { ResourceColor } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default fill(value: ResourceColor | undefined): this; + /** + * Called when the offset of the starting point of border drawing is set. + * + * @param { number | string } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default strokeDashOffset(value: number | string | undefined): this; + /** + * Called when the gap of the border is set. + * + * @param { Array } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default strokeDashArray(value: Array | undefined): this; + /** + * Called when the path endpoint drawing style is set. + * + * @param { LineCapStyle } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default strokeLineCap(value: LineCapStyle | undefined): this; + /** + * Called when the border corner drawing style is set. + * + * @param { LineJoinStyle } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default strokeLineJoin(value: LineJoinStyle | undefined): this; + /** + * Called when the limit value for drawing acute angles as oblique angles is set. + * + * @param { number | string } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default strokeMiterLimit(value: number | string | undefined): this; + /** + * Called when the opacity of the border is set. + * + * @param { number | string | Resource } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default strokeOpacity(value: number | string | Resource | undefined): this; + /** + * Called when the transparency of the border is set. + * + * @param { number | string | Resource } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default fillOpacity(value: number | string | Resource | undefined): this; + /** + * Called when the width of the border is set. + * + * @param { number | string } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default strokeWidth(value: number | string | undefined): this; + /** + * Called when setting whether anti aliasing is on. + * + * @param { boolean } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default antiAlias(value: boolean | undefined): this; + /** + * Called when shape mesh. + * + * @param { Array } value + * @param { number } column + * @param { number } row + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + default mesh(value: Array | undefined, column: number | undefined, row: number | undefined): this; + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +@memo +@ComponentBuilder +export declare function Shape( + value?: PixelMap, + @memo + content_?: () => void, +): ShapeAttribute diff --git a/api/arkui/component/video.static.d.ets b/api/arkui/component/video.static.d.ets new file mode 100644 index 0000000000..58fff4de55 --- /dev/null +++ b/api/arkui/component/video.static.d.ets @@ -0,0 +1,584 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { Resource } from '../../global/resource'; +import { ImageAIOptions, ImageAnalyzerConfig } from "./imageCommon"; +import { ImageFit } from "./enums"; +import { CommonMethod, Callback, PixelMap, AttributeModifier } from "./common"; +import { VoidCallback } from "./units"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +/** + * Seek mode. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare enum SeekMode { + /** + * Sync to keyframes before the time point. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + PreviousKeyframe, + /** + * Sync to keyframes after the time point. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + NextKeyframe, + /** + * Sync to closest keyframes. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + ClosestKeyframe, + /** + * Seek to frames closest the time point. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Accurate +} +/** + * playback speed. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare enum PlaybackSpeed { + /** + * 0.75x speed playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Speed_Forward_0_75_X, + /** + * 1.00x speed playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Speed_Forward_1_00_X, + /** + * 1.25x speed playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Speed_Forward_1_25_X, + /** + * 1.75x speed playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Speed_Forward_1_75_X, + /** + * 2.00x speed playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Speed_Forward_2_00_X +} +/** + * Fullscreen information of the video. + * + * @typedef FullscreenInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export interface FullscreenInfo { + /** + * The flag whether play in full screen. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + fullscreen: boolean; +} +/** + * Prepared information of the video. + * + * @typedef PreparedInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export interface PreparedInfo { + /** + * The duration of the current video, in seconds. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + duration: number; +} +/** + * Playback information of the video. + * + * @typedef PlaybackInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export interface PlaybackInfo { + /** + * The current video playback progress, expressed in seconds. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + time: number; +} +/** + * Defines the video poster options. + * + * @interface PosterOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare interface PosterOptions { + /** + * Whether to display the first frame of video on prepared status of AVPlayer. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + showFirstFrame?: boolean; +} +/** + * Defines the video options. + * + * @interface VideoOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare interface VideoOptions { + /** + * src of video. + * + * @type { ?(string | Resource) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + src?: string | Resource; + /** + * playback rate of video. + * + * @type { ?(number | string | PlaybackSpeed) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + currentProgressRate?: number | string | PlaybackSpeed; + /** + * preview uri of video. + * + * @type { ?(string | PixelMap | Resource) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + previewUri?: string | PixelMap | Resource; + /** + * controller of video. + * + * @type { ?VideoController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + controller?: VideoController; + /** + * image ai options of video. + * + * @type { ?ImageAIOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + imageAIOptions?: ImageAIOptions; + /** + * poster options of video. + * + * @type { ?PosterOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + posterOptions?: PosterOptions; +} +/** + * Defines the video controller. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class VideoController { + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(); + /** + * Provides events to play. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + start(): void; + /** + * Provides a pause event for playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + pause(): void; + /** + * Provides an event to stop playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + stop(): void; + /** + * Provide the progress method of video playback. + * + * @param { number } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + setCurrentTime(value: number): void; + /** + * Provides a full screen playback method. + * + * @param { boolean } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + requestFullscreen(value: boolean): void; + /** + * Provides a method to exit full screen playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + exitFullscreen(): void; + /** + * Provide the progress method of video playback. + * + * @param { number } value + * @param { SeekMode } seekMode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + setCurrentTime(value: number, seekMode: SeekMode): void; + /** + * Provide the reset method of video playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + reset(): void; +} +export declare interface VideoAttribute extends CommonMethod { + /** + * Called when judging whether the video is muted. + * + * @param { boolean } value + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default muted(value: boolean | undefined): this; + /** + * Called when judging whether the video is played automatically. + * + * @param { boolean } value + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default autoPlay(value: boolean | undefined): this; + /** + * Called when judging whether the control bar is displayed. + * + * @param { boolean } value + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default controls(value: boolean | undefined): this; + /** + * Called when judging whether the video is played circular. + * + * @param { boolean } value + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default loop(value: boolean | undefined): this; + /** + * Called when determining the zoom type of the video source. + * + * @param { ImageFit } value + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default objectFit(value: ImageFit | undefined): this; + /** + * Called when the video is played. + * + * @param { VoidCallback } event + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default onStart(event: VoidCallback | undefined): this; + /** + * Called when the video is paused. + * + * @param { VoidCallback } event + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default onPause(event: VoidCallback | undefined): this; + /** + * Called when the video playback ends. + * + * @param { VoidCallback } event + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default onFinish(event: VoidCallback | undefined): this; + /** + * Called when the video enters and exits the full screen. + * + * @param { Callback } callback + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default onFullscreenChange(callback: Callback | undefined): this; + /** + * Called when the video preparation is complete. + * + * @param { Callback } callback + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default onPrepared(callback: Callback | undefined): this; + /** + * Called when the time information is reported when the progress bar process is operated. + * + * @param { Callback } callback + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default onSeeking(callback: Callback | undefined): this; + /** + * Called when the playback time information is reported after the operation progress bar is completed. + * + * @param { Callback } callback + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default onSeeked(callback: Callback | undefined): this; + /** + * Called when the playback progress changes. + * + * @param { Callback } callback + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default onUpdate(callback: Callback | undefined): this; + /** + * Called when playback fails. + * + * @param { function } event + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default onError(event: (() => void) | undefined): this; + /** + * Called when the video is stopped. + * + * @param { VoidCallback } event + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default onStop(event: VoidCallback | undefined): this; + /** + * Enable image analyzer. + * + * @param { boolean } enable + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + default enableAnalyzer(enable: boolean | undefined): this; + /** + * Set image analyzer with config. + * + * @param { ImageAnalyzerConfig } config + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + default analyzerConfig(config: ImageAnalyzerConfig | undefined): this; + /** + * Indicates whether to response shortcut key. The default value is false. + * If the value is true, video will respond to the shortcut keys as follows: + * Space key: play/pause the video. + * Up/Down arrow key: turn up/down volume of the video. + * Right/Left arrow key: fast forward/backward the video. + * + * @param { boolean } enabled + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + default enableShortcutKey(enabled: boolean | undefined): this; + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +@memo +@ComponentBuilder +export declare function Video( + value: VideoOptions, + @memo + content_?: () => void, +): VideoAttribute -- Gitee From 9c8f8a67c717229c7c28a183231e3471cdecb240 Mon Sep 17 00:00:00 2001 From: sunbees Date: Sat, 26 Jul 2025 09:59:58 +0800 Subject: [PATCH 2/4] clip shape&video Signed-off-by: sunbees --- api/arkui/component/circle.static.d.ets | 45 +++++++++++-- api/arkui/component/ellipse.static.d.ets | 42 ++++++++++-- api/arkui/component/line.static.d.ets | 44 +++++++++++-- api/arkui/component/path.static.d.ets | 43 ++++++++++-- api/arkui/component/polygon.static.d.ets | 43 ++++++++++-- api/arkui/component/polyline.static.d.ets | 42 ++++++++++-- api/arkui/component/rect.static.d.ets | 69 +++++++++++++++----- api/arkui/component/shape.static.d.ets | 79 ++++++++++++++++------- api/arkui/component/video.static.d.ets | 76 ++++++++++++++++------ 9 files changed, 394 insertions(+), 89 deletions(-) diff --git a/api/arkui/component/circle.static.d.ets b/api/arkui/component/circle.static.d.ets index 5c5359326d..aff3d4df8f 100644 --- a/api/arkui/component/circle.static.d.ets +++ b/api/arkui/component/circle.static.d.ets @@ -1,3 +1,4 @@ +use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,10 +16,11 @@ /** * @file * @kit ArkUI - * @arkts 1.2 + * @arkts static */ import { CommonShapeMethod, CommonMethod, AttributeModifier } from "./common"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + /** * Defines circle options for Circle component. * @@ -33,34 +35,65 @@ export declare interface CircleOptions { /** * Defines the width property. * - * @type { ?(string | number) } + * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - width?: string | number; + width?: string | double; /** * Defines the height property. * - * @type { ?(string | number) } + * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - height?: string | number; + height?: string | double; } + +/** + * Circle drawing component attribute functions. + * + * @extends CommonShapeMethod + * @interface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ export declare interface CircleAttribute extends CommonShapeMethod { + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier - Circle’s AttributeModifier + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } +/** + * Circle is returned when the parameter is transferred. + * + * @param { CircleOptions } [options] - The options to create a Circle + * @returns { CircleAttribute } The attribute of the Circle. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ @memo @ComponentBuilder export declare function Circle( - value?: CircleOptions, + options?: CircleOptions, @memo content_?: () => void, ): CircleAttribute diff --git a/api/arkui/component/ellipse.static.d.ets b/api/arkui/component/ellipse.static.d.ets index 6865451be7..c195ac3c51 100644 --- a/api/arkui/component/ellipse.static.d.ets +++ b/api/arkui/component/ellipse.static.d.ets @@ -1,3 +1,4 @@ +use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,10 +16,11 @@ /** * @file * @kit ArkUI - * @arkts 1.2 + * @arkts static */ import { CommonShapeMethod, AttributeModifier, CommonMethod } from "./common"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + /** * Ellipse constructor options. * @@ -33,30 +35,60 @@ export interface EllipseOptions { /** * Set width. * - * @type { ?(string | number) } + * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - width?: string | number; + width?: string | double; /** * Set height. * - * @type { ?(string | number) } + * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - height?: string | number; + height?: string | double; } + +/** + * Provides attribute for Ellipse. + * @extends CommonShapeMethod + * @interface EllipseAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ export declare interface EllipseAttribute extends CommonShapeMethod { + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier - Ellipse’s AttributeModifier + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } +/** + * Ellipse is returned when the parameter is transferred. + * + * @param { EllipseOptions } [options] - The options to create an Ellipse + * @returns { EllipseAttribute } The attribute of the Ellipse. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ @memo @ComponentBuilder export declare function Ellipse( diff --git a/api/arkui/component/line.static.d.ets b/api/arkui/component/line.static.d.ets index d59441f8a5..ff97b2b3c2 100644 --- a/api/arkui/component/line.static.d.ets +++ b/api/arkui/component/line.static.d.ets @@ -1,3 +1,4 @@ +use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,11 +16,12 @@ /** * @file * @kit ArkUI - * @arkts 1.2 + * @arkts static */ import { CommonShapeMethod, CommonMethod, AttributeModifier } from "./common"; import { Length } from "./units"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + /** * Defines the Shape Point, the first element is the x-axis offset and the second is the y-axis. * @@ -34,6 +36,7 @@ export type ShapePoint = [ Length, Length ]; + /** * Defines Line constructor options. * @@ -48,26 +51,38 @@ export interface LineOptions { /** * Width of the rectangle where the line resides. * - * @type { ?(string | number) } + * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - width?: string | number; + width?: string | double; /** * Height of the rectangle where the line resides. * - * @type { ?(string | number) } + * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - height?: string | number; + height?: string | double; } + +/** + * Provides attribute for Line. + * + * @extends CommonShapeMethod + * @interface LineAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ export declare interface LineAttribute extends CommonShapeMethod { /** * Coordinate of the start point of the line (relative coordinate). @@ -93,9 +108,28 @@ export declare interface LineAttribute extends CommonShapeMethod { * @since 20 */ default endPoint(value: ShapePoint | undefined): this; + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier - Line’s AttributeModifier + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } +/** + * Line is returned when the parameter is transferred. + * + * @param { LineOptions } [options] - The options to create a Line + * @returns { LineAttribute } The attribute of the Line. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ @memo @ComponentBuilder export declare function Line( diff --git a/api/arkui/component/path.static.d.ets b/api/arkui/component/path.static.d.ets index a52b914c87..5af17c2605 100644 --- a/api/arkui/component/path.static.d.ets +++ b/api/arkui/component/path.static.d.ets @@ -1,3 +1,4 @@ +use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,10 +16,11 @@ /** * @file * @kit ArkUI - * @arkts 1.2 + * @arkts static */ import { CommonShapeMethod, AttributeModifier, CommonMethod } from "./common"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + /** * Define options used to construct a path. * @@ -32,24 +34,24 @@ import { memo, ComponentBuilder } from "./../stateManagement/runtime"; export declare interface PathOptions { /** * Width option. - * @type { ?(number | string) } + * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - width?: number | string; + width?: double | string; /** * Height option. - * @type { ?(number | string) } + * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - height?: number | string; + height?: double | string; /** * Commands option. * @type { ?string } @@ -61,6 +63,18 @@ export declare interface PathOptions { */ commands?: string; } + +/** + * Provides methods for attribute path component. + * + * @extends CommonShapeMethod + * @interface PathAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ export declare interface PathAttribute extends CommonShapeMethod { /** * Called when the command string drawn by the path is set. @@ -74,9 +88,28 @@ export declare interface PathAttribute extends CommonShapeMethod { * @since 20 */ default commands(value: string | undefined): this; + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier - Path’s AttributeModifier + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } +/** + * Path is returned when the parameter is transferred. + * + * @param { PathOptions } [options] - The options to create a Path + * @returns { PathAttribute } The attribute of the Path. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ @memo @ComponentBuilder export declare function Path( diff --git a/api/arkui/component/polygon.static.d.ets b/api/arkui/component/polygon.static.d.ets index d34bf598d0..ec0b7924d2 100644 --- a/api/arkui/component/polygon.static.d.ets +++ b/api/arkui/component/polygon.static.d.ets @@ -1,3 +1,4 @@ +use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,11 +16,12 @@ /** * @file * @kit ArkUI - * @arkts 1.2 + * @arkts static */ import { CommonShapeMethod, AttributeModifier, CommonMethod } from "./common"; import { ShapePoint } from "./line"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + /** * Define options used to construct a polygon. * @@ -34,26 +36,38 @@ export declare interface PolygonOptions { /** * Polygon width. * - * @type { ?(string | number) } + * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - width?: string | number; + width?: string | double; /** * Polygon height. * - * @type { ?(string | number) } + * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - height?: string | number; + height?: string | double; } + +/** + * Provides attribute for Polygon. + * + * @extends CommonShapeMethod + * @interface PolygonAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ export declare interface PolygonAttribute extends CommonShapeMethod { /** * Called when the vertex coordinate list of a polygon is set. @@ -67,9 +81,28 @@ export declare interface PolygonAttribute extends CommonShapeMethod { * @since 20 */ default points(value: Array | undefined): this; + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier - Polygon’s AttributeModifier + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } +/** + * Polygon is returned when the parameter is transferred. + * + * @param { PolygonOptions } [options] - The options to create a Polygon + * @returns { PolygonAttribute } The attribute of the Polygon. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ @memo @ComponentBuilder export declare function Polygon( diff --git a/api/arkui/component/polyline.static.d.ets b/api/arkui/component/polyline.static.d.ets index 2407211eec..aae91b8240 100644 --- a/api/arkui/component/polyline.static.d.ets +++ b/api/arkui/component/polyline.static.d.ets @@ -1,3 +1,4 @@ +use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,11 +16,12 @@ /** * @file * @kit ArkUI - * @arkts 1.2 + * @arkts static */ import { CommonShapeMethod, AttributeModifier, CommonMethod } from "./common"; import { ShapePoint } from "./line"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + /** * Define options used to construct a polyline. * @@ -34,26 +36,37 @@ export declare interface PolylineOptions { /** * Polyline width. * - * @type { ?(string | number) } + * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - width?: string | number; + width?: string | double; /** * Polyline height. * - * @type { ?(string | number) } + * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - height?: string | number; + height?: string | double; } + +/** + * Defines Polyline attribute + * @extends CommonShapeMethod + * @interface PolylineAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ export declare interface PolylineAttribute extends CommonShapeMethod { /** * Called when the polyline is set to pass through the coordinate point list. @@ -67,9 +80,28 @@ export declare interface PolylineAttribute extends CommonShapeMethod { * @since 20 */ default points(value: Array | undefined): this; + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier - Polyline’s AttributeModifier + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } +/** + * Polyline is returned when the parameter is transferred. + * + * @param { PolylineOptions } [options] - The options to create a Polyline + * @returns { PolylineAttribute } The attribute of the Polyline. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ @memo @ComponentBuilder export declare function Polyline( diff --git a/api/arkui/component/rect.static.d.ets b/api/arkui/component/rect.static.d.ets index aedc2b01b8..1d4f6ee99b 100644 --- a/api/arkui/component/rect.static.d.ets +++ b/api/arkui/component/rect.static.d.ets @@ -1,3 +1,4 @@ +use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,11 +16,12 @@ /** * @file * @kit ArkUI - * @arkts 1.2 + * @arkts static */ import { CommonShapeMethod, AttributeModifier, CommonMethod } from "./common"; import { Length } from "./units"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + /** * Defines the RadiusItem, the first element is the width of the rounded corner, the second is the height of the rounded corner. * @@ -34,6 +36,7 @@ export type RadiusItem = [ Length, Length ]; + /** * Define options used to construct a rectangle. * @@ -48,25 +51,25 @@ export declare interface RectOptions { /** * Rectangle width. * - * @type { ?(number | string) } + * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - width?: number | string; + width?: double | string; /** * Rectangle height. * - * @type { ?(number | string) } + * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - height?: number | string; + height?: double | string; /** * Corner radius of the rectangle. * @@ -79,6 +82,7 @@ export declare interface RectOptions { */ radius?: Length | Array; } + /** * Define options used to construct a rectangle with rounded corners. * @@ -93,53 +97,65 @@ export declare interface RoundedRectOptions { /** * Rectangle width. * - * @type { ?(number | string) } + * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - width?: number | string; + width?: double | string; /** * Rectangle height. * - * @type { ?(number | string) } + * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - height?: number | string; + height?: double | string; /** * Width of the corner radius. * - * @type { ?(number | string) } + * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - radiusWidth?: number | string; + radiusWidth?: double | string; /** * Height of the corner radius. * - * @type { ?(number | string) } + * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - radiusHeight?: number | string; + radiusHeight?: double | string; } + +/** + * rect attribute declaration. + * + * @extends CommonShapeMethod + * @interface RectAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ export declare interface RectAttribute extends CommonShapeMethod { /** * Called when the fillet width is set. * - * @param { number | string } value + * @param { double | string } value * @returns { RectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -147,11 +163,11 @@ export declare interface RectAttribute extends CommonShapeMethod { * @atomicservice * @since 20 */ - default radiusWidth(value: number | string | undefined): this; + default radiusWidth(value: double | string | undefined): this; /** * Called when the fillet height is set. * - * @param { number | string } value + * @param { double | string } value * @returns { RectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -159,7 +175,7 @@ export declare interface RectAttribute extends CommonShapeMethod { * @atomicservice * @since 20 */ - default radiusHeight(value: number | string | undefined): this; + default radiusHeight(value: double | string | undefined): this; /** * Called when the fillet size is set. * @@ -172,9 +188,28 @@ export declare interface RectAttribute extends CommonShapeMethod { * @since 20 */ default radius(value: Length | Array | undefined): this; + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier - Rect’s AttributeModifier + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } +/** + * Rect is returned when the parameter is transferred. + * + * @param { RectOptions | RoundedRectOptions } [options] - The options to create a Rect + * @returns { RectAttribute } The attribute of the Rect + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ @memo @ComponentBuilder export declare function Rect( diff --git a/api/arkui/component/shape.static.d.ets b/api/arkui/component/shape.static.d.ets index 3294da6e86..5a34d6b21e 100644 --- a/api/arkui/component/shape.static.d.ets +++ b/api/arkui/component/shape.static.d.ets @@ -1,3 +1,4 @@ +use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,13 +16,14 @@ /** * @file * @kit ArkUI - * @arkts 1.2 + * @arkts static */ import { CommonMethod, PixelMap, AttributeModifier } from "./common"; import { ResourceColor, Length } from "./units"; import { Resource } from '../../global/resource'; import { LineCapStyle, LineJoinStyle } from "./enums"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + /** * Viewport bounding box. * @@ -33,51 +35,63 @@ import { memo, ComponentBuilder } from "./../stateManagement/runtime"; * @since 20 */ export declare interface ViewportRect { + /** * Viewport X coordinate. * - * @type { ?(number | string) } + * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - x?: number | string; + x?: double | string; /** * Viewport Y coordinate. * - * @type { ?(number | string) } + * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - y?: number | string; + y?: double | string; /** * Viewport width. * - * @type { ?(number | string) } + * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - width?: number | string; + width?: double | string; /** * Viewport height. * - * @type { ?(number | string) } + * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 */ - height?: number | string; + height?: double | string; } + +/** + * Provides attribute for Shape. + * @extends CommonMethod + * @interface ShapeAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ export declare interface ShapeAttribute extends CommonMethod { /** * Viewport of shape @@ -118,7 +132,7 @@ export declare interface ShapeAttribute extends CommonMethod { /** * Called when the offset of the starting point of border drawing is set. * - * @param { number | string } value + * @param { double | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -126,7 +140,7 @@ export declare interface ShapeAttribute extends CommonMethod { * @atomicservice * @since 20 */ - default strokeDashOffset(value: number | string | undefined): this; + default strokeDashOffset(value: double | string | undefined): this; /** * Called when the gap of the border is set. * @@ -166,7 +180,7 @@ export declare interface ShapeAttribute extends CommonMethod { /** * Called when the limit value for drawing acute angles as oblique angles is set. * - * @param { number | string } value + * @param { double | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -174,11 +188,11 @@ export declare interface ShapeAttribute extends CommonMethod { * @atomicservice * @since 20 */ - default strokeMiterLimit(value: number | string | undefined): this; + default strokeMiterLimit(value: double | string | undefined): this; /** * Called when the opacity of the border is set. * - * @param { number | string | Resource } value + * @param { double | string | Resource } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -186,11 +200,11 @@ export declare interface ShapeAttribute extends CommonMethod { * @atomicservice * @since 20 */ - default strokeOpacity(value: number | string | Resource | undefined): this; + default strokeOpacity(value: double | string | Resource | undefined): this; /** * Called when the transparency of the border is set. * - * @param { number | string | Resource } value + * @param { double | string | Resource } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -198,11 +212,11 @@ export declare interface ShapeAttribute extends CommonMethod { * @atomicservice * @since 20 */ - default fillOpacity(value: number | string | Resource | undefined): this; + default fillOpacity(value: double | string | Resource | undefined): this; /** * Called when the width of the border is set. * - * @param { number | string } value + * @param { double | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -210,7 +224,7 @@ export declare interface ShapeAttribute extends CommonMethod { * @atomicservice * @since 20 */ - default strokeWidth(value: number | string | undefined): this; + default strokeWidth(value: double | string | undefined): this; /** * Called when setting whether anti aliasing is on. * @@ -226,9 +240,9 @@ export declare interface ShapeAttribute extends CommonMethod { /** * Called when shape mesh. * - * @param { Array } value - * @param { number } column - * @param { number } row + * @param { Array } value + * @param { int } column + * @param { int } row * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -236,10 +250,29 @@ export declare interface ShapeAttribute extends CommonMethod { * @atomicservice * @since 20 */ - default mesh(value: Array | undefined, column: number | undefined, row: number | undefined): this; + default mesh(value: Array | undefined, column: int | undefined, row: int | undefined): this; + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier - Shape’s AttributeModifier + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } +/** + * Shape is returned when the parameter is transferred. + * + * @param { PixelMap } [value] - A pixelMap can be drawn in the area of shape. + * @returns { ShapeAttribute } The attribute of the Shape. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ @memo @ComponentBuilder export declare function Shape( diff --git a/api/arkui/component/video.static.d.ets b/api/arkui/component/video.static.d.ets index 58fff4de55..63882530c3 100644 --- a/api/arkui/component/video.static.d.ets +++ b/api/arkui/component/video.static.d.ets @@ -1,3 +1,4 @@ +use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,7 +16,7 @@ /** * @file * @kit ArkUI - * @arkts 1.2 + * @arkts static */ import { Resource } from '../../global/resource'; import { ImageAIOptions, ImageAnalyzerConfig } from "./imageCommon"; @@ -23,6 +24,7 @@ import { ImageFit } from "./enums"; import { CommonMethod, Callback, PixelMap, AttributeModifier } from "./common"; import { VoidCallback } from "./units"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + /** * Seek mode. * @@ -70,6 +72,7 @@ export declare enum SeekMode { */ Accurate } + /** * playback speed. * @@ -126,6 +129,7 @@ export declare enum PlaybackSpeed { */ Speed_Forward_2_00_X } + /** * Fullscreen information of the video. * @@ -147,6 +151,7 @@ export interface FullscreenInfo { */ fullscreen: boolean; } + /** * Prepared information of the video. * @@ -160,14 +165,15 @@ export interface PreparedInfo { /** * The duration of the current video, in seconds. * - * @type { number } + * @type { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ - duration: number; + duration: int; } + /** * Playback information of the video. * @@ -181,14 +187,15 @@ export interface PlaybackInfo { /** * The current video playback progress, expressed in seconds. * - * @type { number } + * @type { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ - time: number; + time: int; } + /** * Defines the video poster options. * @@ -209,6 +216,7 @@ export declare interface PosterOptions { */ showFirstFrame?: boolean; } + /** * Defines the video options. * @@ -232,13 +240,13 @@ export declare interface VideoOptions { /** * playback rate of video. * - * @type { ?(number | string | PlaybackSpeed) } + * @type { ?(double | string | PlaybackSpeed) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ - currentProgressRate?: number | string | PlaybackSpeed; + currentProgressRate?: double | string | PlaybackSpeed; /** * preview uri of video. * @@ -278,6 +286,7 @@ export declare interface VideoOptions { */ posterOptions?: PosterOptions; } + /** * Defines the video controller. * @@ -324,45 +333,46 @@ export declare class VideoController { */ stop(): void; /** - * Provide the progress method of video playback. + * Provides a full screen playback method. * - * @param { number } value + * @param { boolean } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ - setCurrentTime(value: number): void; + requestFullscreen(value: boolean): void; /** - * Provides a full screen playback method. + * Provides a method to exit full screen playback. * - * @param { boolean } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ - requestFullscreen(value: boolean): void; + exitFullscreen(): void; /** - * Provides a method to exit full screen playback. + * Provide the progress method of video playback without SeekMode. * + * @param { double } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ - exitFullscreen(): void; + setCurrentTimeDefault(value: double): void; /** - * Provide the progress method of video playback. + * Provide the progress method of video playback with SeekMode. * - * @param { number } value + * @param { double } value * @param { SeekMode } seekMode * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ - setCurrentTime(value: number, seekMode: SeekMode): void; + setCurrentTimeWithMode(value: double, seekMode: SeekMode): void; + overload setCurrentTime {setCurrentTimeDefault, setCurrentTimeWithMode}; /** * Provide the reset method of video playback. * @@ -372,6 +382,17 @@ export declare class VideoController { */ reset(): void; } + +/** + * Defines the Video attribute. + * + * @extends CommonMethod + * @interface VideoAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ export declare interface VideoAttribute extends CommonMethod { /** * Called when judging whether the video is muted. @@ -572,9 +593,28 @@ export declare interface VideoAttribute extends CommonMethod { * @since 20 */ default enableShortcutKey(enabled: boolean | undefined): this; + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier - Video’s AttributeModifier + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } +/** + * Video is returned when the parameter is transferred. + * + * @param { VideoOptions } value - The options to create a Video + * @returns { VideoAttribute } The attribute of the Video + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ @memo @ComponentBuilder export declare function Video( -- Gitee From 5491e65d78c1a3ab98db4d43bc874ca6e8060dbe Mon Sep 17 00:00:00 2001 From: sd-wu Date: Mon, 7 Jul 2025 14:31:34 +0800 Subject: [PATCH 3/4] =?UTF-8?q?typeNode.XComponent=E7=9A=84arkts1.2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sd-wu --- api/@internal/component/ets/xcomponent.d.ts | 219 ++--------- api/arkui/FrameNode.d.ts | 99 +++++ api/arkui/component/xcomponent.static.d.ets | 391 ++++++++++++++++++++ 3 files changed, 525 insertions(+), 184 deletions(-) create mode 100644 api/arkui/component/xcomponent.static.d.ets diff --git a/api/@internal/component/ets/xcomponent.d.ts b/api/@internal/component/ets/xcomponent.d.ts index 422c84bc0c..c49c461306 100644 --- a/api/@internal/component/ets/xcomponent.d.ts +++ b/api/@internal/component/ets/xcomponent.d.ts @@ -18,13 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ImageAIOptions, ImageAnalyzerConfig } from './imageCommon'; -import { CommonMethod } from './common'; -import { XComponentType } from './enums'; -import { VoidCallback } from './units'; -/*** endif */ - /** * Describes the rectangle of the surface held by the XComponent. * @@ -40,8 +33,7 @@ import { VoidCallback } from './units'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ declare interface SurfaceRect { /** @@ -61,8 +53,7 @@ declare interface SurfaceRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ offsetX?: number; @@ -83,8 +74,7 @@ declare interface SurfaceRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ offsetY?: number; @@ -104,8 +94,7 @@ declare interface SurfaceRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ surfaceWidth: number; @@ -125,8 +114,7 @@ declare interface SurfaceRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ surfaceHeight: number; } @@ -146,8 +134,7 @@ declare interface SurfaceRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ declare interface SurfaceRotationOptions { /** @@ -166,8 +153,7 @@ declare interface SurfaceRotationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ lock?: boolean; } @@ -186,8 +172,7 @@ declare interface SurfaceRotationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class XComponentController { /** @@ -202,8 +187,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(); @@ -223,8 +207,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getXComponentSurfaceId(): string; @@ -246,8 +229,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getXComponentContext(): Object; @@ -282,8 +264,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ setXComponentSurfaceRect(rect: SurfaceRect): void; @@ -303,8 +284,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ getXComponentSurfaceRect(): SurfaceRect; @@ -324,8 +304,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ setXComponentSurfaceRotation(rotationOptions: SurfaceRotationOptions): void; @@ -345,8 +324,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ getXComponentSurfaceRotation(): Required; @@ -366,8 +344,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ onSurfaceCreated(surfaceId: string): void; @@ -389,8 +366,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ onSurfaceChanged(surfaceId: string, rect: SurfaceRect): void; @@ -410,8 +386,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ onSurfaceDestroyed(surfaceId: string): void; @@ -428,8 +403,7 @@ declare class XComponentController { * @throws { BusinessError } 110003 - Image analysis is stopped. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ startImageAnalyzer(config: ImageAnalyzerConfig): Promise; @@ -439,8 +413,7 @@ declare class XComponentController { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ stopImageAnalyzer(): void; @@ -481,8 +454,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ declare interface XComponentOptions { /** @@ -500,8 +472,7 @@ declare interface XComponentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ type: XComponentType; @@ -521,8 +492,7 @@ declare interface XComponentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ controller: XComponentController; @@ -533,8 +503,7 @@ declare interface XComponentOptions { * @type { ?ImageAIOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ imageAIOptions?: ImageAIOptions; @@ -544,8 +513,7 @@ declare interface XComponentOptions { * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'17','1.2':'20'} - * @arkts 1.1&1.2 + * @since 17 */ screenId?: number; } @@ -556,8 +524,7 @@ declare interface XComponentOptions { * @interface NativeXComponentParameters * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ declare interface NativeXComponentParameters { /** @@ -566,8 +533,7 @@ declare interface NativeXComponentParameters { * @type { XComponentType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ type: XComponentType; @@ -577,8 +543,7 @@ declare interface NativeXComponentParameters { * @type { ?ImageAIOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ imageAIOptions?: ImageAIOptions; } @@ -673,8 +638,7 @@ interface XComponentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnNativeLoadCallback = (event?: object) => void; @@ -692,8 +656,7 @@ declare type OnNativeLoadCallback = (event?: object) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class XComponentAttribute extends CommonMethod { /** @@ -723,8 +686,7 @@ declare class XComponentAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onLoad(callback: OnNativeLoadCallback): XComponentAttribute; @@ -755,8 +717,7 @@ declare class XComponentAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onDestroy(event: VoidCallback): XComponentAttribute; @@ -770,8 +731,7 @@ declare class XComponentAttribute extends CommonMethod { * @returns { XComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableAnalyzer(enable: boolean): XComponentAttribute; @@ -782,8 +742,7 @@ declare class XComponentAttribute extends CommonMethod { * @returns { XComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ enableSecure(isSecure: boolean): XComponentAttribute; @@ -804,7 +763,6 @@ declare class XComponentAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ hdrBrightness(brightness: number): XComponentAttribute; @@ -815,8 +773,7 @@ declare class XComponentAttribute extends CommonMethod { * @returns { XComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ enableTransparentLayer(enabled: boolean): XComponentAttribute; } @@ -852,109 +809,3 @@ declare const XComponent: XComponentInterface; * @since 12 */ declare const XComponentInstance: XComponentAttribute; - -/** - * Defines the XComponent parameter interface. - * - * @interface XComponentParameter - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare interface XComponentParameter { - /** - * The id of xcomponent - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - id: string; - /** - * The type of xcomponent - * - * @type { XComponentType } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - type: XComponentType; - /** - * The name of the dynamic library compiled and output by the native layer. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - libraryname?: string; - /** - * The controller of xcomponent. - * - * @type { ?XComponentController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - controller?: XComponentController; -} - -/** - * Defines XComponent. - * - * @interface XComponentInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface XComponentInterface { - /** - * Constructor parameters - * - * @param { XComponentParameter } value - Indicates the options of the xcomponent. - * @returns { XComponentAttribute } The attribute of the xcomponent. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (value: XComponentParameter): XComponentAttribute; - - /** - * Constructor parameters - * - * @param { XComponentOptions } options - Indicates the options of the xcomponent. - * @returns { XComponentAttribute } The attribute of the xcomponent. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (options: XComponentOptions): XComponentAttribute; - - /** - * Constructor parameters - * - * @param { NativeXComponentParameters } params - Indicates the constructor parameters of the xcomponent for native developing. - * @returns { XComponentAttribute } The attribute of the xcomponent. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (params: NativeXComponentParameters): XComponentAttribute; -} \ No newline at end of file diff --git a/api/arkui/FrameNode.d.ts b/api/arkui/FrameNode.d.ts index d87c3e4572..c7e4fdd615 100644 --- a/api/arkui/FrameNode.d.ts +++ b/api/arkui/FrameNode.d.ts @@ -66,6 +66,7 @@ import { SliderAttribute, SliderOptions } from './component/slider'; import { ToggleAttribute, ToggleOptions } from './component/toggle'; import { CheckboxGroupAttribute, CheckboxGroupOptions } from './component/checkboxgroup'; import { RatingAttribute, RatingOptions } from './component/rating'; +import { XComponentAttribute, XComponentController, XComponentOptions, XComponentParameters, NativeXComponentParameters } from './component/xcomponent'; /*** endif */ /** @@ -3024,6 +3025,69 @@ export declare namespace typeNode { */ type XComponent = TypedFrameNode; + /** + * Defines the XComponent type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class XComponentFrameNode extends TypedFrameNode { + /** + * Initialize XComponent FrameNode. + * + * @param { XComponentParameters } value - Indicates the options of the xcomponent. + * @returns { XComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(value: XComponentParameters): XComponentAttribute; + + /** + * Initialize XComponent FrameNode. + * + * @param { XComponentOptions } options - Indicates the options of the xcomponent. + * @returns { XComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(options: XComponentOptions): XComponentAttribute; + + /** + * Initialize XComponent FrameNode. + * + * @param { NativeXComponentParameters } params - Indicates the constructor parameters of the xcomponent for native developing. + * @returns { XComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(params: NativeXComponentParameters): XComponentAttribute; + } + + /** + * Define the FrameNode type for XComponent. + * + * @typedef { XComponentFrameNode } XComponent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type XComponent = XComponentFrameNode; + /** * Create a FrameNode of XComponent type. * @@ -3034,6 +3098,17 @@ export declare namespace typeNode { * @atomicservice * @since 12 */ + /** + * Create a FrameNode of XComponent type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'XComponent' } nodeType - node type. + * @returns { XComponent } - Return XComponent type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ function createNode(context: UIContext, nodeType: 'XComponent'): XComponent; /** @@ -3047,6 +3122,18 @@ export declare namespace typeNode { * @atomicservice * @since 12 */ + /** + * Create a FrameNode of XComponent type with options. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'XComponent' } nodeType - node type. + * @param { XComponentOptions } options - initialization parameters. + * @returns { XComponent } - Return XComponent type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ function createNode(context: UIContext, nodeType: 'XComponent', options: XComponentOptions): XComponent; /** @@ -3060,6 +3147,18 @@ export declare namespace typeNode { * @atomicservice * @since 19 */ + /** + * Create a FrameNode of XComponent type with options for native developing. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'XComponent' } nodeType - node type. + * @param { NativeXComponentParameters } parameters - initialization parameters. + * @returns { XComponent } - Return XComponent type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ function createNode(context: UIContext, nodeType: 'XComponent', parameters: NativeXComponentParameters): XComponent; /** diff --git a/api/arkui/component/xcomponent.static.d.ets b/api/arkui/component/xcomponent.static.d.ets new file mode 100644 index 0000000000..ff51499661 --- /dev/null +++ b/api/arkui/component/xcomponent.static.d.ets @@ -0,0 +1,391 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * @kit ArkUI + */ +import { ImageAIOptions, ImageAnalyzerConfig } from "./imageCommon"; +import { CommonMethod, AttributeModifier, Callback } from "./common"; +import { XComponentType } from "./enums"; +import { VoidCallback } from "./units"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +/** + * Surface Rectangle information. + * + * @interface SurfaceRect + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare interface SurfaceRect { + /** + * The horizontal offset of the surface relative to XComponent. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + offsetX?: number; + /** + * The vertical offset of the surface relative to XComponent. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + offsetY?: number; + /** + * The width of the surface created by XComponent + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + surfaceWidth: number; + /** + * The height of the surface created by XComponent + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + surfaceHeight: number; +} +/** + * Defines the NativeXComponent Pointer type. + * + * @typedef { long } NativeXComponentPointer + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export type NativeXComponentPointer = long; +/** + * Surface rotation options. + * + * @interface SurfaceRotationOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare interface SurfaceRotationOptions { + /** + * Lock property of the surface rotation. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + lock?: boolean; +} +/** + * Defines XComponentController + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class XComponentController { + /** + * Constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(); + /** + * Get the id of surface created by XComponent. + * + * @returns { string } The id of surface created by XComponent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + getXComponentSurfaceId(): string; + /** + * Set the rectangle information of surface created by XComponent. + * + * @param { SurfaceRect } rect - The surface rectangle information. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + setXComponentSurfaceRect(rect: SurfaceRect): void; + /** + * Get the rectangle information of Surface created by XComponent. + * + * @returns { SurfaceRect } The surface rectangle information. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + getXComponentSurfaceRect(): SurfaceRect; + /** + * Set the rotation options of the Surface created by XComponent. + * + * @param { SurfaceRotationOptions } rotationOptions - The surface rotation options. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + setXComponentSurfaceRotation(rotationOptions: SurfaceRotationOptions): void; + /** + * Get the rotation options result of the Surface created by XComponent. + * + * @returns { Required } The surface rotation options result. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + getXComponentSurfaceRotation(): Required; + /** + * Called after the surface is first created. + * + * @param { string } surfaceId - The id of the surface created by XComponent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + onSurfaceCreated(surfaceId: string): void; + /** + * Called after the surface rectangle information is changed. + * + * @param { string } surfaceId - The id of the surface created by XComponent. + * @param { SurfaceRect } rect - The rectangle information of the surface created by XComponent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + onSurfaceChanged(surfaceId: string, rect: SurfaceRect): void; + /** + * Called when the surface is about to be destroyed. + * + * @param { string } surfaceId - The id of the surface created by XComponent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + onSurfaceDestroyed(surfaceId: string): void; + /** + * Start image analyzer. + * + * @param { ImageAnalyzerConfig } config - Image analyzer config. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 110001 - Image analysis feature is unsupported. + * @throws { BusinessError } 110002 - Image analysis is currently being executed. + * @throws { BusinessError } 110003 - Image analysis is stopped. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + startImageAnalyzer(config: ImageAnalyzerConfig): Promise; + /** + * Stop image analyzer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + stopImageAnalyzer(): void; +} +/** + * Defines the xcomponent options. + * + * @interface XComponentOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare interface XComponentOptions { + /** + * The type of xcomponent + * + * @type { XComponentType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + type: XComponentType; + /** + * The controller of xcomponent. + * + * @type { XComponentController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + controller: XComponentController; + /** + * Image ai options. + * + * @type { ?ImageAIOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + imageAIOptions?: ImageAIOptions; +} +/** + * Defines the native xcomponent parameters. + * + * @interface NativeXComponentParameters + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare interface NativeXComponentParameters { + /** + * The type of xcomponent + * + * @type { XComponentType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + type: XComponentType; + /** + * Image ai options. + * + * @type { ?ImageAIOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + imageAIOptions?: ImageAIOptions; +} +export declare interface XComponentAttribute extends CommonMethod { + /** + * Called when judging whether the xcomponent surface is created. + * + * @param { VoidCallback } callback - Called when judging whether the xcomponent surface is created. + * @returns { XComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default onLoad(callback: VoidCallback | undefined): this; + /** + * Called when judging whether the xcomponent is destroyed. + * + * @param { VoidCallback } event - Called when judging whether the xcomponent is destroyed. + * @returns { XComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + default onDestroy(event: VoidCallback | undefined): this; + /** + * Enable image analyzer for XComponent. + * + * @param { boolean } enable + * @returns { XComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + default enableAnalyzer(enable: boolean | undefined): this; + /** + * Enable privacy protection for XComponent. + * + * @param { boolean } isSecure + * @returns { XComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + default enableSecure(isSecure: boolean | undefined): this; + /** + * Set hdrBrightness for XComponent. + * + * @param { number } brightness - control the brightness of HDR video + * @returns { XComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + default hdrBrightness(brightness: number | undefined): this; + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} +/** + * Defines the XComponent parameter interface. + * + * @interface XComponentParameters + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare interface XComponentParameters { + /** + * The id of xcomponent + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + id: string; + /** + * The type of xcomponent + * + * @type { XComponentType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + type: XComponentType; + /** + * The callback to handle NativeXComponent Pointer. + * + * @type { Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + nativeXComponentHandler: Callback; + /** + * The controller of xcomponent. + * + * @type { ?XComponentController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + controller?: XComponentController; +} + +@memo +@ComponentBuilder +export declare function XComponent( + params: XComponentParameters | XComponentOptions | NativeXComponentParameters, + @memo + content_?: () => void, +): XComponentAttribute -- Gitee From db6e51142fb5131ae45413764d70a4acf9d7dd5b Mon Sep 17 00:00:00 2001 From: sunbees Date: Sat, 26 Jul 2025 11:53:53 +0800 Subject: [PATCH 4/4] =?UTF-8?q?xcomponent=20sdk=20=E6=8B=86=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sunbees --- api/@internal/component/ets/rect.d.ts | 4 +- api/arkui/FrameNode.d.ts | 99 ----------- ...difier.d.ets => LineModifier.static.d.ets} | 5 +- ...difier.d.ets => PathModifier.static.d.ets} | 5 +- ...ier.d.ets => PolygonModifier.static.d.ets} | 5 +- ...er.d.ets => PolylineModifier.static.d.ets} | 5 +- ...difier.d.ets => RectModifier.static.d.ets} | 5 +- ...ifier.d.ets => ShapeModifier.static.d.ets} | 5 +- ...ifier.d.ets => VideoModifier.static.d.ets} | 5 +- api/arkui/component/circle.static.d.ets | 25 +-- api/arkui/component/ellipse.static.d.ets | 25 +-- api/arkui/component/line.static.d.ets | 38 +---- api/arkui/component/path.static.d.ets | 33 +--- api/arkui/component/polygon.static.d.ets | 30 +--- api/arkui/component/polyline.static.d.ets | 32 +--- api/arkui/component/rect.static.d.ets | 64 ++----- api/arkui/component/shape.static.d.ets | 100 +++-------- api/arkui/component/video.static.d.ets | 158 ++++-------------- api/arkui/component/xcomponent.static.d.ets | 122 +++++++------- 19 files changed, 178 insertions(+), 587 deletions(-) rename api/arkui/{LineModifier.d.ets => LineModifier.static.d.ets} (96%) rename api/arkui/{PathModifier.d.ets => PathModifier.static.d.ets} (96%) rename api/arkui/{PolygonModifier.d.ets => PolygonModifier.static.d.ets} (96%) rename api/arkui/{PolylineModifier.d.ets => PolylineModifier.static.d.ets} (96%) rename api/arkui/{RectModifier.d.ets => RectModifier.static.d.ets} (96%) rename api/arkui/{ShapeModifier.d.ets => ShapeModifier.static.d.ets} (96%) rename api/arkui/{VideoModifier.d.ets => VideoModifier.static.d.ets} (96%) diff --git a/api/@internal/component/ets/rect.d.ts b/api/@internal/component/ets/rect.d.ts index a382feb79c..a025e7543c 100644 --- a/api/@internal/component/ets/rect.d.ts +++ b/api/@internal/component/ets/rect.d.ts @@ -534,7 +534,7 @@ interface RectInterface { * Called when a rectangle is created. * * @param { {width?: number | string;height?: number | string;radius?: number | string | Array;} | - * {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value + * {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value * @returns { RectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -543,7 +543,7 @@ interface RectInterface { * Called when a rectangle is created. * * @param { {width?: number | string;height?: number | string;radius?: number | string | Array;} | - * {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value + * {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value * @returns { RectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form diff --git a/api/arkui/FrameNode.d.ts b/api/arkui/FrameNode.d.ts index c7e4fdd615..d87c3e4572 100644 --- a/api/arkui/FrameNode.d.ts +++ b/api/arkui/FrameNode.d.ts @@ -66,7 +66,6 @@ import { SliderAttribute, SliderOptions } from './component/slider'; import { ToggleAttribute, ToggleOptions } from './component/toggle'; import { CheckboxGroupAttribute, CheckboxGroupOptions } from './component/checkboxgroup'; import { RatingAttribute, RatingOptions } from './component/rating'; -import { XComponentAttribute, XComponentController, XComponentOptions, XComponentParameters, NativeXComponentParameters } from './component/xcomponent'; /*** endif */ /** @@ -3025,69 +3024,6 @@ export declare namespace typeNode { */ type XComponent = TypedFrameNode; - /** - * Defines the XComponent type of FrameNode. - * - * @extends TypedFrameNode - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - abstract class XComponentFrameNode extends TypedFrameNode { - /** - * Initialize XComponent FrameNode. - * - * @param { XComponentParameters } value - Indicates the options of the xcomponent. - * @returns { XComponentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - abstract initialize(value: XComponentParameters): XComponentAttribute; - - /** - * Initialize XComponent FrameNode. - * - * @param { XComponentOptions } options - Indicates the options of the xcomponent. - * @returns { XComponentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - abstract initialize(options: XComponentOptions): XComponentAttribute; - - /** - * Initialize XComponent FrameNode. - * - * @param { NativeXComponentParameters } params - Indicates the constructor parameters of the xcomponent for native developing. - * @returns { XComponentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - abstract initialize(params: NativeXComponentParameters): XComponentAttribute; - } - - /** - * Define the FrameNode type for XComponent. - * - * @typedef { XComponentFrameNode } XComponent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - type XComponent = XComponentFrameNode; - /** * Create a FrameNode of XComponent type. * @@ -3098,17 +3034,6 @@ export declare namespace typeNode { * @atomicservice * @since 12 */ - /** - * Create a FrameNode of XComponent type. - * - * @param { UIContext } context - uiContext used to create the FrameNode. - * @param { 'XComponent' } nodeType - node type. - * @returns { XComponent } - Return XComponent type FrameNode. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ function createNode(context: UIContext, nodeType: 'XComponent'): XComponent; /** @@ -3122,18 +3047,6 @@ export declare namespace typeNode { * @atomicservice * @since 12 */ - /** - * Create a FrameNode of XComponent type with options. - * - * @param { UIContext } context - uiContext used to create the FrameNode. - * @param { 'XComponent' } nodeType - node type. - * @param { XComponentOptions } options - initialization parameters. - * @returns { XComponent } - Return XComponent type FrameNode. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ function createNode(context: UIContext, nodeType: 'XComponent', options: XComponentOptions): XComponent; /** @@ -3147,18 +3060,6 @@ export declare namespace typeNode { * @atomicservice * @since 19 */ - /** - * Create a FrameNode of XComponent type with options for native developing. - * - * @param { UIContext } context - uiContext used to create the FrameNode. - * @param { 'XComponent' } nodeType - node type. - * @param { NativeXComponentParameters } parameters - initialization parameters. - * @returns { XComponent } - Return XComponent type FrameNode. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ function createNode(context: UIContext, nodeType: 'XComponent', parameters: NativeXComponentParameters): XComponent; /** diff --git a/api/arkui/LineModifier.d.ets b/api/arkui/LineModifier.static.d.ets similarity index 96% rename from api/arkui/LineModifier.d.ets rename to api/arkui/LineModifier.static.d.ets index 242a8f120d..854042a4c2 100644 --- a/api/arkui/LineModifier.d.ets +++ b/api/arkui/LineModifier.static.d.ets @@ -19,6 +19,7 @@ import { LineAttribute } from './component/line'; /** * @file * @kit ArkUI + * @arkts 1.2 */ /** @@ -26,7 +27,7 @@ import { LineAttribute } from './component/line'; * * @implements LineAttribute, AttributeModifier * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 -*/ + * @noninterop + */ export declare class LineModifier implements LineAttribute, AttributeModifier {} diff --git a/api/arkui/PathModifier.d.ets b/api/arkui/PathModifier.static.d.ets similarity index 96% rename from api/arkui/PathModifier.d.ets rename to api/arkui/PathModifier.static.d.ets index e303ed5df2..85048b0bbb 100644 --- a/api/arkui/PathModifier.d.ets +++ b/api/arkui/PathModifier.static.d.ets @@ -19,6 +19,7 @@ import { PathAttribute } from './component/path'; /** * @file * @kit ArkUI + * @arkts 1.2 */ /** @@ -26,7 +27,7 @@ import { PathAttribute } from './component/path'; * * @implements PathAttribute, AttributeModifier * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 -*/ + * @noninterop + */ export declare class PathModifier implements PathAttribute, AttributeModifier {} diff --git a/api/arkui/PolygonModifier.d.ets b/api/arkui/PolygonModifier.static.d.ets similarity index 96% rename from api/arkui/PolygonModifier.d.ets rename to api/arkui/PolygonModifier.static.d.ets index 726bc2466c..8e9aa860dd 100644 --- a/api/arkui/PolygonModifier.d.ets +++ b/api/arkui/PolygonModifier.static.d.ets @@ -19,6 +19,7 @@ import { PolygonAttribute } from './component/polygon'; /** * @file * @kit ArkUI + * @arkts 1.2 */ /** @@ -26,7 +27,7 @@ import { PolygonAttribute } from './component/polygon'; * * @implements PolygonAttribute, AttributeModifier * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 -*/ + * @noninterop + */ export declare class PolygonModifier implements PolygonAttribute, AttributeModifier {} diff --git a/api/arkui/PolylineModifier.d.ets b/api/arkui/PolylineModifier.static.d.ets similarity index 96% rename from api/arkui/PolylineModifier.d.ets rename to api/arkui/PolylineModifier.static.d.ets index 6ccba6ff73..e5f89c093c 100644 --- a/api/arkui/PolylineModifier.d.ets +++ b/api/arkui/PolylineModifier.static.d.ets @@ -19,6 +19,7 @@ import { PolylineAttribute } from './component/polyline'; /** * @file * @kit ArkUI + * @arkts 1.2 */ /** @@ -26,7 +27,7 @@ import { PolylineAttribute } from './component/polyline'; * * @implements PolylineAttribute, AttributeModifier * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 -*/ + * @noninterop + */ export declare class PolylineModifier implements PolylineAttribute, AttributeModifier {} diff --git a/api/arkui/RectModifier.d.ets b/api/arkui/RectModifier.static.d.ets similarity index 96% rename from api/arkui/RectModifier.d.ets rename to api/arkui/RectModifier.static.d.ets index f7637e3c8f..c5a4229906 100644 --- a/api/arkui/RectModifier.d.ets +++ b/api/arkui/RectModifier.static.d.ets @@ -19,6 +19,7 @@ import { RectAttribute } from './component/rect'; /** * @file * @kit ArkUI + * @arkts 1.2 */ /** @@ -26,7 +27,7 @@ import { RectAttribute } from './component/rect'; * * @implements RectAttribute, AttributeModifier * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 -*/ + * @noninterop + */ export declare class RectModifier implements RectAttribute, AttributeModifier {} diff --git a/api/arkui/ShapeModifier.d.ets b/api/arkui/ShapeModifier.static.d.ets similarity index 96% rename from api/arkui/ShapeModifier.d.ets rename to api/arkui/ShapeModifier.static.d.ets index 1dbbee97fc..8ec347ce99 100644 --- a/api/arkui/ShapeModifier.d.ets +++ b/api/arkui/ShapeModifier.static.d.ets @@ -19,6 +19,7 @@ import { ShapeAttribute } from './component/shape'; /** * @file * @kit ArkUI + * @arkts 1.2 */ /** @@ -26,7 +27,7 @@ import { ShapeAttribute } from './component/shape'; * * @implements ShapeAttribute, AttributeModifier * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 -*/ + * @noninterop + */ export declare class ShapeModifier implements ShapeAttribute, AttributeModifier {} diff --git a/api/arkui/VideoModifier.d.ets b/api/arkui/VideoModifier.static.d.ets similarity index 96% rename from api/arkui/VideoModifier.d.ets rename to api/arkui/VideoModifier.static.d.ets index 732f504d4e..29c30bab24 100644 --- a/api/arkui/VideoModifier.d.ets +++ b/api/arkui/VideoModifier.static.d.ets @@ -19,6 +19,7 @@ import { VideoAttribute } from './component/video'; /** * @file * @kit ArkUI + * @arkts 1.2 */ /** @@ -26,7 +27,7 @@ import { VideoAttribute } from './component/video'; * * @implements VideoAttribute, AttributeModifier * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 -*/ + * @noninterop + */ export declare class VideoModifier implements VideoAttribute, AttributeModifier {} diff --git a/api/arkui/component/circle.static.d.ets b/api/arkui/component/circle.static.d.ets index aff3d4df8f..586cfb3944 100644 --- a/api/arkui/component/circle.static.d.ets +++ b/api/arkui/component/circle.static.d.ets @@ -1,4 +1,3 @@ -use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +15,7 @@ use static; /** * @file * @kit ArkUI - * @arkts static + * @arkts 1.2 */ import { CommonShapeMethod, CommonMethod, AttributeModifier } from "./common"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; @@ -26,9 +25,6 @@ import { memo, ComponentBuilder } from "./../stateManagement/runtime"; * * @interface CircleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare interface CircleOptions { @@ -37,9 +33,6 @@ export declare interface CircleOptions { * * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ width?: string | double; @@ -48,9 +41,6 @@ export declare interface CircleOptions { * * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ height?: string | double; @@ -59,22 +49,18 @@ export declare interface CircleOptions { /** * Circle drawing component attribute functions. * - * @extends CommonShapeMethod + * @extends CommonShapeMethod * @interface * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare interface CircleAttribute extends CommonShapeMethod { /** * Call attributeModifier. * - * @param { AttributeModifier | AttributeModifier | undefined } modifier - Circle’s AttributeModifier - * @returns { this } + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { CircleAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; @@ -84,10 +70,9 @@ export declare interface CircleAttribute extends CommonShapeMethod { * Circle is returned when the parameter is transferred. * * @param { CircleOptions } [options] - The options to create a Circle + * @param { function } [content_] * @returns { CircleAttribute } The attribute of the Circle. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ @memo diff --git a/api/arkui/component/ellipse.static.d.ets b/api/arkui/component/ellipse.static.d.ets index c195ac3c51..8f14bd31f4 100644 --- a/api/arkui/component/ellipse.static.d.ets +++ b/api/arkui/component/ellipse.static.d.ets @@ -1,4 +1,3 @@ -use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +15,7 @@ use static; /** * @file * @kit ArkUI - * @arkts static + * @arkts 1.2 */ import { CommonShapeMethod, AttributeModifier, CommonMethod } from "./common"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; @@ -26,9 +25,6 @@ import { memo, ComponentBuilder } from "./../stateManagement/runtime"; * * @interface EllipseOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export interface EllipseOptions { @@ -37,9 +33,6 @@ export interface EllipseOptions { * * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ width?: string | double; @@ -48,9 +41,6 @@ export interface EllipseOptions { * * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ height?: string | double; @@ -58,22 +48,18 @@ export interface EllipseOptions { /** * Provides attribute for Ellipse. - * @extends CommonShapeMethod + * @extends CommonShapeMethod * @interface EllipseAttribute * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare interface EllipseAttribute extends CommonShapeMethod { /** * Call attributeModifier. * - * @param { AttributeModifier | AttributeModifier | undefined } modifier - Ellipse’s AttributeModifier - * @returns { this } + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { EllipseAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; @@ -83,10 +69,9 @@ export declare interface EllipseAttribute extends CommonShapeMethod { * Ellipse is returned when the parameter is transferred. * * @param { EllipseOptions } [options] - The options to create an Ellipse + * @param { function } [content_] * @returns { EllipseAttribute } The attribute of the Ellipse. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ @memo diff --git a/api/arkui/component/line.static.d.ets b/api/arkui/component/line.static.d.ets index ff97b2b3c2..e108fdefc0 100644 --- a/api/arkui/component/line.static.d.ets +++ b/api/arkui/component/line.static.d.ets @@ -1,4 +1,3 @@ -use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +15,7 @@ use static; /** * @file * @kit ArkUI - * @arkts static + * @arkts 1.2 */ import { CommonShapeMethod, CommonMethod, AttributeModifier } from "./common"; import { Length } from "./units"; @@ -27,9 +26,6 @@ import { memo, ComponentBuilder } from "./../stateManagement/runtime"; * * @typedef { [Length, Length] } ShapePoint * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export type ShapePoint = [ @@ -42,9 +38,6 @@ export type ShapePoint = [ * * @interface LineOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export interface LineOptions { @@ -53,9 +46,6 @@ export interface LineOptions { * * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ width?: string | double; @@ -64,9 +54,6 @@ export interface LineOptions { * * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ height?: string | double; @@ -75,46 +62,36 @@ export interface LineOptions { /** * Provides attribute for Line. * - * @extends CommonShapeMethod + * @extends CommonShapeMethod * @interface LineAttribute * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare interface LineAttribute extends CommonShapeMethod { /** * Coordinate of the start point of the line (relative coordinate). * - * @param { ShapePoint } value + * @param { ShapePoint | undefined } value * @returns { LineAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default startPoint(value: ShapePoint | undefined): this; /** * Line end coordinates (relative coordinates). * - * @param { ShapePoint } value + * @param { ShapePoint | undefined } value * @returns { LineAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default endPoint(value: ShapePoint | undefined): this; /** * Call attributeModifier. * - * @param { AttributeModifier | AttributeModifier | undefined } modifier - Line’s AttributeModifier - * @returns { this } + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { LineAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; @@ -124,10 +101,9 @@ export declare interface LineAttribute extends CommonShapeMethod { * Line is returned when the parameter is transferred. * * @param { LineOptions } [options] - The options to create a Line + * @param { function } [content_] * @returns { LineAttribute } The attribute of the Line. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ @memo diff --git a/api/arkui/component/path.static.d.ets b/api/arkui/component/path.static.d.ets index 5af17c2605..7fdc33f56d 100644 --- a/api/arkui/component/path.static.d.ets +++ b/api/arkui/component/path.static.d.ets @@ -1,4 +1,3 @@ -use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +15,7 @@ use static; /** * @file * @kit ArkUI - * @arkts static + * @arkts 1.2 */ import { CommonShapeMethod, AttributeModifier, CommonMethod } from "./common"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; @@ -26,9 +25,6 @@ import { memo, ComponentBuilder } from "./../stateManagement/runtime"; * * @interface PathOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare interface PathOptions { @@ -36,9 +32,6 @@ export declare interface PathOptions { * Width option. * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ width?: double | string; @@ -46,9 +39,6 @@ export declare interface PathOptions { * Height option. * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ height?: double | string; @@ -56,9 +46,6 @@ export declare interface PathOptions { * Commands option. * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ commands?: string; @@ -67,34 +54,27 @@ export declare interface PathOptions { /** * Provides methods for attribute path component. * - * @extends CommonShapeMethod + * @extends CommonShapeMethod * @interface PathAttribute * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare interface PathAttribute extends CommonShapeMethod { /** * Called when the command string drawn by the path is set. * - * @param { string } value + * @param { string | undefined } value * @returns { PathAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default commands(value: string | undefined): this; /** * Call attributeModifier. * - * @param { AttributeModifier | AttributeModifier | undefined } modifier - Path’s AttributeModifier - * @returns { this } + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { PathAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; @@ -104,10 +84,9 @@ export declare interface PathAttribute extends CommonShapeMethod { * Path is returned when the parameter is transferred. * * @param { PathOptions } [options] - The options to create a Path + * @param { function } [content_] * @returns { PathAttribute } The attribute of the Path. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ @memo diff --git a/api/arkui/component/polygon.static.d.ets b/api/arkui/component/polygon.static.d.ets index ec0b7924d2..3f1425aba9 100644 --- a/api/arkui/component/polygon.static.d.ets +++ b/api/arkui/component/polygon.static.d.ets @@ -1,4 +1,3 @@ -use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +15,7 @@ use static; /** * @file * @kit ArkUI - * @arkts static + * @arkts 1.2 */ import { CommonShapeMethod, AttributeModifier, CommonMethod } from "./common"; import { ShapePoint } from "./line"; @@ -27,9 +26,6 @@ import { memo, ComponentBuilder } from "./../stateManagement/runtime"; * * @interface PolygonOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare interface PolygonOptions { @@ -38,9 +34,6 @@ export declare interface PolygonOptions { * * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ width?: string | double; @@ -49,9 +42,6 @@ export declare interface PolygonOptions { * * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ height?: string | double; @@ -60,34 +50,27 @@ export declare interface PolygonOptions { /** * Provides attribute for Polygon. * - * @extends CommonShapeMethod + * @extends CommonShapeMethod * @interface PolygonAttribute * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare interface PolygonAttribute extends CommonShapeMethod { /** * Called when the vertex coordinate list of a polygon is set. * - * @param { Array } value + * @param { Array | undefined } value * @returns { PolygonAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default points(value: Array | undefined): this; /** * Call attributeModifier. * - * @param { AttributeModifier | AttributeModifier | undefined } modifier - Polygon’s AttributeModifier - * @returns { this } + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { PolygonAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; @@ -97,10 +80,9 @@ export declare interface PolygonAttribute extends CommonShapeMethod { * Polygon is returned when the parameter is transferred. * * @param { PolygonOptions } [options] - The options to create a Polygon + * @param { function } [content_] * @returns { PolygonAttribute } The attribute of the Polygon. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ @memo diff --git a/api/arkui/component/polyline.static.d.ets b/api/arkui/component/polyline.static.d.ets index aae91b8240..6e02fd58f3 100644 --- a/api/arkui/component/polyline.static.d.ets +++ b/api/arkui/component/polyline.static.d.ets @@ -1,4 +1,3 @@ -use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +15,7 @@ use static; /** * @file * @kit ArkUI - * @arkts static + * @arkts 1.2 */ import { CommonShapeMethod, AttributeModifier, CommonMethod } from "./common"; import { ShapePoint } from "./line"; @@ -27,9 +26,6 @@ import { memo, ComponentBuilder } from "./../stateManagement/runtime"; * * @interface PolylineOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare interface PolylineOptions { @@ -38,9 +34,6 @@ export declare interface PolylineOptions { * * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ width?: string | double; @@ -49,9 +42,6 @@ export declare interface PolylineOptions { * * @type { ?(string | double) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ height?: string | double; @@ -59,34 +49,27 @@ export declare interface PolylineOptions { /** * Defines Polyline attribute - * @extends CommonShapeMethod + * @extends CommonShapeMethod * @interface PolylineAttribute * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 + * @since 20 */ export declare interface PolylineAttribute extends CommonShapeMethod { /** * Called when the polyline is set to pass through the coordinate point list. * - * @param { Array } value + * @param { Array | undefined } value * @returns { PolylineAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default points(value: Array | undefined): this; /** * Call attributeModifier. * - * @param { AttributeModifier | AttributeModifier | undefined } modifier - Polyline’s AttributeModifier - * @returns { this } + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { PolylineAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; @@ -96,10 +79,9 @@ export declare interface PolylineAttribute extends CommonShapeMethod { * Polyline is returned when the parameter is transferred. * * @param { PolylineOptions } [options] - The options to create a Polyline + * @param { function } [content_] * @returns { PolylineAttribute } The attribute of the Polyline. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ @memo diff --git a/api/arkui/component/rect.static.d.ets b/api/arkui/component/rect.static.d.ets index 1d4f6ee99b..a4360d3f50 100644 --- a/api/arkui/component/rect.static.d.ets +++ b/api/arkui/component/rect.static.d.ets @@ -1,4 +1,3 @@ -use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,20 +15,18 @@ use static; /** * @file * @kit ArkUI - * @arkts static + * @arkts 1.2 */ import { CommonShapeMethod, AttributeModifier, CommonMethod } from "./common"; import { Length } from "./units"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; /** - * Defines the RadiusItem, the first element is the width of the rounded corner, the second is the height of the rounded corner. + * Defines the RadiusItem. + * The first element is the width of the rounded corner, the second is the height of the rounded corner. * * @typedef { [Length, Length] } RadiusItem * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export type RadiusItem = [ @@ -42,9 +39,6 @@ export type RadiusItem = [ * * @interface RectOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare interface RectOptions { @@ -53,9 +47,6 @@ export declare interface RectOptions { * * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ width?: double | string; @@ -64,9 +55,6 @@ export declare interface RectOptions { * * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ height?: double | string; @@ -75,9 +63,6 @@ export declare interface RectOptions { * * @type { ?(Length | Array) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ radius?: Length | Array; @@ -88,9 +73,6 @@ export declare interface RectOptions { * * @interface RoundedRectOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare interface RoundedRectOptions { @@ -99,9 +81,6 @@ export declare interface RoundedRectOptions { * * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ width?: double | string; @@ -110,9 +89,6 @@ export declare interface RoundedRectOptions { * * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ height?: double | string; @@ -121,9 +97,6 @@ export declare interface RoundedRectOptions { * * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ radiusWidth?: double | string; @@ -132,9 +105,6 @@ export declare interface RoundedRectOptions { * * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ radiusHeight?: double | string; @@ -143,58 +113,45 @@ export declare interface RoundedRectOptions { /** * rect attribute declaration. * - * @extends CommonShapeMethod + * @extends CommonShapeMethod * @interface RectAttribute * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare interface RectAttribute extends CommonShapeMethod { /** * Called when the fillet width is set. * - * @param { double | string } value + * @param { double | string | undefined } value * @returns { RectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default radiusWidth(value: double | string | undefined): this; /** * Called when the fillet height is set. * - * @param { double | string } value + * @param { double | string | undefined } value * @returns { RectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default radiusHeight(value: double | string | undefined): this; /** * Called when the fillet size is set. * - * @param { Length | Array } value + * @param { Length | Array | undefined } value * @returns { RectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default radius(value: Length | Array | undefined): this; /** * Call attributeModifier. * - * @param { AttributeModifier | AttributeModifier | undefined } modifier - Rect’s AttributeModifier - * @returns { this } + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { RectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; @@ -204,10 +161,9 @@ export declare interface RectAttribute extends CommonShapeMethod { * Rect is returned when the parameter is transferred. * * @param { RectOptions | RoundedRectOptions } [options] - The options to create a Rect + * @param { function } [content_] * @returns { RectAttribute } The attribute of the Rect * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ @memo diff --git a/api/arkui/component/shape.static.d.ets b/api/arkui/component/shape.static.d.ets index 5a34d6b21e..585e10f261 100644 --- a/api/arkui/component/shape.static.d.ets +++ b/api/arkui/component/shape.static.d.ets @@ -1,4 +1,3 @@ -use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +15,7 @@ use static; /** * @file * @kit ArkUI - * @arkts static + * @arkts 1.2 */ import { CommonMethod, PixelMap, AttributeModifier } from "./common"; import { ResourceColor, Length } from "./units"; @@ -29,9 +28,6 @@ import { memo, ComponentBuilder } from "./../stateManagement/runtime"; * * @interface ViewportRect * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare interface ViewportRect { @@ -41,9 +37,6 @@ export declare interface ViewportRect { * * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ x?: double | string; @@ -52,9 +45,6 @@ export declare interface ViewportRect { * * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ y?: double | string; @@ -63,9 +53,6 @@ export declare interface ViewportRect { * * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ width?: double | string; @@ -74,9 +61,6 @@ export declare interface ViewportRect { * * @type { ?(double | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ height?: double | string; @@ -84,180 +68,137 @@ export declare interface ViewportRect { /** * Provides attribute for Shape. - * @extends CommonMethod + * @extends CommonMethod * @interface ShapeAttribute * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ export declare interface ShapeAttribute extends CommonMethod { /** * Viewport of shape * - * @param { ViewportRect } value + * @param { ViewportRect | undefined } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default viewPort(value: ViewportRect | undefined): this; /** * Called when the border color is set. * - * @param { ResourceColor } value + * @param { ResourceColor | undefined } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default stroke(value: ResourceColor | undefined): this; /** * Called when the fill color is set. * - * @param { ResourceColor } value + * @param { ResourceColor | undefined } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default fill(value: ResourceColor | undefined): this; /** * Called when the offset of the starting point of border drawing is set. * - * @param { double | string } value + * @param { double | string | undefined } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default strokeDashOffset(value: double | string | undefined): this; /** * Called when the gap of the border is set. * - * @param { Array } value + * @param { Array | undefined } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default strokeDashArray(value: Array | undefined): this; /** * Called when the path endpoint drawing style is set. * - * @param { LineCapStyle } value + * @param { LineCapStyle | undefined } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default strokeLineCap(value: LineCapStyle | undefined): this; /** * Called when the border corner drawing style is set. * - * @param { LineJoinStyle } value + * @param { LineJoinStyle | undefined } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default strokeLineJoin(value: LineJoinStyle | undefined): this; /** * Called when the limit value for drawing acute angles as oblique angles is set. * - * @param { double | string } value + * @param { double | string | undefined } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default strokeMiterLimit(value: double | string | undefined): this; /** * Called when the opacity of the border is set. * - * @param { double | string | Resource } value + * @param { double | string | Resource | undefined } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default strokeOpacity(value: double | string | Resource | undefined): this; /** * Called when the transparency of the border is set. * - * @param { double | string | Resource } value + * @param { double | string | Resource | undefined } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default fillOpacity(value: double | string | Resource | undefined): this; /** * Called when the width of the border is set. * - * @param { double | string } value + * @param { double | string | undefined } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default strokeWidth(value: double | string | undefined): this; /** * Called when setting whether anti aliasing is on. * - * @param { boolean } value + * @param { boolean | undefined } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default antiAlias(value: boolean | undefined): this; /** * Called when shape mesh. * - * @param { Array } value - * @param { int } column - * @param { int } row + * @param { Array | undefined } value + * @param { int | undefined } column + * @param { int | undefined } row * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice * @since 20 */ default mesh(value: Array | undefined, column: int | undefined, row: int | undefined): this; /** * Call attributeModifier. * - * @param { AttributeModifier | AttributeModifier | undefined } modifier - Shape’s AttributeModifier - * @returns { this } + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; @@ -267,10 +208,9 @@ export declare interface ShapeAttribute extends CommonMethod { * Shape is returned when the parameter is transferred. * * @param { PixelMap } [value] - A pixelMap can be drawn in the area of shape. + * @param { function } [content_] * @returns { ShapeAttribute } The attribute of the Shape. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ @memo diff --git a/api/arkui/component/video.static.d.ets b/api/arkui/component/video.static.d.ets index 63882530c3..64f2168a90 100644 --- a/api/arkui/component/video.static.d.ets +++ b/api/arkui/component/video.static.d.ets @@ -1,4 +1,3 @@ -use static; /* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +15,7 @@ use static; /** * @file * @kit ArkUI - * @arkts static + * @arkts 1.2 */ import { Resource } from '../../global/resource'; import { ImageAIOptions, ImageAnalyzerConfig } from "./imageCommon"; @@ -30,8 +29,6 @@ import { memo, ComponentBuilder } from "./../stateManagement/runtime"; * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export declare enum SeekMode { @@ -39,8 +36,6 @@ export declare enum SeekMode { * Sync to keyframes before the time point. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ PreviousKeyframe, @@ -48,8 +43,6 @@ export declare enum SeekMode { * Sync to keyframes after the time point. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ NextKeyframe, @@ -57,8 +50,6 @@ export declare enum SeekMode { * Sync to closest keyframes. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ ClosestKeyframe, @@ -66,8 +57,6 @@ export declare enum SeekMode { * Seek to frames closest the time point. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ Accurate @@ -78,8 +67,6 @@ export declare enum SeekMode { * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export declare enum PlaybackSpeed { @@ -87,8 +74,6 @@ export declare enum PlaybackSpeed { * 0.75x speed playback. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ Speed_Forward_0_75_X, @@ -96,8 +81,6 @@ export declare enum PlaybackSpeed { * 1.00x speed playback. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ Speed_Forward_1_00_X, @@ -105,8 +88,6 @@ export declare enum PlaybackSpeed { * 1.25x speed playback. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ Speed_Forward_1_25_X, @@ -114,8 +95,6 @@ export declare enum PlaybackSpeed { * 1.75x speed playback. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ Speed_Forward_1_75_X, @@ -123,8 +102,6 @@ export declare enum PlaybackSpeed { * 2.00x speed playback. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ Speed_Forward_2_00_X @@ -135,8 +112,6 @@ export declare enum PlaybackSpeed { * * @typedef FullscreenInfo * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export interface FullscreenInfo { @@ -145,8 +120,6 @@ export interface FullscreenInfo { * * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ fullscreen: boolean; @@ -157,8 +130,6 @@ export interface FullscreenInfo { * * @typedef PreparedInfo * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export interface PreparedInfo { @@ -167,8 +138,6 @@ export interface PreparedInfo { * * @type { int } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ duration: int; @@ -179,8 +148,6 @@ export interface PreparedInfo { * * @typedef PlaybackInfo * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export interface PlaybackInfo { @@ -189,8 +156,6 @@ export interface PlaybackInfo { * * @type { int } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ time: int; @@ -201,7 +166,6 @@ export interface PlaybackInfo { * * @interface PosterOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ export declare interface PosterOptions { @@ -211,7 +175,6 @@ export declare interface PosterOptions { * @type { ?boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ showFirstFrame?: boolean; @@ -222,8 +185,6 @@ export declare interface PosterOptions { * * @interface VideoOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export declare interface VideoOptions { @@ -232,8 +193,6 @@ export declare interface VideoOptions { * * @type { ?(string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ src?: string | Resource; @@ -242,8 +201,6 @@ export declare interface VideoOptions { * * @type { ?(double | string | PlaybackSpeed) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ currentProgressRate?: double | string | PlaybackSpeed; @@ -252,8 +209,6 @@ export declare interface VideoOptions { * * @type { ?(string | PixelMap | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ previewUri?: string | PixelMap | Resource; @@ -262,8 +217,6 @@ export declare interface VideoOptions { * * @type { ?VideoController } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ controller?: VideoController; @@ -272,7 +225,6 @@ export declare interface VideoOptions { * * @type { ?ImageAIOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ imageAIOptions?: ImageAIOptions; @@ -281,7 +233,6 @@ export declare interface VideoOptions { * * @type { ?PosterOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ posterOptions?: PosterOptions; @@ -291,8 +242,6 @@ export declare interface VideoOptions { * Defines the video controller. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export declare class VideoController { @@ -300,8 +249,6 @@ export declare class VideoController { * constructor. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ constructor(); @@ -309,8 +256,6 @@ export declare class VideoController { * Provides events to play. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ start(): void; @@ -318,8 +263,6 @@ export declare class VideoController { * Provides a pause event for playback. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ pause(): void; @@ -327,8 +270,6 @@ export declare class VideoController { * Provides an event to stop playback. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ stop(): void; @@ -337,8 +278,6 @@ export declare class VideoController { * * @param { boolean } value * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ requestFullscreen(value: boolean): void; @@ -346,8 +285,6 @@ export declare class VideoController { * Provides a method to exit full screen playback. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ exitFullscreen(): void; @@ -356,8 +293,6 @@ export declare class VideoController { * * @param { double } value * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ setCurrentTimeDefault(value: double): void; @@ -367,17 +302,21 @@ export declare class VideoController { * @param { double } value * @param { SeekMode } seekMode * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ setCurrentTimeWithMode(value: double, seekMode: SeekMode): void; - overload setCurrentTime {setCurrentTimeDefault, setCurrentTimeWithMode}; + /** + * Provide the progress method of video playback. + * + * @overload { setCurrentTimeDefault, setCurrentTimeWithMode } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + overload setCurrentTime { setCurrentTimeDefault, setCurrentTimeWithMode }; /** * Provide the reset method of video playback. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ reset(): void; @@ -389,193 +328,159 @@ export declare class VideoController { * @extends CommonMethod * @interface VideoAttribute * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export declare interface VideoAttribute extends CommonMethod { /** * Called when judging whether the video is muted. * - * @param { boolean } value + * @param { boolean | undefined } value * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default muted(value: boolean | undefined): this; /** * Called when judging whether the video is played automatically. * - * @param { boolean } value + * @param { boolean | undefined } value * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default autoPlay(value: boolean | undefined): this; /** * Called when judging whether the control bar is displayed. * - * @param { boolean } value + * @param { boolean | undefined } value * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default controls(value: boolean | undefined): this; /** * Called when judging whether the video is played circular. * - * @param { boolean } value + * @param { boolean | undefined } value * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default loop(value: boolean | undefined): this; /** * Called when determining the zoom type of the video source. * - * @param { ImageFit } value + * @param { ImageFit | undefined } value * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default objectFit(value: ImageFit | undefined): this; /** * Called when the video is played. * - * @param { VoidCallback } event + * @param { VoidCallback | undefined } event * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default onStart(event: VoidCallback | undefined): this; /** * Called when the video is paused. * - * @param { VoidCallback } event + * @param { VoidCallback | undefined } event * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default onPause(event: VoidCallback | undefined): this; /** * Called when the video playback ends. * - * @param { VoidCallback } event + * @param { VoidCallback | undefined } event * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default onFinish(event: VoidCallback | undefined): this; /** * Called when the video enters and exits the full screen. * - * @param { Callback } callback + * @param { Callback | undefined } callback * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default onFullscreenChange(callback: Callback | undefined): this; /** * Called when the video preparation is complete. * - * @param { Callback } callback + * @param { Callback | undefined } callback * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default onPrepared(callback: Callback | undefined): this; /** * Called when the time information is reported when the progress bar process is operated. * - * @param { Callback } callback + * @param { Callback | undefined } callback * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default onSeeking(callback: Callback | undefined): this; /** * Called when the playback time information is reported after the operation progress bar is completed. * - * @param { Callback } callback + * @param { Callback | undefined } callback * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default onSeeked(callback: Callback | undefined): this; /** * Called when the playback progress changes. * - * @param { Callback } callback + * @param { Callback | undefined } callback * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default onUpdate(callback: Callback | undefined): this; /** * Called when playback fails. * - * @param { function } event + * @param { (() => void) | undefined } event * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default onError(event: (() => void) | undefined): this; /** * Called when the video is stopped. * - * @param { VoidCallback } event + * @param { VoidCallback | undefined } event * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default onStop(event: VoidCallback | undefined): this; /** * Enable image analyzer. * - * @param { boolean } enable + * @param { boolean | undefined } enable * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ default enableAnalyzer(enable: boolean | undefined): this; /** * Set image analyzer with config. * - * @param { ImageAnalyzerConfig } config + * @param { ImageAnalyzerConfig | undefined } config * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ default analyzerConfig(config: ImageAnalyzerConfig | undefined): this; @@ -586,20 +491,18 @@ export declare interface VideoAttribute extends CommonMethod { * Up/Down arrow key: turn up/down volume of the video. * Right/Left arrow key: fast forward/backward the video. * - * @param { boolean } enabled + * @param { boolean | undefined } enabled * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ default enableShortcutKey(enabled: boolean | undefined): this; /** * Call attributeModifier. * - * @param { AttributeModifier | AttributeModifier | undefined } modifier - Video’s AttributeModifier - * @returns { this } + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; @@ -609,10 +512,9 @@ export declare interface VideoAttribute extends CommonMethod { * Video is returned when the parameter is transferred. * * @param { VideoOptions } value - The options to create a Video + * @param { function } [content_] * @returns { VideoAttribute } The attribute of the Video * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ @memo diff --git a/api/arkui/component/xcomponent.static.d.ets b/api/arkui/component/xcomponent.static.d.ets index ff51499661..99703af1d8 100644 --- a/api/arkui/component/xcomponent.static.d.ets +++ b/api/arkui/component/xcomponent.static.d.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,74 +15,70 @@ /** * @file * @kit ArkUI + * @arkts 1.2 */ import { ImageAIOptions, ImageAnalyzerConfig } from "./imageCommon"; import { CommonMethod, AttributeModifier, Callback } from "./common"; import { XComponentType } from "./enums"; import { VoidCallback } from "./units"; import { memo, ComponentBuilder } from "./../stateManagement/runtime"; + /** * Surface Rectangle information. * * @interface SurfaceRect * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ export declare interface SurfaceRect { /** * The horizontal offset of the surface relative to XComponent. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ - offsetX?: number; + offsetX?: double; /** * The vertical offset of the surface relative to XComponent. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ - offsetY?: number; + offsetY?: double; /** * The width of the surface created by XComponent * - * @type { number } + * @type { double } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ - surfaceWidth: number; + surfaceWidth: double; /** * The height of the surface created by XComponent * - * @type { number } + * @type { double } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ - surfaceHeight: number; + surfaceHeight: double; } + /** * Defines the NativeXComponent Pointer type. * * @typedef { long } NativeXComponentPointer * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export type NativeXComponentPointer = long; + /** * Surface rotation options. * * @interface SurfaceRotationOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ export declare interface SurfaceRotationOptions { @@ -91,17 +87,15 @@ export declare interface SurfaceRotationOptions { * * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ lock?: boolean; } + /** * Defines XComponentController * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export declare class XComponentController { @@ -109,8 +103,6 @@ export declare class XComponentController { * Constructor. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ constructor(); @@ -119,8 +111,6 @@ export declare class XComponentController { * * @returns { string } The id of surface created by XComponent. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ getXComponentSurfaceId(): string; @@ -129,7 +119,6 @@ export declare class XComponentController { * * @param { SurfaceRect } rect - The surface rectangle information. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ setXComponentSurfaceRect(rect: SurfaceRect): void; @@ -138,7 +127,6 @@ export declare class XComponentController { * * @returns { SurfaceRect } The surface rectangle information. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ getXComponentSurfaceRect(): SurfaceRect; @@ -147,7 +135,6 @@ export declare class XComponentController { * * @param { SurfaceRotationOptions } rotationOptions - The surface rotation options. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ setXComponentSurfaceRotation(rotationOptions: SurfaceRotationOptions): void; @@ -156,7 +143,6 @@ export declare class XComponentController { * * @returns { Required } The surface rotation options result. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ getXComponentSurfaceRotation(): Required; @@ -165,7 +151,6 @@ export declare class XComponentController { * * @param { string } surfaceId - The id of the surface created by XComponent. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ onSurfaceCreated(surfaceId: string): void; @@ -175,7 +160,6 @@ export declare class XComponentController { * @param { string } surfaceId - The id of the surface created by XComponent. * @param { SurfaceRect } rect - The rectangle information of the surface created by XComponent. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ onSurfaceChanged(surfaceId: string, rect: SurfaceRect): void; @@ -184,7 +168,6 @@ export declare class XComponentController { * * @param { string } surfaceId - The id of the surface created by XComponent. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ onSurfaceDestroyed(surfaceId: string): void; @@ -197,7 +180,6 @@ export declare class XComponentController { * @throws { BusinessError } 110002 - Image analysis is currently being executed. * @throws { BusinessError } 110003 - Image analysis is stopped. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ startImageAnalyzer(config: ImageAnalyzerConfig): Promise; @@ -205,17 +187,16 @@ export declare class XComponentController { * Stop image analyzer. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ stopImageAnalyzer(): void; } + /** * Defines the xcomponent options. * * @interface XComponentOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ export declare interface XComponentOptions { @@ -224,7 +205,6 @@ export declare interface XComponentOptions { * * @type { XComponentType } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ type: XComponentType; @@ -233,7 +213,6 @@ export declare interface XComponentOptions { * * @type { XComponentController } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ controller: XComponentController; @@ -242,17 +221,25 @@ export declare interface XComponentOptions { * * @type { ?ImageAIOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ imageAIOptions?: ImageAIOptions; + /** + * Identifier of a screen. + * + * @type { ?long } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + screenId?: long; } + /** * Defines the native xcomponent parameters. * * @interface NativeXComponentParameters * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ export declare interface NativeXComponentParameters { @@ -261,7 +248,6 @@ export declare interface NativeXComponentParameters { * * @type { XComponentType } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ type: XComponentType; @@ -270,73 +256,81 @@ export declare interface NativeXComponentParameters { * * @type { ?ImageAIOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ imageAIOptions?: ImageAIOptions; } + +/** + * Defines the XComponent attribute. + * + * @extends CommonMethod + * @interface XComponentAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ export declare interface XComponentAttribute extends CommonMethod { /** * Called when judging whether the xcomponent surface is created. * - * @param { VoidCallback } callback - Called when judging whether the xcomponent surface is created. + * @param { VoidCallback | undefined } callback - Called when judging whether the xcomponent surface is created. * @returns { XComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default onLoad(callback: VoidCallback | undefined): this; /** * Called when judging whether the xcomponent is destroyed. * - * @param { VoidCallback } event - Called when judging whether the xcomponent is destroyed. + * @param { VoidCallback | undefined } event - Called when judging whether the xcomponent is destroyed. * @returns { XComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ default onDestroy(event: VoidCallback | undefined): this; /** * Enable image analyzer for XComponent. * - * @param { boolean } enable + * @param { boolean | undefined } enable * @returns { XComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ default enableAnalyzer(enable: boolean | undefined): this; /** * Enable privacy protection for XComponent. * - * @param { boolean } isSecure + * @param { boolean | undefined } isSecure * @returns { XComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ default enableSecure(isSecure: boolean | undefined): this; /** * Set hdrBrightness for XComponent. * - * @param { number } brightness - control the brightness of HDR video + * @param { double | undefined } brightness - control the brightness of HDR video + * @returns { XComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default hdrBrightness(brightness: double | undefined): this; + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier * @returns { XComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice * @since 20 */ - default hdrBrightness(brightness: number | undefined): this; default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } + /** * Defines the XComponent parameter interface. * * @interface XComponentParameters * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ export declare interface XComponentParameters { @@ -345,8 +339,6 @@ export declare interface XComponentParameters { * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ id: string; @@ -355,8 +347,6 @@ export declare interface XComponentParameters { * * @type { XComponentType } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ type: XComponentType; @@ -365,8 +355,6 @@ export declare interface XComponentParameters { * * @type { Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ nativeXComponentHandler: Callback; @@ -375,13 +363,21 @@ export declare interface XComponentParameters { * * @type { ?XComponentController } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 20 */ controller?: XComponentController; } +/** + * XComponent is returned when the parameter is transferred. + * + * @param { XComponentParameters | XComponentOptions | NativeXComponentParameters } params - + * The options to create an XComponent + * @param { function } [content_] + * @returns { XComponentAttribute } The attribute of the XComponent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ @memo @ComponentBuilder export declare function XComponent( -- Gitee