1/* 2 * Copyright (c) 2024-2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15/** 16 * @file 17 * @kit ArkUI 18 * @arkts 1.2 19 */ 20 21 22// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! 23 24import { DrawableDescriptor } from './../../../api/@ohos.arkui.drawableDescriptor' 25import { memo, ComponentBuilder, __memo_context_type, __memo_id_type } from './../stateManagement/runtime' 26import { ResolutionQuality, PixelMap, ResourceStr, VisualEffect, Filter, UniformDataType, Blender, Length, SizeOptions, ConstraintSizeOptions, ChainWeightOptions, Padding, LocalizedPadding, Margin, LocalizedMargin, ResourceColor, Position, BorderOptions, EdgeStyles, EdgeWidths, LocalizedEdgeWidths, EdgeColors, LocalizedEdgeColors, BorderRadiuses, LocalizedBorderRadiuses, OutlineOptions, EdgeOutlineStyles, Dimension, EdgeOutlineWidths, OutlineRadiuses, Area, Edges, LocalizedEdges, LocalizedPosition, AccessibilityOptions, ColorFilter } from './units' 27import { ImageAIOptions, ImageAnalyzerConfig } from './imageCommon' 28import { CommonMethod, DrawModifier, Rectangle, Callback_Array_TouchTestInfo_TouchResult, TouchTestInfo, TouchResult, PixelRoundPolicy, BackgroundEffectOptions, ForegroundEffectOptions, BorderImageOption, OutlineStyle, Callback_ClickEvent_Void, ClickEvent, Callback_Boolean_HoverEvent_Void, HoverEvent, AccessibilityCallback, Callback_MouseEvent_Void, MouseEvent, Callback_TouchEvent_Void, TouchEvent, Callback_KeyEvent_Void, KeyEvent, Callback_KeyEvent_Boolean, AnimateParam, TransitionOptions, TransitionEffect, MotionBlurOptions, InvertOptions, TranslateOptions, ScaleOptions, RotateOptions, Callback_Area_Area_Void, Literal_Union_Number_Literal_Number_offset_span_lg_md_sm_xs, Literal_Number_offset_span, AlignRuleOption, LocalizedAlignRuleOptions, ClickEffect, Callback_DragEvent_String_Union_CustomBuilder_DragItemInfo, DragEvent, CustomBuilder, DragItemInfo, Callback_DragEvent_String_Void, Callback_PreDragStatus_Void, PreDragStatus, Type_CommonMethod_linearGradient_value, Tuple_ResourceColor_Number, Type_CommonMethod_sweepGradient_value, Tuple_Length_Length, Type_CommonMethod_radialGradient_value, MotionPathOptions, ShadowOptions, ShadowStyle, ProgressMask, StateStyles, PixelStretchEffectOptions, AttributeModifier, GestureModifier, BackgroundBrightnessOptions, Callback_GestureInfo_BaseGestureEvent_GestureJudgeResult, GestureRecognizerJudgeBeginCallback, ShouldBuiltInRecognizerParallelWithCallback, Callback_TouchEvent_HitTestMode, SizeChangeCallback, SafeAreaType, SafeAreaEdge, Literal_Alignment_align, BlurStyle, BackgroundBlurStyleOptions, ForegroundBlurStyleOptions, TransitionFinishCallback, BlurOptions, LinearGradientBlurOptions, EffectType, sharedTransitionOptions, ChainStyle, DragPreviewOptions, DragInteractionOptions, OverlayOptions, BlendMode, BlendApplyType, GeometryTransitionOptions, PopupOptions, CustomPopupOptions, MenuElement, MenuOptions, ContextMenuOptions, ModalTransition, ContentCoverOptions, SheetOptions, VisibleAreaChangeCallback, PointLightStyle } from './common' 29import { HitTestMode, ImageSize, Alignment, BorderStyle, ColoringStrategy, HoverEffect, Color, Visibility, ItemAlign, Direction, GradientDirection, ObscuredReasons, RenderFit, ImageRepeat, Axis, ResponseType, FunctionKey, ModifierKey, ImageFit, CopyOptions } from './enums' 30import { Resource } from './../../../api/global/resource' 31 32export enum ImageRenderMode { 33 ORIGINAL = 0, 34 Original = 0, 35 TEMPLATE = 1, 36 Template = 1 37} 38export enum ImageContent { 39 EMPTY = 0 40} 41export enum DynamicRangeMode { 42 HIGH = 0, 43 CONSTRAINT = 1, 44 STANDARD = 2 45} 46export enum ImageInterpolation { 47 NONE = 0, 48 None = 0, 49 LOW = 1, 50 Low = 1, 51 MEDIUM = 2, 52 Medium = 2, 53 HIGH = 3, 54 High = 3 55} 56export interface ImageInterface { 57 invoke(src: PixelMap | ResourceStr | DrawableDescriptor): ImageAttribute; 58 59 60} 61export interface ImageSourceSize { 62 width: number; 63 height: number; 64} 65export interface Type_ImageAttribute_onComplete_callback_event { 66 width: number; 67 height: number; 68 componentWidth: number; 69 componentHeight: number; 70 loadingStatus: number; 71 contentWidth: number; 72 contentHeight: number; 73 contentOffsetX: number; 74 contentOffsetY: number; 75} 76export type Callback_Type_ImageAttribute_onComplete_callback_event_Void = (event?: Type_ImageAttribute_onComplete_callback_event) => void; 77export interface ImageAttribute extends CommonMethod { 78 @memo 79 alt(value: string | Resource | PixelMap): this; 80 @memo 81 matchTextDirection(value: boolean): this; 82 @memo 83 fitOriginalSize(value: boolean): this; 84 @memo 85 fillColor(value: ResourceColor): this; 86 @memo 87 objectFit(value: ImageFit): this; 88 @memo 89 objectRepeat(value: ImageRepeat): this; 90 @memo 91 autoResize(value: boolean): this; 92 @memo 93 renderMode(value: ImageRenderMode): this; 94 @memo 95 dynamicRangeMode(value: DynamicRangeMode): this; 96 @memo 97 interpolation(value: ImageInterpolation): this; 98 @memo 99 sourceSize(value: ImageSourceSize): this; 100 @memo 101 syncLoad(value: boolean): this; 102 @memo 103 copyOption(value: CopyOptions): this; 104 @memo 105 draggable(value: boolean): this; 106 @memo 107 pointLight(value: PointLightStyle): this; 108 @memo 109 edgeAntialiasing(value: number): this; 110 @memo 111 onComplete(value: ((event?: Type_ImageAttribute_onComplete_callback_event) => void)): this; 112 @memo 113 onError(value: ImageErrorCallback): this; 114 @memo 115 onFinish(value: (() => void)): this; 116 @memo 117 enableAnalyzer(value: boolean): this; 118 @memo 119 analyzerConfig(value: ImageAnalyzerConfig): this; 120 @memo 121 resizable(value: ResizableOptions): this; 122 @memo 123 privacySensitive(value: boolean): this; 124 @memo 125 enhancedImageQuality(value: ResolutionQuality): this; 126} 127export type ImageErrorCallback = (error: ImageError) => void; 128export interface ImageError { 129 componentWidth: number; 130 componentHeight: number; 131 message: string; 132} 133export interface ResizableOptions { 134 slice?: EdgeWidths; 135} 136@memo 137@ComponentBuilder 138export declare function Image( 139 src: PixelMap | ResourceStr | DrawableDescriptor | PixelMap | ResourceStr | DrawableDescriptor | ImageContent, imageAIOptions?: ImageAIOptions | undefined, 140 @memo 141 content_?: () => void, 142): ImageAttribute 143