diff --git a/api/@internal/component/ets/circle.d.ts b/api/@internal/component/ets/circle.d.ts index 845dd4b638feba1c9ddd34cc86374e5927b4b6f4..42e6cc834a3f90dea4e9c7c544bb2a43d7a7b38a 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 4f9cd5433e3eac41abb256d77958cf539c9c61c0..678b4141462ef6629f151fd8d9d1f0530e336c32 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 278f936daab63f87aea016d7d793bb9ca9aaef87..52525bc39e67f48bf7cc3819b71e7f2cc3ecca1c 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 af9beaf1e7acff17ad84962154285274ca184989..924c278aab7f3d87fd494716412e1134c466ef20 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 589a025455644433cd8c47c1c63c1d6765de69bc..2dc8c65f33538ee6fa7d8a36bd47a59fbbbed505 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 f6937400d1df320eaad4e6c3b7b8da67a9447419..d2ddef1e828d1bd8db41aede69c7303d21d3a849 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 84c8ecde7bd03677ac35ad1ea2c7cb730ebedf7c..a025e7543cc16629f8719133df639af4f804c4aa 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 { /** @@ -569,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 @@ -578,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 @@ -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 8acf8b8fa930b3ab252249a6186978ef87b321fd..7acbca147f0c6ac67428cde6f6d5229f42f1e0f3 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 29a25dc16743033c5824d1d324b695d0ff27076b..36dc4bd16b815f143a39c2fd3d01397f271e1a79 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/@internal/component/ets/xcomponent.d.ts b/api/@internal/component/ets/xcomponent.d.ts index 422c84bc0c951bed4ec61f806ba0175985351843..c49c461306c743e3d4e427a355eb5de5c7529e38 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/@ohos.arkui.modifier.d.ets b/api/@ohos.arkui.modifier.d.ets index 4cdb3f34c0bdbc82e5b58830b307fb36216b6136..8e6931998b7096b3226d9bf3b7b24a5aa41fb1ef 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.static.d.ets b/api/arkui/LineModifier.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..854042a4c2ccbb42002c29324e1ce305c0d222c7 --- /dev/null +++ b/api/arkui/LineModifier.static.d.ets @@ -0,0 +1,33 @@ +/* + * 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 + * @arkts 1.2 + */ + +/** + * Defines Line Modifier + * + * @implements LineAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class LineModifier implements LineAttribute, AttributeModifier {} diff --git a/api/arkui/PathModifier.static.d.ets b/api/arkui/PathModifier.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..85048b0bbb5618b6babd162dde6925fba5b3c64b --- /dev/null +++ b/api/arkui/PathModifier.static.d.ets @@ -0,0 +1,33 @@ +/* + * 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 + * @arkts 1.2 + */ + +/** + * Defines Path Modifier + * + * @implements PathAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class PathModifier implements PathAttribute, AttributeModifier {} diff --git a/api/arkui/PolygonModifier.static.d.ets b/api/arkui/PolygonModifier.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..8e9aa860ddadc86800fbb250fad9f744f4063f53 --- /dev/null +++ b/api/arkui/PolygonModifier.static.d.ets @@ -0,0 +1,33 @@ +/* + * 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 + * @arkts 1.2 + */ + +/** + * Defines Polygon Modifier + * + * @implements PolygonAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class PolygonModifier implements PolygonAttribute, AttributeModifier {} diff --git a/api/arkui/PolylineModifier.static.d.ets b/api/arkui/PolylineModifier.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5f89c093cf292eb71e797ce19e7c5fb324ffe2a --- /dev/null +++ b/api/arkui/PolylineModifier.static.d.ets @@ -0,0 +1,33 @@ +/* + * 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 + * @arkts 1.2 + */ + +/** + * Defines Polyline Modifier + * + * @implements PolylineAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class PolylineModifier implements PolylineAttribute, AttributeModifier {} diff --git a/api/arkui/RectModifier.static.d.ets b/api/arkui/RectModifier.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..c5a42299063dde9f06f88058c28a3aee91f88bfd --- /dev/null +++ b/api/arkui/RectModifier.static.d.ets @@ -0,0 +1,33 @@ +/* + * 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 + * @arkts 1.2 + */ + +/** + * Defines Rect Modifier + * + * @implements RectAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class RectModifier implements RectAttribute, AttributeModifier {} diff --git a/api/arkui/ShapeModifier.static.d.ets b/api/arkui/ShapeModifier.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..8ec347ce99f097f1d45ea0c2ac94fc69a7c06310 --- /dev/null +++ b/api/arkui/ShapeModifier.static.d.ets @@ -0,0 +1,33 @@ +/* + * 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 + * @arkts 1.2 + */ + +/** + * Defines Shape Modifier + * + * @implements ShapeAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class ShapeModifier implements ShapeAttribute, AttributeModifier {} diff --git a/api/arkui/VideoModifier.static.d.ets b/api/arkui/VideoModifier.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..29c30bab24c0c75f88af9d1ce7738923cc15b1fb --- /dev/null +++ b/api/arkui/VideoModifier.static.d.ets @@ -0,0 +1,33 @@ +/* + * 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 + * @arkts 1.2 + */ + +/** + * Defines Video Modifier + * + * @implements VideoAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 new file mode 100644 index 0000000000000000000000000000000000000000..586cfb3944d799b5927358721912fb3942368bbc --- /dev/null +++ b/api/arkui/component/circle.static.d.ets @@ -0,0 +1,84 @@ +/* + * 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 + * @since 20 + */ +export declare interface CircleOptions { + /** + * Defines the width property. + * + * @type { ?(string | double) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width?: string | double; + /** + * Defines the height property. + * + * @type { ?(string | double) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height?: string | double; +} + +/** + * Circle drawing component attribute functions. + * + * @extends CommonShapeMethod + * @interface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface CircleAttribute extends CommonShapeMethod { + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { CircleAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @param { function } [content_] + * @returns { CircleAttribute } The attribute of the Circle. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@memo +@ComponentBuilder +export declare function Circle( + options?: 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 0000000000000000000000000000000000000000..8f14bd31f4e9649d0a5bc4b8c5d9f4420792b975 --- /dev/null +++ b/api/arkui/component/ellipse.static.d.ets @@ -0,0 +1,83 @@ +/* + * 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 + * @since 20 + */ +export interface EllipseOptions { + /** + * Set width. + * + * @type { ?(string | double) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width?: string | double; + /** + * Set height. + * + * @type { ?(string | double) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height?: string | double; +} + +/** + * Provides attribute for Ellipse. + * @extends CommonShapeMethod + * @interface EllipseAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface EllipseAttribute extends CommonShapeMethod { + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { EllipseAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @param { function } [content_] + * @returns { EllipseAttribute } The attribute of the Ellipse. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@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 0000000000000000000000000000000000000000..e108fdefc0077c562c2fe851a458c06d6fd861f5 --- /dev/null +++ b/api/arkui/component/line.static.d.ets @@ -0,0 +1,115 @@ +/* + * 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 + * @since 20 + */ +export type ShapePoint = [ + Length, + Length +]; + +/** + * Defines Line constructor options. + * + * @interface LineOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface LineOptions { + /** + * Width of the rectangle where the line resides. + * + * @type { ?(string | double) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width?: string | double; + /** + * Height of the rectangle where the line resides. + * + * @type { ?(string | double) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height?: string | double; +} + +/** + * Provides attribute for Line. + * + * @extends CommonShapeMethod + * @interface LineAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface LineAttribute extends CommonShapeMethod { + /** + * Coordinate of the start point of the line (relative coordinate). + * + * @param { ShapePoint | undefined } value + * @returns { LineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default startPoint(value: ShapePoint | undefined): this; + /** + * Line end coordinates (relative coordinates). + * + * @param { ShapePoint | undefined } value + * @returns { LineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default endPoint(value: ShapePoint | undefined): this; + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { LineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @param { function } [content_] + * @returns { LineAttribute } The attribute of the Line. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@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 0000000000000000000000000000000000000000..7fdc33f56d6641980105fd8df8ffd3b19cf04eb5 --- /dev/null +++ b/api/arkui/component/path.static.d.ets @@ -0,0 +1,98 @@ +/* + * 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 + * @since 20 + */ +export declare interface PathOptions { + /** + * Width option. + * @type { ?(double | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width?: double | string; + /** + * Height option. + * @type { ?(double | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height?: double | string; + /** + * Commands option. + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + commands?: string; +} + +/** + * Provides methods for attribute path component. + * + * @extends CommonShapeMethod + * @interface PathAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface PathAttribute extends CommonShapeMethod { + /** + * Called when the command string drawn by the path is set. + * + * @param { string | undefined } value + * @returns { PathAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default commands(value: string | undefined): this; + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { PathAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @param { function } [content_] + * @returns { PathAttribute } The attribute of the Path. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@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 0000000000000000000000000000000000000000..3f1425aba9753d6fb31d9e11a37de50d53727824 --- /dev/null +++ b/api/arkui/component/polygon.static.d.ets @@ -0,0 +1,94 @@ +/* + * 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 + * @since 20 + */ +export declare interface PolygonOptions { + /** + * Polygon width. + * + * @type { ?(string | double) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width?: string | double; + /** + * Polygon height. + * + * @type { ?(string | double) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height?: string | double; +} + +/** + * Provides attribute for Polygon. + * + * @extends CommonShapeMethod + * @interface PolygonAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface PolygonAttribute extends CommonShapeMethod { + /** + * Called when the vertex coordinate list of a polygon is set. + * + * @param { Array | undefined } value + * @returns { PolygonAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default points(value: Array | undefined): this; + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { PolygonAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @param { function } [content_] + * @returns { PolygonAttribute } The attribute of the Polygon. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@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 0000000000000000000000000000000000000000..6e02fd58f367c6dc6f4466343b96453d3a81b608 --- /dev/null +++ b/api/arkui/component/polyline.static.d.ets @@ -0,0 +1,93 @@ +/* + * 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 + * @since 20 + */ +export declare interface PolylineOptions { + /** + * Polyline width. + * + * @type { ?(string | double) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width?: string | double; + /** + * Polyline height. + * + * @type { ?(string | double) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height?: string | double; +} + +/** + * Defines Polyline attribute + * @extends CommonShapeMethod + * @interface PolylineAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface PolylineAttribute extends CommonShapeMethod { + /** + * Called when the polyline is set to pass through the coordinate point list. + * + * @param { Array | undefined } value + * @returns { PolylineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default points(value: Array | undefined): this; + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { PolylineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @param { function } [content_] + * @returns { PolylineAttribute } The attribute of the Polyline. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@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 0000000000000000000000000000000000000000..a4360d3f509d73ae7ded704fa9bfb7c26650fafd --- /dev/null +++ b/api/arkui/component/rect.static.d.ets @@ -0,0 +1,175 @@ +/* + * 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 + * @since 20 + */ +export type RadiusItem = [ + Length, + Length +]; + +/** + * Define options used to construct a rectangle. + * + * @interface RectOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RectOptions { + /** + * Rectangle width. + * + * @type { ?(double | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width?: double | string; + /** + * Rectangle height. + * + * @type { ?(double | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height?: double | string; + /** + * Corner radius of the rectangle. + * + * @type { ?(Length | Array) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + radius?: Length | Array; +} + +/** + * Define options used to construct a rectangle with rounded corners. + * + * @interface RoundedRectOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RoundedRectOptions { + /** + * Rectangle width. + * + * @type { ?(double | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width?: double | string; + /** + * Rectangle height. + * + * @type { ?(double | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height?: double | string; + /** + * Width of the corner radius. + * + * @type { ?(double | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + radiusWidth?: double | string; + /** + * Height of the corner radius. + * + * @type { ?(double | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + radiusHeight?: double | string; +} + +/** + * rect attribute declaration. + * + * @extends CommonShapeMethod + * @interface RectAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RectAttribute extends CommonShapeMethod { + /** + * Called when the fillet width is set. + * + * @param { double | string | undefined } value + * @returns { RectAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default radiusWidth(value: double | string | undefined): this; + /** + * Called when the fillet height is set. + * + * @param { double | string | undefined } value + * @returns { RectAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default radiusHeight(value: double | string | undefined): this; + /** + * Called when the fillet size is set. + * + * @param { Length | Array | undefined } value + * @returns { RectAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default radius(value: Length | Array | undefined): this; + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { RectAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @param { function } [content_] + * @returns { RectAttribute } The attribute of the Rect + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@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 0000000000000000000000000000000000000000..585e10f2612cb889677099a09c399b748b09fb09 --- /dev/null +++ b/api/arkui/component/shape.static.d.ets @@ -0,0 +1,222 @@ +/* + * 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 + * @since 20 + */ +export declare interface ViewportRect { + + /** + * Viewport X coordinate. + * + * @type { ?(double | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + x?: double | string; + /** + * Viewport Y coordinate. + * + * @type { ?(double | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + y?: double | string; + /** + * Viewport width. + * + * @type { ?(double | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width?: double | string; + /** + * Viewport height. + * + * @type { ?(double | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height?: double | string; +} + +/** + * Provides attribute for Shape. + * @extends CommonMethod + * @interface ShapeAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface ShapeAttribute extends CommonMethod { + /** + * Viewport of shape + * + * @param { ViewportRect | undefined } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default viewPort(value: ViewportRect | undefined): this; + /** + * Called when the border color is set. + * + * @param { ResourceColor | undefined } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default stroke(value: ResourceColor | undefined): this; + /** + * Called when the fill color is set. + * + * @param { ResourceColor | undefined } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fill(value: ResourceColor | undefined): this; + /** + * Called when the offset of the starting point of border drawing is set. + * + * @param { double | string | undefined } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default strokeDashOffset(value: double | string | undefined): this; + /** + * Called when the gap of the border is set. + * + * @param { Array | undefined } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default strokeDashArray(value: Array | undefined): this; + /** + * Called when the path endpoint drawing style is set. + * + * @param { LineCapStyle | undefined } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default strokeLineCap(value: LineCapStyle | undefined): this; + /** + * Called when the border corner drawing style is set. + * + * @param { LineJoinStyle | undefined } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 | undefined } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default strokeMiterLimit(value: double | string | undefined): this; + /** + * Called when the opacity of the border is set. + * + * @param { double | string | Resource | undefined } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default strokeOpacity(value: double | string | Resource | undefined): this; + /** + * Called when the transparency of the border is set. + * + * @param { double | string | Resource | undefined } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default fillOpacity(value: double | string | Resource | undefined): this; + /** + * Called when the width of the border is set. + * + * @param { double | string | undefined } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default strokeWidth(value: double | string | undefined): this; + /** + * Called when setting whether anti aliasing is on. + * + * @param { boolean | undefined } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default antiAlias(value: boolean | undefined): this; + /** + * Called when shape mesh. + * + * @param { Array | undefined } value + * @param { int | undefined } column + * @param { int | undefined } row + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default mesh(value: Array | undefined, column: int | undefined, row: int | undefined): this; + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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. + * @param { function } [content_] + * @returns { ShapeAttribute } The attribute of the Shape. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@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 0000000000000000000000000000000000000000..64f2168a9066f3119a1c50df8d861311e24ace42 --- /dev/null +++ b/api/arkui/component/video.static.d.ets @@ -0,0 +1,526 @@ +/* + * 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 + * @since 20 + */ +export declare enum SeekMode { + /** + * Sync to keyframes before the time point. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PreviousKeyframe, + /** + * Sync to keyframes after the time point. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NextKeyframe, + /** + * Sync to closest keyframes. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ClosestKeyframe, + /** + * Seek to frames closest the time point. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Accurate +} + +/** + * playback speed. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum PlaybackSpeed { + /** + * 0.75x speed playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Speed_Forward_0_75_X, + /** + * 1.00x speed playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Speed_Forward_1_00_X, + /** + * 1.25x speed playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Speed_Forward_1_25_X, + /** + * 1.75x speed playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Speed_Forward_1_75_X, + /** + * 2.00x speed playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Speed_Forward_2_00_X +} + +/** + * Fullscreen information of the video. + * + * @typedef FullscreenInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface FullscreenInfo { + /** + * The flag whether play in full screen. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fullscreen: boolean; +} + +/** + * Prepared information of the video. + * + * @typedef PreparedInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface PreparedInfo { + /** + * The duration of the current video, in seconds. + * + * @type { int } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + duration: int; +} + +/** + * Playback information of the video. + * + * @typedef PlaybackInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface PlaybackInfo { + /** + * The current video playback progress, expressed in seconds. + * + * @type { int } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + time: int; +} + +/** + * Defines the video poster options. + * + * @interface PosterOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @since 20 + */ + showFirstFrame?: boolean; +} + +/** + * Defines the video options. + * + * @interface VideoOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface VideoOptions { + /** + * src of video. + * + * @type { ?(string | Resource) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + src?: string | Resource; + /** + * playback rate of video. + * + * @type { ?(double | string | PlaybackSpeed) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + currentProgressRate?: double | string | PlaybackSpeed; + /** + * preview uri of video. + * + * @type { ?(string | PixelMap | Resource) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + previewUri?: string | PixelMap | Resource; + /** + * controller of video. + * + * @type { ?VideoController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + controller?: VideoController; + /** + * image ai options of video. + * + * @type { ?ImageAIOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + imageAIOptions?: ImageAIOptions; + /** + * poster options of video. + * + * @type { ?PosterOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + posterOptions?: PosterOptions; +} + +/** + * Defines the video controller. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class VideoController { + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(); + /** + * Provides events to play. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + start(): void; + /** + * Provides a pause event for playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + pause(): void; + /** + * Provides an event to stop playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + stop(): void; + /** + * Provides a full screen playback method. + * + * @param { boolean } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + requestFullscreen(value: boolean): void; + /** + * Provides a method to exit full screen playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + exitFullscreen(): void; + /** + * Provide the progress method of video playback without SeekMode. + * + * @param { double } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setCurrentTimeDefault(value: double): void; + /** + * Provide the progress method of video playback with SeekMode. + * + * @param { double } value + * @param { SeekMode } seekMode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setCurrentTimeWithMode(value: double, seekMode: SeekMode): void; + /** + * 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 + * @since 20 + */ + reset(): void; +} + +/** + * Defines the Video attribute. + * + * @extends CommonMethod + * @interface VideoAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface VideoAttribute extends CommonMethod { + /** + * Called when judging whether the video is muted. + * + * @param { boolean | undefined } value + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default muted(value: boolean | undefined): this; + /** + * Called when judging whether the video is played automatically. + * + * @param { boolean | undefined } value + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default autoPlay(value: boolean | undefined): this; + /** + * Called when judging whether the control bar is displayed. + * + * @param { boolean | undefined } value + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default controls(value: boolean | undefined): this; + /** + * Called when judging whether the video is played circular. + * + * @param { boolean | undefined } value + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default loop(value: boolean | undefined): this; + /** + * Called when determining the zoom type of the video source. + * + * @param { ImageFit | undefined } value + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default objectFit(value: ImageFit | undefined): this; + /** + * Called when the video is played. + * + * @param { VoidCallback | undefined } event + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onStart(event: VoidCallback | undefined): this; + /** + * Called when the video is paused. + * + * @param { VoidCallback | undefined } event + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onPause(event: VoidCallback | undefined): this; + /** + * Called when the video playback ends. + * + * @param { VoidCallback | undefined } event + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onFinish(event: VoidCallback | undefined): this; + /** + * Called when the video enters and exits the full screen. + * + * @param { Callback | undefined } callback + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onFullscreenChange(callback: Callback | undefined): this; + /** + * Called when the video preparation is complete. + * + * @param { Callback | undefined } callback + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onPrepared(callback: Callback | undefined): this; + /** + * Called when the time information is reported when the progress bar process is operated. + * + * @param { Callback | undefined } callback + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 | undefined } callback + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onSeeked(callback: Callback | undefined): this; + /** + * Called when the playback progress changes. + * + * @param { Callback | undefined } callback + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onUpdate(callback: Callback | undefined): this; + /** + * Called when playback fails. + * + * @param { (() => void) | undefined } event + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onError(event: (() => void) | undefined): this; + /** + * Called when the video is stopped. + * + * @param { VoidCallback | undefined } event + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onStop(event: VoidCallback | undefined): this; + /** + * Enable image analyzer. + * + * @param { boolean | undefined } enable + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enableAnalyzer(enable: boolean | undefined): this; + /** + * Set image analyzer with config. + * + * @param { ImageAnalyzerConfig | undefined } config + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 | undefined } enabled + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enableShortcutKey(enabled: boolean | undefined): this; + /** + * Call attributeModifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @param { function } [content_] + * @returns { VideoAttribute } The attribute of the Video + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@memo +@ComponentBuilder +export declare function Video( + value: VideoOptions, + @memo + content_?: () => void, +): VideoAttribute diff --git a/api/arkui/component/xcomponent.static.d.ets b/api/arkui/component/xcomponent.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..99703af1d8b858abf010a4e0f1acbe79782066b6 --- /dev/null +++ b/api/arkui/component/xcomponent.static.d.ets @@ -0,0 +1,387 @@ +/* + * 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 { 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 + * @since 20 + */ +export declare interface SurfaceRect { + /** + * The horizontal offset of the surface relative to XComponent. + * + * @type { ?double } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offsetX?: double; + /** + * The vertical offset of the surface relative to XComponent. + * + * @type { ?double } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offsetY?: double; + /** + * The width of the surface created by XComponent + * + * @type { double } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + surfaceWidth: double; + /** + * The height of the surface created by XComponent + * + * @type { double } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + surfaceHeight: double; +} + +/** + * Defines the NativeXComponent Pointer type. + * + * @typedef { long } NativeXComponentPointer + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type NativeXComponentPointer = long; + +/** + * Surface rotation options. + * + * @interface SurfaceRotationOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface SurfaceRotationOptions { + /** + * Lock property of the surface rotation. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + lock?: boolean; +} + +/** + * Defines XComponentController + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class XComponentController { + /** + * Constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @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 + * @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 + * @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 + * @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 + * @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 + * @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 + * @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 + * @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 + * @since 20 + */ + startImageAnalyzer(config: ImageAnalyzerConfig): Promise; + /** + * Stop image analyzer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + stopImageAnalyzer(): void; +} + +/** + * Defines the xcomponent options. + * + * @interface XComponentOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface XComponentOptions { + /** + * The type of xcomponent + * + * @type { XComponentType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type: XComponentType; + /** + * The controller of xcomponent. + * + * @type { XComponentController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + controller: XComponentController; + /** + * Image ai options. + * + * @type { ?ImageAIOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @since 20 + */ +export declare interface NativeXComponentParameters { + /** + * The type of xcomponent + * + * @type { XComponentType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type: XComponentType; + /** + * Image ai options. + * + * @type { ?ImageAIOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 | undefined } callback - Called when judging whether the xcomponent surface is created. + * @returns { XComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onLoad(callback: VoidCallback | undefined): this; + /** + * 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 + * @since 20 + */ + default onDestroy(event: VoidCallback | undefined): this; + /** + * Enable image analyzer for XComponent. + * + * @param { boolean | undefined } enable + * @returns { XComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enableAnalyzer(enable: boolean | undefined): this; + /** + * Enable privacy protection for XComponent. + * + * @param { boolean | undefined } isSecure + * @returns { XComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enableSecure(isSecure: boolean | undefined): this; + /** + * Set hdrBrightness for XComponent. + * + * @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 + * @since 20 + */ + default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +/** + * Defines the XComponent parameter interface. + * + * @interface XComponentParameters + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface XComponentParameters { + /** + * The id of xcomponent + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + id: string; + /** + * The type of xcomponent + * + * @type { XComponentType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type: XComponentType; + /** + * The callback to handle NativeXComponent Pointer. + * + * @type { Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + nativeXComponentHandler: Callback; + /** + * The controller of xcomponent. + * + * @type { ?XComponentController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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( + params: XComponentParameters | XComponentOptions | NativeXComponentParameters, + @memo + content_?: () => void, +): XComponentAttribute