diff --git a/arkoala-arkts/arkui/src/PeerNode.ts b/arkoala-arkts/arkui/src/PeerNode.ts index cb55241d701302a24cb8b9a5364ff53e578ffb4a..69384bc7db0188fdc941a9aeaa53b6249a0b2a24 100644 --- a/arkoala-arkts/arkui/src/PeerNode.ts +++ b/arkoala-arkts/arkui/src/PeerNode.ts @@ -5,6 +5,7 @@ import { nullptr, pointer } from "@koalaui/interop" import { ArkRootPeer } from "./generated/peers/ArkStaticComponentsPeer" export const PeerNodeType = 11 +export const LazyForEachType = 13 const InitialID = 999 export class PeerNode extends IncrementalNode { diff --git a/arkoala-arkts/arkui/src/generated/ArkCanvasRenderingContext2DMaterialized.ts b/arkoala-arkts/arkui/src/generated/ArkCanvasRenderingContext2DMaterialized.ts index 90fb51eb65a1ebe55a0f403bef01e13f8704fd02..f0ac3d5aeb4d1a6665a37308eb8a617d42e3fa26 100644 --- a/arkoala-arkts/arkui/src/generated/ArkCanvasRenderingContext2DMaterialized.ts +++ b/arkoala-arkts/arkui/src/generated/ArkCanvasRenderingContext2DMaterialized.ts @@ -80,9 +80,9 @@ export class CanvasRenderingContext2D extends CanvasRenderer implements Material static getFinalizer(): KPointer { return ArkUIGeneratedNativeModule._CanvasRenderingContext2D_getFinalizer() } - public toDataURL(type?: string, quality?: number): string { + public toDataURL(type?: string, quality?: float32): string { const type_casted = type as (string | undefined) - const quality_casted = quality as (number | undefined) + const quality_casted = quality as (float32 | undefined) return this.toDataURL_serialize(type_casted, quality_casted) } public startImageAnalyzer(config: ImageAnalyzerConfig): Promise { @@ -125,7 +125,7 @@ export class CanvasRenderingContext2D extends CanvasRenderer implements Material off(type: string, callback_: (() => void)): void { throw new Error("TBD") } - private toDataURL_serialize(type?: string, quality?: number): string { + private toDataURL_serialize(type?: string, quality?: float32): string { const thisSerializer : Serializer = Serializer.hold() let type_type : int32 = RuntimeType.UNDEFINED type_type = runtimeType(type) @@ -139,7 +139,7 @@ export class CanvasRenderingContext2D extends CanvasRenderer implements Material thisSerializer.writeInt8(quality_type as int32) if ((RuntimeType.UNDEFINED) != (quality_type)) { const quality_value = quality! - thisSerializer.writeNumber(quality_value) + thisSerializer.writeFloat32(quality_value) } const retval = ArkUIGeneratedNativeModule._CanvasRenderingContext2D_toDataURL(this.peer!.ptr, thisSerializer.asArray(), thisSerializer.length()) thisSerializer.release() diff --git a/arkoala-arkts/arkui/src/generated/ArkCommonInterfaces.ts b/arkoala-arkts/arkui/src/generated/ArkCommonInterfaces.ts index 7a22bdc90eb43de84d831df3f53fbe4890d30b27..752a2d716911d982d0cdb4847e1d6a49dacac498 100644 --- a/arkoala-arkts/arkui/src/generated/ArkCommonInterfaces.ts +++ b/arkoala-arkts/arkui/src/generated/ArkCommonInterfaces.ts @@ -21,12 +21,12 @@ import { KInt, KPointer, KBoolean, KStringPtr, wrapCallback, NativeBuffer } from import { NodeAttach, remember } from "@koalaui/runtime" import { TextDecorationType, TextDecorationStyle, Curve, PlayMode, SharedTransitionEffectType, HorizontalAlign, VerticalAlign, TransitionType, FontWeight, FontStyle, Color, ColoringStrategy, TouchType, BorderStyle, Placement, ArrowPointPosition, ClickEffectLevel, NestedScrollMode, HitTestMode, ImageSize, Alignment, HoverEffect, Visibility, ItemAlign, Direction, GradientDirection, ObscuredReasons, RenderFit, ImageRepeat, Axis, ResponseType, FunctionKey, ModifierKey, LineCapStyle, LineJoinStyle, PixelRoundCalcPolicy, BarState, EdgeEffect, IlluminatedType } from "./ArkEnumsInterfaces" import { ResourceColor, Length, Bias, Area, Font, BorderRadiuses, EdgeWidths, LocalizedEdgeWidths, SizeOptions, ResourceStr, Dimension, EdgeColors, LocalizedEdgeColors, EdgeStyles, Position, LocalizedBorderRadiuses, Margin, ConstraintSizeOptions, ChainWeightOptions, Padding, LocalizedPadding, LocalizedMargin, BorderOptions, OutlineOptions, EdgeOutlineStyles, EdgeOutlineWidths, OutlineRadiuses, Edges, LocalizedEdges, LocalizedPosition, AccessibilityOptions, EdgeWidth } from "./ArkUnitsInterfaces" +import { Resource } from "./ArkResourceInterfaces" import { ICurve } from "./ArkICurveMaterialized" import { Callback_Void, Literal_String_anchor_HorizontalAlign_align, Literal_String_anchor_VerticalAlign_align, Literal_TransitionEffect_appear_disappear, Tuple_Number_Number, Callback_DismissContentCoverAction_Void, Type_SheetOptions_detents, Callback_SheetDismiss_Void, Callback_DismissSheetAction_Void, Callback_SpringBackAction_Void, Callback_Number_Void, Callback_SheetType_Void, Literal_String_value_Callback_Void_action, Callback_Literal_Boolean_isVisible_Void, Literal_Boolean_isVisible, Literal_ResourceColor_color, Callback_DismissPopupAction_Void, Callback_Array_TouchTestInfo_TouchResult, Callback_ClickEvent_Void, Callback_Boolean_HoverEvent_Void, Callback_MouseEvent_Void, Callback_TouchEvent_Void, Callback_KeyEvent_Void, Callback_KeyEvent_Boolean, Callback_Area_Area_Void, Literal_Union_Number_Literal_Number_offset_span_lg_md_sm_xs, Literal_Number_offset_span, Callback_DragEvent_String_Union_CustomBuilder_DragItemInfo, Callback_DragEvent_String_Void, Callback_PreDragStatus_Void, Type_CommonMethod_linearGradient_value, Tuple_ResourceColor_Number, Type_CommonMethod_sweepGradient_value, Tuple_Length_Length, Type_CommonMethod_radialGradient_value, Callback_GestureInfo_BaseGestureEvent_GestureJudgeResult, Callback_TouchEvent_HitTestMode, Literal_Alignment_align, Callback_Number_Number_Void } from "./SyntheticDeclarations" import { TransitionEffect } from "./ArkTransitionEffectMaterialized" import { PixelMap } from "./ArkPixelMapMaterialized" import { ButtonType, ButtonStyleMode, ButtonRole } from "./ArkButtonInterfaces" -import { Resource } from "./ArkResourceInterfaces" import { BaseGestureEvent } from "./ArkBaseGestureEventMaterialized" import { GestureRecognizer } from "./ArkGestureRecognizerMaterialized" import { GestureJudgeResult, GestureInfo, GestureType, GestureMask, GestureHandler, GesturePriority } from "./ArkGestureInterfaces" @@ -63,9 +63,11 @@ export interface ProvideOptions { } export interface AnimatableArithmetic { } +declare function getContext(arg0: Object): Context export interface Context { _ContextStub: string; } +declare function postCardAction(arg0: Object, arg1: Object): void export interface Configuration { colorMode: string; fontScale: number; @@ -81,6 +83,8 @@ export interface ExpectedFrameRateRange { max: number; expected: number; } +declare function dollar_r(arg0: string, arg1: Array): Resource +declare function dollar_rawfile(arg0: string): Resource export enum FinishCallbackType { REMOVED = 0, LOGICALLY = 1 @@ -232,6 +236,14 @@ export interface DragItemInfo { builder?: CustomBuilder; extraInfo?: string; } +declare function animateTo(arg0: AnimateParam, arg1: (() => void)): void +declare function animateToImmediately(arg0: AnimateParam, arg1: (() => void)): void +declare function vp2px(arg0: number): number +declare function px2vp(arg0: number): number +declare function fp2px(arg0: number): number +declare function px2fp(arg0: number): number +declare function lpx2px(arg0: number): number +declare function px2lpx(arg0: number): number export interface EventTarget { area: Area; } diff --git a/arkoala-arkts/arkui/src/generated/ArkGlobalScopeCommonMaterialized.ts b/arkoala-arkts/arkui/src/generated/ArkGlobalScopeCommonMaterialized.ts deleted file mode 100644 index 3d82a993ac1c4a2e1b99b5a6530d45a886de3a44..0000000000000000000000000000000000000000 --- a/arkoala-arkts/arkui/src/generated/ArkGlobalScopeCommonMaterialized.ts +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 2024-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. - */ - - -// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! - -import { Context, AnimateParam } from "./ArkCommonInterfaces" -import { Resource } from "./ArkResourceInterfaces" -import { Callback_Void } from "./SyntheticDeclarations" -import { TypeChecker, ArkUIGeneratedNativeModule } from "#components" -import { Finalizable, isResource, isInstanceOf, runtimeType, RuntimeType, SerializerBase, registerCallback, wrapCallback, KPointer, MaterializedBase, NativeBuffer } from "@koalaui/interop" -import { unsafeCast, int32, float32 } from "@koalaui/common" -import { Serializer } from "./peers/Serializer" -import { CallbackKind } from "./peers/CallbackKind" -import { Deserializer } from "./peers/Deserializer" -import { CallbackTransformer } from "./peers/CallbackTransformer" -export class GlobalScope_common { - public static getContext(component?: Object): Context { - const component_casted = component as (Object | undefined) - return GlobalScope_common.getContext_serialize(component_casted) - } - public static postCardAction(component: Object, action: Object): void { - const component_casted = component as (Object) - const action_casted = action as (Object) - GlobalScope_common.postCardAction_serialize(component_casted, action_casted) - return - } - public static dollar_r(value: string, params: Array): Resource { - const value_casted = value as (string) - const params_casted = params as (Array) - return GlobalScope_common.dollar_r_serialize(value_casted, params_casted) - } - public static dollar_rawfile(value: string): Resource { - const value_casted = value as (string) - return GlobalScope_common.dollar_rawfile_serialize(value_casted) - } - public static animateTo(value: AnimateParam, event: (() => void)): void { - const value_casted = value as (AnimateParam) - const event_casted = event as ((() => void)) - GlobalScope_common.animateTo_serialize(value_casted, event_casted) - return - } - public static animateToImmediately(value: AnimateParam, event: (() => void)): void { - const value_casted = value as (AnimateParam) - const event_casted = event as ((() => void)) - GlobalScope_common.animateToImmediately_serialize(value_casted, event_casted) - return - } - public static vp2px(value: number): number { - const value_casted = value as (number) - return GlobalScope_common.vp2px_serialize(value_casted) - } - public static px2vp(value: number): number { - const value_casted = value as (number) - return GlobalScope_common.px2vp_serialize(value_casted) - } - public static fp2px(value: number): number { - const value_casted = value as (number) - return GlobalScope_common.fp2px_serialize(value_casted) - } - public static px2fp(value: number): number { - const value_casted = value as (number) - return GlobalScope_common.px2fp_serialize(value_casted) - } - public static lpx2px(value: number): number { - const value_casted = value as (number) - return GlobalScope_common.lpx2px_serialize(value_casted) - } - public static px2lpx(value: number): number { - const value_casted = value as (number) - return GlobalScope_common.px2lpx_serialize(value_casted) - } - private static getContext_serialize(component?: Object): Context { - const thisSerializer : Serializer = Serializer.hold() - let component_type : int32 = RuntimeType.UNDEFINED - component_type = runtimeType(component) - thisSerializer.writeInt8(component_type as int32) - if ((RuntimeType.UNDEFINED) != (component_type)) { - const component_value = component! - thisSerializer.writeCustomObject("Object", component_value) - } - const retval = ArkUIGeneratedNativeModule._GlobalScope_common_getContext(thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - return new Deserializer(retval, retval.length).readContext() - } - private static postCardAction_serialize(component: Object, action: Object): void { - const thisSerializer : Serializer = Serializer.hold() - thisSerializer.writeCustomObject("Object", component) - thisSerializer.writeCustomObject("Object", action) - ArkUIGeneratedNativeModule._GlobalScope_common_postCardAction(thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - private static dollar_r_serialize(value: string, params: Array): Resource { - const thisSerializer : Serializer = Serializer.hold() - thisSerializer.writeInt32(params.length as int32) - for (let i = 0; i < params.length; i++) { - const params_element : object = params[i] - thisSerializer.writeCustomObject("Any", params_element) - } - const retval = ArkUIGeneratedNativeModule._GlobalScope_common_dollar_r(value, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - return new Deserializer(retval, retval.length).readResource() - } - private static dollar_rawfile_serialize(value: string): Resource { - const retval = ArkUIGeneratedNativeModule._GlobalScope_common_dollar_rawfile(value) - return new Deserializer(retval, retval.length).readResource() - } - private static animateTo_serialize(value: AnimateParam, event: (() => void)): void { - const thisSerializer : Serializer = Serializer.hold() - thisSerializer.writeAnimateParam(value) - thisSerializer.holdAndWriteCallback(event) - ArkUIGeneratedNativeModule._GlobalScope_common_animateTo(thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - private static animateToImmediately_serialize(value: AnimateParam, event: (() => void)): void { - const thisSerializer : Serializer = Serializer.hold() - thisSerializer.writeAnimateParam(value) - thisSerializer.holdAndWriteCallback(event) - ArkUIGeneratedNativeModule._GlobalScope_common_animateToImmediately(thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - private static vp2px_serialize(value: number): number { - const retval = ArkUIGeneratedNativeModule._GlobalScope_common_vp2px(value) - return retval - } - private static px2vp_serialize(value: number): number { - const retval = ArkUIGeneratedNativeModule._GlobalScope_common_px2vp(value) - return retval - } - private static fp2px_serialize(value: number): number { - const retval = ArkUIGeneratedNativeModule._GlobalScope_common_fp2px(value) - return retval - } - private static px2fp_serialize(value: number): number { - const retval = ArkUIGeneratedNativeModule._GlobalScope_common_px2fp(value) - return retval - } - private static lpx2px_serialize(value: number): number { - const retval = ArkUIGeneratedNativeModule._GlobalScope_common_lpx2px(value) - return retval - } - private static px2lpx_serialize(value: number): number { - const retval = ArkUIGeneratedNativeModule._GlobalScope_common_px2lpx(value) - return retval - } -} diff --git a/arkoala-arkts/arkui/src/generated/ArkGlobalScopeInspectorMaterialized.ts b/arkoala-arkts/arkui/src/generated/ArkGlobalScopeInspectorMaterialized.ts deleted file mode 100644 index 125e14c83b33131ed7f98383908debaece728bad..0000000000000000000000000000000000000000 --- a/arkoala-arkts/arkui/src/generated/ArkGlobalScopeInspectorMaterialized.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2024-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. - */ - - -// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! - -import { TypeChecker, ArkUIGeneratedNativeModule } from "#components" -import { Finalizable, isResource, isInstanceOf, runtimeType, RuntimeType, SerializerBase, registerCallback, wrapCallback, KPointer, MaterializedBase, NativeBuffer } from "@koalaui/interop" -import { unsafeCast, int32, float32 } from "@koalaui/common" -import { Serializer } from "./peers/Serializer" -import { CallbackKind } from "./peers/CallbackKind" -import { Deserializer } from "./peers/Deserializer" -import { CallbackTransformer } from "./peers/CallbackTransformer" -export class GlobalScope_inspector { - public static getInspectorNodes(): Object { - return GlobalScope_inspector.getInspectorNodes_serialize() - } - public static getInspectorNodeById(id: number): Object { - const id_casted = id as (number) - return GlobalScope_inspector.getInspectorNodeById_serialize(id_casted) - } - public static setAppBgColor(value: string): void { - const value_casted = value as (string) - GlobalScope_inspector.setAppBgColor_serialize(value_casted) - return - } - private static getInspectorNodes_serialize(): Object { - const retval = ArkUIGeneratedNativeModule._GlobalScope_inspector_getInspectorNodes() - throw new Error("Object deserialization is not implemented.") - } - private static getInspectorNodeById_serialize(id: number): Object { - const retval = ArkUIGeneratedNativeModule._GlobalScope_inspector_getInspectorNodeById(id) - throw new Error("Object deserialization is not implemented.") - } - private static setAppBgColor_serialize(value: string): void { - ArkUIGeneratedNativeModule._GlobalScope_inspector_setAppBgColor(value) - } -} diff --git a/arkoala-arkts/arkui/src/generated/ArkOffscreenCanvasRenderingContext2DMaterialized.ts b/arkoala-arkts/arkui/src/generated/ArkOffscreenCanvasRenderingContext2DMaterialized.ts index a283f9b7860c5595e5768a168a62a5da31667a85..a183b517045a3239619e71d4df673b7920323e1f 100644 --- a/arkoala-arkts/arkui/src/generated/ArkOffscreenCanvasRenderingContext2DMaterialized.ts +++ b/arkoala-arkts/arkui/src/generated/ArkOffscreenCanvasRenderingContext2DMaterialized.ts @@ -71,15 +71,15 @@ export class OffscreenCanvasRenderingContext2D extends CanvasRenderer implements static getFinalizer(): KPointer { return ArkUIGeneratedNativeModule._OffscreenCanvasRenderingContext2D_getFinalizer() } - public toDataURL(type?: string, quality?: object): string { + public toDataURL(type?: string, quality?: float32): string { const type_casted = type as (string | undefined) - const quality_casted = quality as (object | undefined) + const quality_casted = quality as (float32 | undefined) return this.toDataURL_serialize(type_casted, quality_casted) } public transferToImageBitmap(): ImageBitmap { return this.transferToImageBitmap_serialize() } - private toDataURL_serialize(type?: string, quality?: object): string { + private toDataURL_serialize(type?: string, quality?: float32): string { const thisSerializer : Serializer = Serializer.hold() let type_type : int32 = RuntimeType.UNDEFINED type_type = runtimeType(type) @@ -93,7 +93,7 @@ export class OffscreenCanvasRenderingContext2D extends CanvasRenderer implements thisSerializer.writeInt8(quality_type as int32) if ((RuntimeType.UNDEFINED) != (quality_type)) { const quality_value = quality! - thisSerializer.writeCustomObject("Any", quality_value) + thisSerializer.writeFloat32(quality_value) } const retval = ArkUIGeneratedNativeModule._OffscreenCanvasRenderingContext2D_toDataURL(this.peer!.ptr, thisSerializer.asArray(), thisSerializer.length()) thisSerializer.release() diff --git a/arkoala-arkts/arkui/src/generated/GlobalScope.ts b/arkoala-arkts/arkui/src/generated/GlobalScope.ts deleted file mode 100644 index 3a4269319ed09a4832d6a696d3c26eecd2c9e89f..0000000000000000000000000000000000000000 --- a/arkoala-arkts/arkui/src/generated/GlobalScope.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2024-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. - */ - - -// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! - -import { GlobalScope_common } from "./ArkGlobalScopeCommonMaterialized" -import { Context, AnimateParam } from "./ArkCommonInterfaces" -import { Resource } from "./ArkResourceInterfaces" -import { Callback_Void } from "./SyntheticDeclarations" -import { GlobalScope_inspector } from "./ArkGlobalScopeInspectorMaterialized" -export function getContext(component: Object): Context { - return GlobalScope_common.getContext(component) -} -export function postCardAction(component: Object, action: Object): void { - GlobalScope_common.postCardAction(component, action) -} -export function dollar_r(value: string, params: Array): Resource { - return GlobalScope_common.dollar_r(value, params) -} -export function dollar_rawfile(value: string): Resource { - return GlobalScope_common.dollar_rawfile(value) -} -export function animateTo(value: AnimateParam, event: (() => void)): void { - GlobalScope_common.animateTo(value, event) -} -export function animateToImmediately(value: AnimateParam, event: (() => void)): void { - GlobalScope_common.animateToImmediately(value, event) -} -export function vp2px(value: number): number { - return GlobalScope_common.vp2px(value) -} -export function px2vp(value: number): number { - return GlobalScope_common.px2vp(value) -} -export function fp2px(value: number): number { - return GlobalScope_common.fp2px(value) -} -export function px2fp(value: number): number { - return GlobalScope_common.px2fp(value) -} -export function lpx2px(value: number): number { - return GlobalScope_common.lpx2px(value) -} -export function px2lpx(value: number): number { - return GlobalScope_common.px2lpx(value) -} -export function getInspectorNodes(): Object { - return GlobalScope_inspector.getInspectorNodes() -} -export function getInspectorNodeById(id: number): Object { - return GlobalScope_inspector.getInspectorNodeById(id) -} -export function setAppBgColor(value: string): void { - GlobalScope_inspector.setAppBgColor(value) -} diff --git a/arkoala-arkts/arkui/src/generated/arkts/ArkUIGeneratedNativeModule.ts b/arkoala-arkts/arkui/src/generated/arkts/ArkUIGeneratedNativeModule.ts index 211c9433de4fb544715630573cd780c91ef4b743..848bd60519382af22fd23a2ad1c61faedbca7293 100644 --- a/arkoala-arkts/arkui/src/generated/arkts/ArkUIGeneratedNativeModule.ts +++ b/arkoala-arkts/arkui/src/generated/arkts/ArkUIGeneratedNativeModule.ts @@ -2007,18 +2007,6 @@ export class ArkUIGeneratedNativeModule { native static _GestureModifier_ctor(): KPointer native static _GestureModifier_getFinalizer(): KPointer native static _GestureModifier_applyGesture(ptr: KPointer, thisArray: KUint8ArrayPtr, thisLength: int32): void - native static _GlobalScope_common_getContext(thisArray: KUint8ArrayPtr, thisLength: int32): KInteropReturnBuffer - native static _GlobalScope_common_postCardAction(thisArray: KUint8ArrayPtr, thisLength: int32): void - native static _GlobalScope_common_dollar_r(value: KStringPtr, thisArray: KUint8ArrayPtr, thisLength: int32): KInteropReturnBuffer - native static _GlobalScope_common_dollar_rawfile(value: KStringPtr): KInteropReturnBuffer - native static _GlobalScope_common_animateTo(thisArray: KUint8ArrayPtr, thisLength: int32): void - native static _GlobalScope_common_animateToImmediately(thisArray: KUint8ArrayPtr, thisLength: int32): void - native static _GlobalScope_common_vp2px(value: number): number - native static _GlobalScope_common_px2vp(value: number): number - native static _GlobalScope_common_fp2px(value: number): number - native static _GlobalScope_common_px2fp(value: number): number - native static _GlobalScope_common_lpx2px(value: number): number - native static _GlobalScope_common_px2lpx(value: number): number native static _ContextMenu_ctor(): KPointer native static _ContextMenu_getFinalizer(): KPointer native static _ContextMenu_close(): undefined @@ -2659,7 +2647,4 @@ export class ArkUIGeneratedNativeModule { native static _LinearIndicatorController_stop(ptr: KPointer): void native static _GlobalScope_Profiler_inspector_registerVsyncCallback(thisArray: KUint8ArrayPtr, thisLength: int32): void native static _GlobalScope_Profiler_inspector_unregisterVsyncCallback(): void - native static _GlobalScope_inspector_getInspectorNodes(): KPointer - native static _GlobalScope_inspector_getInspectorNodeById(id: number): KPointer - native static _GlobalScope_inspector_setAppBgColor(value: KStringPtr): void } \ No newline at end of file diff --git a/arkoala-arkts/arkui/src/generated/arkts/type_check.ts b/arkoala-arkts/arkui/src/generated/arkts/type_check.ts index 8ee31b4a446d57dabcf93da63c19d50a3cf84828..dedb9b9da6de3b41542d6c0c77c111a9e0c36b26 100644 --- a/arkoala-arkts/arkui/src/generated/arkts/type_check.ts +++ b/arkoala-arkts/arkui/src/generated/arkts/type_check.ts @@ -4189,6 +4189,9 @@ export class TypeChecker { static isArray_Number(value: object|string|number|undefined|null): boolean { return value instanceof Array } + static isArray_CustomObject(value: object|string|number|undefined|null): boolean { + return value instanceof Array + } static isArray_TouchObject(value: object|string|number|undefined|null): boolean { return value instanceof Array } @@ -4279,9 +4282,6 @@ export class TypeChecker { static isArray_LayoutSafeAreaEdge(value: object|string|number|undefined|null): boolean { return value instanceof Array } - static isArray_CustomObject(value: object|string|number|undefined|null): boolean { - return value instanceof Array - } static isArray_Point(value: object|string|number|undefined|null): boolean { return value instanceof Array } diff --git a/arkoala-arkts/arkui/src/generated/index.ts b/arkoala-arkts/arkui/src/generated/index.ts index c48770c9ae4f14c89eb82f4059707021749754b4..675403deffa5e3b973766a957665da1edc5d8974 100644 --- a/arkoala-arkts/arkui/src/generated/index.ts +++ b/arkoala-arkts/arkui/src/generated/index.ts @@ -266,6 +266,7 @@ export * from "./ArkWaterFlowInterfaces" export * from "./ArkUiExtensionComponentInterfaces" export * from "./ArkStyledStringInterfaces" export * from "./ArkLinearindicatorInterfaces" +export * from "./ArkInspectorInterfaces" export * from "./ArkProfilerNamespace" export * from "./ArkRawFileDescriptorInterfaces" export * from "./ArkAnimationExtenderMaterialized" @@ -323,7 +324,6 @@ export * from "./ArkDynamicNodeMaterialized" export * from "./ArkChildrenMainSizeMaterialized" export * from "./ArkUICommonEventMaterialized" export * from "./ArkGestureModifierMaterialized" -export * from "./ArkGlobalScopeCommonMaterialized" export * from "./ArkContextMenuMaterialized" export * from "./ArkCustomDialogControllerMaterialized" export * from "./ArkLinearGradientMaterialized" @@ -422,5 +422,3 @@ export * from "./ArkImageAttachmentMaterialized" export * from "./ArkCustomSpanMaterialized" export * from "./ArkLinearIndicatorControllerMaterialized" export * from "./ArkProfilerNamespace" -export * from "./ArkGlobalScopeInspectorMaterialized" -export * from "./GlobalScope" diff --git a/arkoala-arkts/arkui/src/generated/peers/Deserializer.ts b/arkoala-arkts/arkui/src/generated/peers/Deserializer.ts index 2c313cae318dfac9eebb1f309cc5cabe919517a5..1f0dcda9d67ec8a264efab54bae360d8bf9d7b7f 100644 --- a/arkoala-arkts/arkui/src/generated/peers/Deserializer.ts +++ b/arkoala-arkts/arkui/src/generated/peers/Deserializer.ts @@ -22,7 +22,7 @@ import { CallbackKind } from "./CallbackKind" import { TypeChecker } from "#components" import { KUint8ArrayPtr, NativeBuffer, InteropNativeModule } from "@koalaui/interop" import { CallbackTransformer } from "./CallbackTransformer" -import { AccessibilityCallback, CustomBuilder, GestureRecognizerJudgeBeginCallback, HoverCallback, OnMoveHandler, OnScrollCallback, ShouldBuiltInRecognizerParallelWithCallback, SizeChangeCallback, TransitionFinishCallback, VisibleAreaChangeCallback, ShadowType, SymbolGlyphModifier, ShadowOptions, SheetSize, ShadowStyle, ComponentContent, SheetTitleOptions, TransitionEffects, TranslateOptions, RotateOptions, ScaleOptions, TransitionEdge, AnimateParam, MenuPreviewMode, DismissPopupAction, DragPreviewMode, OutlineStyle, SourceTool, SourceType, EventTarget, HoverModeAreaType, BlurStyle, Rectangle, PickerTextStyle, PickerDialogButtonStyle, MenuPolicy, BlurStyleActivePolicy, BlurOptions, AdaptiveColor, ThemeColorMode, ExpectedFrameRateRange, FinishCallbackType, SheetKeyboardAvoidMode, UIContext, SheetType, ScrollSizeMode, SheetMode, SpringBackAction, DismissSheetAction, SheetDismiss, DismissContentCoverAction, ModalTransition, ContextMenuAnimationOptions, AnimationRange, PopupMessageOptions, TransitionHierarchyStrategy, OverlayOffset, ImageModifier, MotionPathOptions, LinearGradient_common, DrawContext, ScrollableCommonMethod, CommonMethod, TouchTestInfo, TouchResult, PixelRoundPolicy, BackgroundEffectOptions, ForegroundEffectOptions, VisualEffect, Filter, BorderImageOption, TransitionOptions, MotionBlurOptions, InvertOptions, AlignRuleOption, LocalizedAlignRuleOptions, ClickEffect, DragItemInfo, UniformDataType, PreDragStatus, CircleShape, EllipseShape, PathShape, RectShape, StateStyles, PixelStretchEffectOptions, BackgroundBrightnessOptions, SafeAreaType, SafeAreaEdge, BackgroundBlurStyleOptions, ForegroundBlurStyleOptions, LinearGradientBlurOptions, EffectType, sharedTransitionOptions, ChainStyle, DragPreviewOptions, DragInteractionOptions, OverlayOptions, BlendMode, BlendApplyType, Blender, GeometryTransitionOptions, PopupOptions, CustomPopupOptions, MenuElement, MenuOptions, ContextMenuOptions, ContentCoverOptions, SheetOptions, NestedScrollOptions, ContentClipMode, EdgeEffectOptions, FadingEdgeOptions, RectResult, TouchObject, HistoricalPoint, TextDecorationOptions, InputCounterOptions, CaretOffset, SelectionOptions, BlurStyleOptions, ContentModifier, LayoutSafeAreaType, LayoutSafeAreaEdge, ItemDragInfo, KeyboardAvoidMode, Context, UIGestureEvent, VisibleAreaEventOptions, MeasureResult, SizeResult, DismissReason, BindOptions, FractionStop, LocalizedVerticalAlignParam, LocalizedHorizontalAlignParam, MotionBlurAnchor, RepeatMode, TouchTestStrategy, IntentionCode, DragResult, Summary, DragBehavior, LightSource, MultiShadowOptions, PointLightStyle } from "./../ArkCommonInterfaces" +import { AccessibilityCallback, CustomBuilder, GestureRecognizerJudgeBeginCallback, HoverCallback, OnMoveHandler, OnScrollCallback, ShouldBuiltInRecognizerParallelWithCallback, SizeChangeCallback, TransitionFinishCallback, VisibleAreaChangeCallback, ShadowType, SymbolGlyphModifier, ShadowOptions, SheetSize, ShadowStyle, ComponentContent, SheetTitleOptions, TransitionEffects, TranslateOptions, RotateOptions, ScaleOptions, TransitionEdge, AnimateParam, MenuPreviewMode, DismissPopupAction, DragPreviewMode, OutlineStyle, SourceTool, SourceType, EventTarget, HoverModeAreaType, BlurStyle, Rectangle, PickerTextStyle, PickerDialogButtonStyle, MenuPolicy, BlurStyleActivePolicy, BlurOptions, AdaptiveColor, ThemeColorMode, ExpectedFrameRateRange, FinishCallbackType, SheetKeyboardAvoidMode, UIContext, SheetType, ScrollSizeMode, SheetMode, SpringBackAction, DismissSheetAction, SheetDismiss, DismissContentCoverAction, ModalTransition, ContextMenuAnimationOptions, AnimationRange, PopupMessageOptions, TransitionHierarchyStrategy, OverlayOffset, ImageModifier, MotionPathOptions, LinearGradient_common, DrawContext, ScrollableCommonMethod, CommonMethod, TouchTestInfo, TouchResult, PixelRoundPolicy, BackgroundEffectOptions, ForegroundEffectOptions, VisualEffect, Filter, BorderImageOption, TransitionOptions, MotionBlurOptions, InvertOptions, AlignRuleOption, LocalizedAlignRuleOptions, ClickEffect, DragItemInfo, UniformDataType, PreDragStatus, CircleShape, EllipseShape, PathShape, RectShape, StateStyles, PixelStretchEffectOptions, BackgroundBrightnessOptions, SafeAreaType, SafeAreaEdge, BackgroundBlurStyleOptions, ForegroundBlurStyleOptions, LinearGradientBlurOptions, EffectType, sharedTransitionOptions, ChainStyle, DragPreviewOptions, DragInteractionOptions, OverlayOptions, BlendMode, BlendApplyType, Blender, GeometryTransitionOptions, PopupOptions, CustomPopupOptions, MenuElement, MenuOptions, ContextMenuOptions, ContentCoverOptions, SheetOptions, NestedScrollOptions, ContentClipMode, EdgeEffectOptions, FadingEdgeOptions, RectResult, TouchObject, HistoricalPoint, TextDecorationOptions, InputCounterOptions, CaretOffset, SelectionOptions, BlurStyleOptions, ContentModifier, LayoutSafeAreaType, LayoutSafeAreaEdge, ItemDragInfo, KeyboardAvoidMode, UIGestureEvent, VisibleAreaEventOptions, MeasureResult, SizeResult, DismissReason, BindOptions, FractionStop, LocalizedVerticalAlignParam, LocalizedHorizontalAlignParam, MotionBlurAnchor, RepeatMode, TouchTestStrategy, IntentionCode, DragResult, Summary, DragBehavior, LightSource, MultiShadowOptions, PointLightStyle } from "./../ArkCommonInterfaces" import { ButtonTriggerClickCallback, ButtonRole, ButtonStyleMode, ButtonType, LabelStyle, ControlSize, ButtonOptions } from "./../ArkButtonInterfaces" import { Callback_Extender_OnFinish, Callback_Extender_OnProgress, DoubleAnimationParam } from "./../ArkAnimationExtenderInterfaces" import { Callback_RangeUpdate, PointerStyle } from "./../ArkArkuiCustomInterfaces" @@ -7811,12 +7811,6 @@ export class Deserializer extends DeserializerBase { readComponent3DAttribute(): Component3DAttribute { throw new Error("Interface with functions is not supported") } - readContext(): Context { - let valueDeserializer : Deserializer = this - const _ContextStub_result : string = (valueDeserializer.readString() as string) - let value : Context = ({_ContextStub: _ContextStub_result} as Context) - return value - } readUIGestureEvent(): UIGestureEvent { throw new Error("Interface with functions is not supported") } diff --git a/arkoala-arkts/arkui/src/generated/peers/Serializer.ts b/arkoala-arkts/arkui/src/generated/peers/Serializer.ts index 45589648c919b2d318ed2fe553bdf00c7ff02d89..ade4c2bc95afb6c7f9c5eb594a04aece99e530fb 100644 --- a/arkoala-arkts/arkui/src/generated/peers/Serializer.ts +++ b/arkoala-arkts/arkui/src/generated/peers/Serializer.ts @@ -18,7 +18,7 @@ import { int32, float32, unsafeCast, int64 } from "@koalaui/common" import { TypeChecker } from "#components" import { KUint8ArrayPtr, NativeBuffer, InteropNativeModule } from "@koalaui/interop" import { CallbackTransformer } from "./CallbackTransformer" -import { AccessibilityCallback, CustomBuilder, GestureRecognizerJudgeBeginCallback, HoverCallback, OnMoveHandler, OnScrollCallback, ShouldBuiltInRecognizerParallelWithCallback, SizeChangeCallback, TransitionFinishCallback, VisibleAreaChangeCallback, ShadowType, SymbolGlyphModifier, ShadowOptions, SheetSize, ShadowStyle, ComponentContent, SheetTitleOptions, TransitionEffects, TranslateOptions, RotateOptions, ScaleOptions, TransitionEdge, AnimateParam, MenuPreviewMode, DismissPopupAction, DragPreviewMode, OutlineStyle, SourceTool, SourceType, EventTarget, HoverModeAreaType, BlurStyle, Rectangle, PickerTextStyle, PickerDialogButtonStyle, MenuPolicy, BlurStyleActivePolicy, BlurOptions, AdaptiveColor, ThemeColorMode, ExpectedFrameRateRange, FinishCallbackType, SheetKeyboardAvoidMode, UIContext, SheetType, ScrollSizeMode, SheetMode, SpringBackAction, DismissSheetAction, SheetDismiss, DismissContentCoverAction, ModalTransition, ContextMenuAnimationOptions, AnimationRange, PopupMessageOptions, TransitionHierarchyStrategy, OverlayOffset, ImageModifier, MotionPathOptions, LinearGradient_common, DrawContext, ScrollableCommonMethod, CommonMethod, TouchTestInfo, TouchResult, PixelRoundPolicy, BackgroundEffectOptions, ForegroundEffectOptions, VisualEffect, Filter, BorderImageOption, TransitionOptions, MotionBlurOptions, InvertOptions, AlignRuleOption, LocalizedAlignRuleOptions, ClickEffect, DragItemInfo, UniformDataType, PreDragStatus, CircleShape, EllipseShape, PathShape, RectShape, StateStyles, PixelStretchEffectOptions, BackgroundBrightnessOptions, SafeAreaType, SafeAreaEdge, BackgroundBlurStyleOptions, ForegroundBlurStyleOptions, LinearGradientBlurOptions, EffectType, sharedTransitionOptions, ChainStyle, DragPreviewOptions, DragInteractionOptions, OverlayOptions, BlendMode, BlendApplyType, Blender, GeometryTransitionOptions, PopupOptions, CustomPopupOptions, MenuElement, MenuOptions, ContextMenuOptions, ContentCoverOptions, SheetOptions, NestedScrollOptions, ContentClipMode, EdgeEffectOptions, FadingEdgeOptions, RectResult, TouchObject, HistoricalPoint, TextDecorationOptions, InputCounterOptions, CaretOffset, SelectionOptions, BlurStyleOptions, ContentModifier, LayoutSafeAreaType, LayoutSafeAreaEdge, ItemDragInfo, KeyboardAvoidMode, Context, UIGestureEvent, VisibleAreaEventOptions, MeasureResult, SizeResult, DismissReason, BindOptions, FractionStop, LocalizedVerticalAlignParam, LocalizedHorizontalAlignParam, MotionBlurAnchor, RepeatMode, TouchTestStrategy, IntentionCode, DragResult, Summary, DragBehavior, LightSource, MultiShadowOptions, PointLightStyle } from "./../ArkCommonInterfaces" +import { AccessibilityCallback, CustomBuilder, GestureRecognizerJudgeBeginCallback, HoverCallback, OnMoveHandler, OnScrollCallback, ShouldBuiltInRecognizerParallelWithCallback, SizeChangeCallback, TransitionFinishCallback, VisibleAreaChangeCallback, ShadowType, SymbolGlyphModifier, ShadowOptions, SheetSize, ShadowStyle, ComponentContent, SheetTitleOptions, TransitionEffects, TranslateOptions, RotateOptions, ScaleOptions, TransitionEdge, AnimateParam, MenuPreviewMode, DismissPopupAction, DragPreviewMode, OutlineStyle, SourceTool, SourceType, EventTarget, HoverModeAreaType, BlurStyle, Rectangle, PickerTextStyle, PickerDialogButtonStyle, MenuPolicy, BlurStyleActivePolicy, BlurOptions, AdaptiveColor, ThemeColorMode, ExpectedFrameRateRange, FinishCallbackType, SheetKeyboardAvoidMode, UIContext, SheetType, ScrollSizeMode, SheetMode, SpringBackAction, DismissSheetAction, SheetDismiss, DismissContentCoverAction, ModalTransition, ContextMenuAnimationOptions, AnimationRange, PopupMessageOptions, TransitionHierarchyStrategy, OverlayOffset, ImageModifier, MotionPathOptions, LinearGradient_common, DrawContext, ScrollableCommonMethod, CommonMethod, TouchTestInfo, TouchResult, PixelRoundPolicy, BackgroundEffectOptions, ForegroundEffectOptions, VisualEffect, Filter, BorderImageOption, TransitionOptions, MotionBlurOptions, InvertOptions, AlignRuleOption, LocalizedAlignRuleOptions, ClickEffect, DragItemInfo, UniformDataType, PreDragStatus, CircleShape, EllipseShape, PathShape, RectShape, StateStyles, PixelStretchEffectOptions, BackgroundBrightnessOptions, SafeAreaType, SafeAreaEdge, BackgroundBlurStyleOptions, ForegroundBlurStyleOptions, LinearGradientBlurOptions, EffectType, sharedTransitionOptions, ChainStyle, DragPreviewOptions, DragInteractionOptions, OverlayOptions, BlendMode, BlendApplyType, Blender, GeometryTransitionOptions, PopupOptions, CustomPopupOptions, MenuElement, MenuOptions, ContextMenuOptions, ContentCoverOptions, SheetOptions, NestedScrollOptions, ContentClipMode, EdgeEffectOptions, FadingEdgeOptions, RectResult, TouchObject, HistoricalPoint, TextDecorationOptions, InputCounterOptions, CaretOffset, SelectionOptions, BlurStyleOptions, ContentModifier, LayoutSafeAreaType, LayoutSafeAreaEdge, ItemDragInfo, KeyboardAvoidMode, UIGestureEvent, VisibleAreaEventOptions, MeasureResult, SizeResult, DismissReason, BindOptions, FractionStop, LocalizedVerticalAlignParam, LocalizedHorizontalAlignParam, MotionBlurAnchor, RepeatMode, TouchTestStrategy, IntentionCode, DragResult, Summary, DragBehavior, LightSource, MultiShadowOptions, PointLightStyle } from "./../ArkCommonInterfaces" import { ButtonTriggerClickCallback, ButtonRole, ButtonStyleMode, ButtonType, LabelStyle, ControlSize, ButtonOptions } from "./../ArkButtonInterfaces" import { Callback_Extender_OnFinish, Callback_Extender_OnProgress, DoubleAnimationParam } from "./../ArkAnimationExtenderInterfaces" import { Callback_RangeUpdate, PointerStyle } from "./../ArkArkuiCustomInterfaces" @@ -8861,11 +8861,6 @@ export class Serializer extends SerializerBase { } writeComponent3DAttribute(value: Component3DAttribute): void { } - writeContext(value: Context): void { - let valueSerializer : Serializer = this - const value__ContextStub = value._ContextStub - valueSerializer.writeString(value__ContextStub) - } writeUIGestureEvent(value: UIGestureEvent): void { } writeVisibleAreaEventOptions(value: VisibleAreaEventOptions): void { diff --git a/arkoala-arkts/arkui/src/generated/ts/type_check.ts b/arkoala-arkts/arkui/src/generated/ts/type_check.ts index 0e3e6fd466a58b819bb182f87e0d26aa0ac85f1d..b0cef0c7b9288ac39a24222f5d9deca8d5a9ca55 100644 --- a/arkoala-arkts/arkui/src/generated/ts/type_check.ts +++ b/arkoala-arkts/arkui/src/generated/ts/type_check.ts @@ -19547,6 +19547,9 @@ export class TypeChecker { static isArray_Number(value: object|string|number|undefined|null): boolean { return Array.isArray(value) } + static isArray_CustomObject(value: object|string|number|undefined|null): boolean { + return Array.isArray(value) + } static isArray_TouchObject(value: object|string|number|undefined|null): boolean { return Array.isArray(value) } @@ -19637,9 +19640,6 @@ export class TypeChecker { static isArray_LayoutSafeAreaEdge(value: object|string|number|undefined|null): boolean { return Array.isArray(value) } - static isArray_CustomObject(value: object|string|number|undefined|null): boolean { - return Array.isArray(value) - } static isArray_Point(value: object|string|number|undefined|null): boolean { return Array.isArray(value) } diff --git a/arkoala-arkts/arkui/types/index-full.d.ts b/arkoala-arkts/arkui/types/index-full.d.ts index 281b83eb9eeb06dfa01902326b94f9c71545939b..8b4e63c087863a229547fef1c71c9a7e654f464a 100644 --- a/arkoala-arkts/arkui/types/index-full.d.ts +++ b/arkoala-arkts/arkui/types/index-full.d.ts @@ -1002,7 +1002,7 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { constructor(width: number, height: number, settings?: RenderingContextSettings); constructor(width: number, height: number, settings?: RenderingContextSettings, unit?: LengthMetricsUnit); - toDataURL(type?: string, quality?: any): string; + toDataURL(type?: string, quality?: number): string; transferToImageBitmap(): ImageBitmap; } declare class OffscreenCanvas { @@ -1143,9 +1143,11 @@ declare interface AnimatableArithmetic { multiply(scale: number): AnimatableArithmetic; equals(rhs: AnimatableArithmetic): boolean; } +declare function getContext(component?: Object): Context; declare interface Context { _ContextStub: string; } +declare function postCardAction(component: Object, action: Object): void; declare interface Configuration { readonly colorMode: string; readonly fontScale: number; @@ -1161,6 +1163,8 @@ declare interface ExpectedFrameRateRange { max: number; expected: number; } +declare function $r(value: string, ...params: any[]): Resource; +declare function $rawfile(value: string): Resource; declare enum FinishCallbackType { REMOVED = 0, LOGICALLY = 1, @@ -1330,6 +1334,14 @@ declare interface DragItemInfo { builder?: CustomBuilder; extraInfo?: string; } +declare function animateTo(value: AnimateParam, event: (() => void)): void; +declare function animateToImmediately(value: AnimateParam, event: (() => void)): void; +declare function vp2px(value: number): number; +declare function px2vp(value: number): number; +declare function fp2px(value: number): number; +declare function px2fp(value: number): number; +declare function lpx2px(value: number): number; +declare function px2lpx(value: number): number; declare namespace focusControl { function requestFocus(value: string): boolean; } @@ -2466,18 +2478,6 @@ declare enum HoverModeAreaType { TOP_SCREEN = 0, BOTTOM_SCREEN = 1, } -declare function getContext(component?: Object): Context; -declare function postCardAction(component: Object, action: Object): void; -declare function $r(value: string, ...params: any[]): Resource; -declare function $rawfile(value: string): Resource; -declare function animateTo(value: AnimateParam, event: (() => void)): void; -declare function animateToImmediately(value: AnimateParam, event: (() => void)): void; -declare function vp2px(value: number): number; -declare function px2vp(value: number): number; -declare function fp2px(value: number): number; -declare function px2fp(value: number): number; -declare function lpx2px(value: number): number; -declare function px2lpx(value: number): number; declare class AppStorage { static ref(propName: string): AbstractProperty | undefined; static setAndRef(propName: string, defaultValue: T): AbstractProperty; @@ -8850,6 +8850,8 @@ declare class LinearIndicatorAttribute extends CommonMethod void); +declare function getInspectorNodes(): Object; +declare function getInspectorNodeById(id: number): Object; declare namespace Profiler { type Callback_String_Void = ((info: string) => void); } @@ -8857,8 +8859,6 @@ declare namespace Profiler { function registerVsyncCallback(callback_: ((info: string) => void)): void; function unregisterVsyncCallback(): void; } -declare function getInspectorNodes(): Object; -declare function getInspectorNodeById(id: number): Object; declare function setAppBgColor(value: string): void; declare interface RawFileDescriptor { fd: number; diff --git a/arkoala/arkui-types/index-full.d.ts b/arkoala/arkui-types/index-full.d.ts index 25c2ef32f956746066536f06e0033c2b59b4b9fe..80c44f9d13a50e608fa7213b4cb9bae3ba5499ae 100644 --- a/arkoala/arkui-types/index-full.d.ts +++ b/arkoala/arkui-types/index-full.d.ts @@ -1072,7 +1072,7 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { constructor(width: number, height: number, settings?: RenderingContextSettings); constructor(width: number, height: number, settings?: RenderingContextSettings, unit?: LengthMetricsUnit); - toDataURL(type?: string, quality?: any): string; + toDataURL(type?: string, quality?: number): string; transferToImageBitmap(): ImageBitmap; } declare class OffscreenCanvas { @@ -1213,9 +1213,11 @@ declare interface AnimatableArithmetic { multiply(scale: number): AnimatableArithmetic; equals(rhs: AnimatableArithmetic): boolean; } +declare function getContext(component?: Object): Context; declare interface Context { _ContextStub: string; } +declare function postCardAction(component: Object, action: Object): void; declare interface Configuration { readonly colorMode: string; readonly fontScale: number; @@ -1231,6 +1233,8 @@ declare interface ExpectedFrameRateRange { max: number; expected: number; } +declare function $r(value: string, ...params: any[]): Resource; +declare function $rawfile(value: string): Resource; declare enum FinishCallbackType { REMOVED = 0, LOGICALLY = 1, @@ -1400,6 +1404,21 @@ declare interface DragItemInfo { builder?: CustomBuilder; extraInfo?: string; } +declare function animateTo(value: AnimateParam, event: (() => void)): void; +declare function animateToImmediately(value: AnimateParam, event: (() => void)): void; +declare function vp2px(value: number): number; +declare function px2vp(value: number): number; +declare function fp2px(value: number): number; +declare function px2fp(value: number): number; +declare function lpx2px(value: number): number; +declare function px2lpx(value: number): number; +declare namespace focusControl { + function requestFocus(value: string): boolean; +} +declare namespace cursorControl { + function setCursor(value: PointerStyle): void; + function restoreDefault(): void; +} declare interface EventTarget { area: Area; } @@ -2529,25 +2548,6 @@ declare enum HoverModeAreaType { TOP_SCREEN = 0, BOTTOM_SCREEN = 1, } -declare namespace focusControl { - function requestFocus(value: string): boolean; -} -declare namespace cursorControl { - function setCursor(value: PointerStyle): void; - function restoreDefault(): void; -} -declare function getContext(component?: Object): Context; -declare function postCardAction(component: Object, action: Object): void; -declare function $r(value: string, ...params: any[]): Resource; -declare function $rawfile(value: string): Resource; -declare function animateTo(value: AnimateParam, event: (() => void)): void; -declare function animateToImmediately(value: AnimateParam, event: (() => void)): void; -declare function vp2px(value: number): number; -declare function px2vp(value: number): number; -declare function fp2px(value: number): number; -declare function px2fp(value: number): number; -declare function lpx2px(value: number): number; -declare function px2lpx(value: number): number; declare class AppStorage { static ref(propName: string): AbstractProperty | undefined; static setAndRef(propName: string, defaultValue: T): AbstractProperty; @@ -8920,6 +8920,8 @@ declare class LinearIndicatorAttribute extends CommonMethod void); +declare function getInspectorNodes(): Object; +declare function getInspectorNodeById(id: number): Object; declare namespace Profiler { type Callback_String_Void = ((info: string) => void); } @@ -8927,8 +8929,6 @@ declare namespace Profiler { function registerVsyncCallback(callback_: ((info: string) => void)): void; function unregisterVsyncCallback(): void; } -declare function getInspectorNodes(): Object; -declare function getInspectorNodeById(id: number): Object; declare function setAppBgColor(value: string): void; declare interface RawFileDescriptor { fd: number; diff --git a/arkoala/arkui/src/generated/ArkCanvasRendererMaterialized.ts b/arkoala/arkui/src/generated/ArkCanvasRendererMaterialized.ts index e6affb6fd484bf6f13a7939480660d09928b0e40..17f86aeeaf7b4176aaa46c4dcc0cde6be09f7074 100644 --- a/arkoala/arkui/src/generated/ArkCanvasRendererMaterialized.ts +++ b/arkoala/arkui/src/generated/ArkCanvasRendererMaterialized.ts @@ -953,7 +953,7 @@ export class CanvasRenderer extends CanvasPath implements MaterializedBase { } private measureText_serialize(text: string): TextMetrics { const retval = ArkUIGeneratedNativeModule._CanvasRenderer_measureText(this.peer!.ptr, text) - return new Deserializer(retval, retval.byteLength).readTextMetrics() + return new Deserializer(retval.buffer, retval.byteLength).readTextMetrics() } private strokeText_serialize(text: string, x: number, y: number, maxWidth?: number): void { const thisSerializer: Serializer = Serializer.hold() diff --git a/arkoala/arkui/src/generated/ArkCanvasRenderingContext2DMaterialized.ts b/arkoala/arkui/src/generated/ArkCanvasRenderingContext2DMaterialized.ts index e94011ffc50a54070604a9979f80bb5d10116f0e..7adb134a574d0a5f7125e7ea2536ae4ca7b51296 100644 --- a/arkoala/arkui/src/generated/ArkCanvasRenderingContext2DMaterialized.ts +++ b/arkoala/arkui/src/generated/ArkCanvasRenderingContext2DMaterialized.ts @@ -80,9 +80,9 @@ export class CanvasRenderingContext2D extends CanvasRenderer implements Material static getFinalizer(): KPointer { return ArkUIGeneratedNativeModule._CanvasRenderingContext2D_getFinalizer() } - public toDataURL(type?: string, quality?: number): string { + public toDataURL(type?: string, quality?: float32): string { const type_casted = type as (string | undefined) - const quality_casted = quality as (number | undefined) + const quality_casted = quality as (float32 | undefined) return this.toDataURL_serialize(type_casted, quality_casted) } public startImageAnalyzer(config: ImageAnalyzerConfig): Promise { @@ -125,7 +125,7 @@ export class CanvasRenderingContext2D extends CanvasRenderer implements Material off(type: string, callback_: (() => void)): void { throw new Error("TBD") } - private toDataURL_serialize(type?: string, quality?: number): string { + private toDataURL_serialize(type?: string, quality?: float32): string { const thisSerializer: Serializer = Serializer.hold() let type_type: int32 = RuntimeType.UNDEFINED type_type = runtimeType(type) @@ -139,7 +139,7 @@ export class CanvasRenderingContext2D extends CanvasRenderer implements Material thisSerializer.writeInt8(quality_type) if ((RuntimeType.UNDEFINED) != (quality_type)) { const quality_value = quality! - thisSerializer.writeNumber(quality_value) + thisSerializer.writeFloat32(quality_value) } const retval = ArkUIGeneratedNativeModule._CanvasRenderingContext2D_toDataURL(this.peer!.ptr, thisSerializer.asArray(), thisSerializer.length()) thisSerializer.release() diff --git a/arkoala/arkui/src/generated/ArkCommonInterfaces.ts b/arkoala/arkui/src/generated/ArkCommonInterfaces.ts index 882662d66fafa7e47483d14467f70e27bf5b8fb1..7b98707e56fdb0933deabb8e9f660bc365a30cc4 100644 --- a/arkoala/arkui/src/generated/ArkCommonInterfaces.ts +++ b/arkoala/arkui/src/generated/ArkCommonInterfaces.ts @@ -21,10 +21,10 @@ import { KInt, KPointer, KBoolean, KStringPtr, wrapCallback } from "@koalaui/int import { NodeAttach, remember } from "@koalaui/runtime" import { TextDecorationType, TextDecorationStyle, Curve, PlayMode, SharedTransitionEffectType, HorizontalAlign, VerticalAlign, TransitionType, FontWeight, FontStyle, Color, ColoringStrategy, GradientDirection, TouchType, BorderStyle, Placement, ArrowPointPosition, ClickEffectLevel, NestedScrollMode, HitTestMode, ImageSize, Alignment, HoverEffect, Visibility, ItemAlign, Direction, ObscuredReasons, RenderFit, ImageRepeat, Axis, ResponseType, FunctionKey, ModifierKey, PixelRoundCalcPolicy, MouseButton, MouseAction, KeyType, KeySource, LineCapStyle, LineJoinStyle, BarState, EdgeEffect, IlluminatedType, AccessibilityHoverType } from "./ArkEnumsInterfaces" import { ResourceColor, Length, Bias, Area, Position, Font, BorderRadiuses, EdgeWidths, LocalizedEdgeWidths, SizeOptions, ResourceStr, Dimension, EdgeColors, LocalizedEdgeColors, EdgeStyles, LocalizedBorderRadiuses, Margin, ConstraintSizeOptions, ChainWeightOptions, Padding, LocalizedPadding, LocalizedMargin, BorderOptions, OutlineOptions, EdgeOutlineStyles, EdgeOutlineWidths, OutlineRadiuses, Edges, LocalizedEdges, LocalizedPosition, AccessibilityOptions, PX, VP, FP, LPX, Percentage, ColorMetrics, EdgeWidth } from "./ArkUnitsInterfaces" +import { Resource } from "./ArkResourceInterfaces" import { ICurve } from "./ArkICurveMaterialized" import { TransitionEffect } from "./ArkTransitionEffectMaterialized" import { PixelMap } from "./ArkPixelMapMaterialized" -import { Resource } from "./ArkResourceInterfaces" import { ButtonType, ButtonStyleMode, ButtonRole } from "./ArkButtonInterfaces" import { LengthMetrics } from "./ArkLengthMetricsMaterialized" import { LengthUnit } from "./ArkArkuiExternalInterfaces" @@ -69,9 +69,11 @@ export interface ProvideOptions { } export interface AnimatableArithmetic { } +declare function getContext(arg0: Object): Context export interface Context { _ContextStub: string; } +declare function postCardAction(arg0: Object, arg1: Object): void export interface Configuration { colorMode: string; fontScale: number; @@ -87,6 +89,8 @@ export interface ExpectedFrameRateRange { max: number; expected: number; } +declare function dollar_r(arg0: string, arg1: Array): Resource +declare function dollar_rawfile(arg0: string): Resource export enum FinishCallbackType { REMOVED, LOGICALLY = 1, @@ -238,6 +242,14 @@ export interface DragItemInfo { builder?: CustomBuilder; extraInfo?: string; } +declare function animateTo(arg0: AnimateParam, arg1: (() => void)): void +declare function animateToImmediately(arg0: AnimateParam, arg1: (() => void)): void +declare function vp2px(arg0: number): number +declare function px2vp(arg0: number): number +declare function fp2px(arg0: number): number +declare function px2fp(arg0: number): number +declare function lpx2px(arg0: number): number +declare function px2lpx(arg0: number): number export interface EventTarget { area: Area; } diff --git a/arkoala/arkui/src/generated/ArkCursorControlNamespace.ts b/arkoala/arkui/src/generated/ArkCursorControlNamespace.ts index 9b80e9ebaf18a9005e63b836000c79c3c64ee4bb..cdbf60458e390e8f87dc3da68c59278551d0e4e4 100644 --- a/arkoala/arkui/src/generated/ArkCursorControlNamespace.ts +++ b/arkoala/arkui/src/generated/ArkCursorControlNamespace.ts @@ -16,7 +16,6 @@ // WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! -import { PointerStyle } from "./ArkArkuiCustomInterfaces" import { Finalizable, isResource, isInstanceOf, runtimeType, RuntimeType, SerializerBase, registerCallback, wrapCallback, KPointer, MaterializedBase } from "@koalaui/interop" import { unsafeCast, int32, float32 } from "@koalaui/common" import { Serializer } from "./peers/Serializer" diff --git a/arkoala/arkui/src/generated/ArkCustomSpanMaterialized.ts b/arkoala/arkui/src/generated/ArkCustomSpanMaterialized.ts index 8d7ee26b07760efdffb9d6e2ac0b18413e6b013b..591db04bc9fb7db13a4b83d08f052464e6e3dc4e 100644 --- a/arkoala/arkui/src/generated/ArkCustomSpanMaterialized.ts +++ b/arkoala/arkui/src/generated/ArkCustomSpanMaterialized.ts @@ -67,7 +67,7 @@ export class CustomSpan implements MaterializedBase { thisSerializer.writeCustomSpanMeasureInfo(measureInfo) const retval = ArkUIGeneratedNativeModule._CustomSpan_onMeasure(this.peer!.ptr, thisSerializer.asArray(), thisSerializer.length()) thisSerializer.release() - return new Deserializer(retval, retval.byteLength).readCustomSpanMetrics() + return new Deserializer(retval.buffer, retval.byteLength).readCustomSpanMetrics() } private onDraw_serialize(context: DrawContext, drawInfo: CustomSpanDrawInfo): void { const thisSerializer: Serializer = Serializer.hold() diff --git a/arkoala/arkui/src/generated/ArkDragEventMaterialized.ts b/arkoala/arkui/src/generated/ArkDragEventMaterialized.ts index f9fea9ad0da076d452ec7a81007d0cbd170327e6..918c350395a59f968cfa8ae5ac22041e484f6d67 100644 --- a/arkoala/arkui/src/generated/ArkDragEventMaterialized.ts +++ b/arkoala/arkui/src/generated/ArkDragEventMaterialized.ts @@ -180,7 +180,7 @@ export class DragEventInternal implements MaterializedBase,DragEvent { } private getSummary_serialize(): Summary { const retval = ArkUIGeneratedNativeModule._DragEvent_getSummary(this.peer!.ptr) - return new Deserializer(retval, retval.byteLength).readSummary() + return new Deserializer(retval.buffer, retval.byteLength).readSummary() } private setResult_serialize(dragResult: DragResult): void { ArkUIGeneratedNativeModule._DragEvent_setResult(this.peer!.ptr, dragResult) @@ -191,7 +191,7 @@ export class DragEventInternal implements MaterializedBase,DragEvent { } private getPreviewRect_serialize(): Rectangle { const retval = ArkUIGeneratedNativeModule._DragEvent_getPreviewRect(this.peer!.ptr) - return new Deserializer(retval, retval.byteLength).readRectangle() + return new Deserializer(retval.buffer, retval.byteLength).readRectangle() } private getVelocityX_serialize(): number { const retval = ArkUIGeneratedNativeModule._DragEvent_getVelocityX(this.peer!.ptr) diff --git a/arkoala/arkui/src/generated/ArkFrameNodeMaterialized.ts b/arkoala/arkui/src/generated/ArkFrameNodeMaterialized.ts index 237729041d21b6561efbde1b80cb0b9c29ee7c6e..7953cc536efe591b94544772e7498c9cb3a9ebba 100644 --- a/arkoala/arkui/src/generated/ArkFrameNodeMaterialized.ts +++ b/arkoala/arkui/src/generated/ArkFrameNodeMaterialized.ts @@ -170,6 +170,6 @@ export class FrameNode implements MaterializedBase { } private getPositionToWindowWithTransform_serialize(): Position { const retval = ArkUIGeneratedNativeModule._FrameNode_getPositionToWindowWithTransform(this.peer!.ptr) - return new Deserializer(retval, retval.byteLength).readPosition() + return new Deserializer(retval.buffer, retval.byteLength).readPosition() } } diff --git a/arkoala/arkui/src/generated/ArkGlobalScopecommonMaterialized.ts b/arkoala/arkui/src/generated/ArkGlobalScopecommonMaterialized.ts deleted file mode 100644 index 1003f574d0d4bc421e608541cf0b79d64ce3d679..0000000000000000000000000000000000000000 --- a/arkoala/arkui/src/generated/ArkGlobalScopecommonMaterialized.ts +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) 2024-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. - */ - - -// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! - -import { Context, AnimateParam, FinishCallbackType, ExpectedFrameRateRange } from "./ArkCommonInterfaces" -import { Resource } from "./ArkResourceInterfaces" -import { Curve, PlayMode } from "./ArkEnumsInterfaces" -import { ICurve, ICurveInternal } from "./ArkICurveMaterialized" -import { Finalizable, isResource, isInstanceOf, runtimeType, RuntimeType, SerializerBase, registerCallback, wrapCallback, KPointer, MaterializedBase } from "@koalaui/interop" -import { unsafeCast, int32, float32 } from "@koalaui/common" -import { Serializer } from "./peers/Serializer" -import { CallbackKind } from "./peers/CallbackKind" -import { Deserializer, createDeserializer } from "./peers/Deserializer" -import { CallbackTransformer } from "./peers/CallbackTransformer" -import { ArkUIGeneratedNativeModule } from "./ArkUIGeneratedNativeModule" -export class GlobalScopecommon { - public static getContext(component?: Object): Context { - const component_casted = component as (Object | undefined) - return GlobalScopecommon.getContext_serialize(component_casted) - } - public static postCardAction(component: Object, action: Object): void { - const component_casted = component as (Object) - const action_casted = action as (Object) - GlobalScopecommon.postCardAction_serialize(component_casted, action_casted) - return - } - public static dollar_r(value: string, params: Array): Resource { - const value_casted = value as (string) - const params_casted = params as (Array) - return GlobalScopecommon.dollar_r_serialize(value_casted, params_casted) - } - public static dollar_rawfile(value: string): Resource { - const value_casted = value as (string) - return GlobalScopecommon.dollar_rawfile_serialize(value_casted) - } - public static animateTo(value: AnimateParam, event: (() => void)): void { - const value_casted = value as (AnimateParam) - const event_casted = event as ((() => void)) - GlobalScopecommon.animateTo_serialize(value_casted, event_casted) - return - } - public static animateToImmediately(value: AnimateParam, event: (() => void)): void { - const value_casted = value as (AnimateParam) - const event_casted = event as ((() => void)) - GlobalScopecommon.animateToImmediately_serialize(value_casted, event_casted) - return - } - public static vp2px(value: number): number { - const value_casted = value as (number) - return GlobalScopecommon.vp2px_serialize(value_casted) - } - public static px2vp(value: number): number { - const value_casted = value as (number) - return GlobalScopecommon.px2vp_serialize(value_casted) - } - public static fp2px(value: number): number { - const value_casted = value as (number) - return GlobalScopecommon.fp2px_serialize(value_casted) - } - public static px2fp(value: number): number { - const value_casted = value as (number) - return GlobalScopecommon.px2fp_serialize(value_casted) - } - public static lpx2px(value: number): number { - const value_casted = value as (number) - return GlobalScopecommon.lpx2px_serialize(value_casted) - } - public static px2lpx(value: number): number { - const value_casted = value as (number) - return GlobalScopecommon.px2lpx_serialize(value_casted) - } - private static getContext_serialize(component?: Object): Context { - const thisSerializer: Serializer = Serializer.hold() - let component_type: int32 = RuntimeType.UNDEFINED - component_type = runtimeType(component) - thisSerializer.writeInt8(component_type) - if ((RuntimeType.UNDEFINED) != (component_type)) { - const component_value = component! - thisSerializer.writeCustomObject("Object", component_value) - } - const retval = ArkUIGeneratedNativeModule._GlobalScopecommon_getContext(thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - return new Deserializer(retval, retval.byteLength).readContext() - } - private static postCardAction_serialize(component: Object, action: Object): void { - const thisSerializer: Serializer = Serializer.hold() - thisSerializer.writeCustomObject("Object", component) - thisSerializer.writeCustomObject("Object", action) - ArkUIGeneratedNativeModule._GlobalScopecommon_postCardAction(thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - private static dollar_r_serialize(value: string, params: Array): Resource { - const thisSerializer: Serializer = Serializer.hold() - thisSerializer.writeInt32(params.length) - for (let i = 0; i < params.length; i++) { - const params_element: any = params[i] - thisSerializer.writeCustomObject("Any", params_element) - } - const retval = ArkUIGeneratedNativeModule._GlobalScopecommon_dollar_r(value, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - return new Deserializer(retval, retval.byteLength).readResource() - } - private static dollar_rawfile_serialize(value: string): Resource { - const retval = ArkUIGeneratedNativeModule._GlobalScopecommon_dollar_rawfile(value) - return new Deserializer(retval, retval.byteLength).readResource() - } - private static animateTo_serialize(value: AnimateParam, event: (() => void)): void { - const thisSerializer: Serializer = Serializer.hold() - thisSerializer.writeAnimateParam(value) - thisSerializer.holdAndWriteCallback(event) - ArkUIGeneratedNativeModule._GlobalScopecommon_animateTo(thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - private static animateToImmediately_serialize(value: AnimateParam, event: (() => void)): void { - const thisSerializer: Serializer = Serializer.hold() - thisSerializer.writeAnimateParam(value) - thisSerializer.holdAndWriteCallback(event) - ArkUIGeneratedNativeModule._GlobalScopecommon_animateToImmediately(thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - private static vp2px_serialize(value: number): number { - const retval = ArkUIGeneratedNativeModule._GlobalScopecommon_vp2px(value) - return retval - } - private static px2vp_serialize(value: number): number { - const retval = ArkUIGeneratedNativeModule._GlobalScopecommon_px2vp(value) - return retval - } - private static fp2px_serialize(value: number): number { - const retval = ArkUIGeneratedNativeModule._GlobalScopecommon_fp2px(value) - return retval - } - private static px2fp_serialize(value: number): number { - const retval = ArkUIGeneratedNativeModule._GlobalScopecommon_px2fp(value) - return retval - } - private static lpx2px_serialize(value: number): number { - const retval = ArkUIGeneratedNativeModule._GlobalScopecommon_lpx2px(value) - return retval - } - private static px2lpx_serialize(value: number): number { - const retval = ArkUIGeneratedNativeModule._GlobalScopecommon_px2lpx(value) - return retval - } -} diff --git a/arkoala/arkui/src/generated/ArkGlobalScopeinspectorMaterialized.ts b/arkoala/arkui/src/generated/ArkGlobalScopeinspectorMaterialized.ts deleted file mode 100644 index c5de85fa3cd77fe53f37f7c7ed0ed4b5c9b7cf32..0000000000000000000000000000000000000000 --- a/arkoala/arkui/src/generated/ArkGlobalScopeinspectorMaterialized.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2024-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. - */ - - -// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! - -import { Finalizable, isResource, isInstanceOf, runtimeType, RuntimeType, SerializerBase, registerCallback, wrapCallback, KPointer, MaterializedBase } from "@koalaui/interop" -import { unsafeCast, int32, float32 } from "@koalaui/common" -import { Serializer } from "./peers/Serializer" -import { CallbackKind } from "./peers/CallbackKind" -import { Deserializer, createDeserializer } from "./peers/Deserializer" -import { CallbackTransformer } from "./peers/CallbackTransformer" -import { ArkUIGeneratedNativeModule } from "./ArkUIGeneratedNativeModule" -export class GlobalScopeinspector { - public static getInspectorNodes(): Object { - return GlobalScopeinspector.getInspectorNodes_serialize() - } - public static getInspectorNodeById(id: number): Object { - const id_casted = id as (number) - return GlobalScopeinspector.getInspectorNodeById_serialize(id_casted) - } - public static setAppBgColor(value: string): void { - const value_casted = value as (string) - GlobalScopeinspector.setAppBgColor_serialize(value_casted) - return - } - private static getInspectorNodes_serialize(): Object { - const retval = ArkUIGeneratedNativeModule._GlobalScopeinspector_getInspectorNodes() - throw new Error("Object deserialization is not implemented.") - } - private static getInspectorNodeById_serialize(id: number): Object { - const retval = ArkUIGeneratedNativeModule._GlobalScopeinspector_getInspectorNodeById(id) - throw new Error("Object deserialization is not implemented.") - } - private static setAppBgColor_serialize(value: string): void { - ArkUIGeneratedNativeModule._GlobalScopeinspector_setAppBgColor(value) - } -} diff --git a/arkoala/arkui/src/generated/ArkLayoutManagerMaterialized.ts b/arkoala/arkui/src/generated/ArkLayoutManagerMaterialized.ts index 857b86c2f3f0de9914ecfb4f57d2f80df6b3edce..72fdd0935cd61fdc174cdc20157da61006672a9c 100644 --- a/arkoala/arkui/src/generated/ArkLayoutManagerMaterialized.ts +++ b/arkoala/arkui/src/generated/ArkLayoutManagerMaterialized.ts @@ -71,11 +71,11 @@ export class LayoutManagerInternal implements MaterializedBase,LayoutManager { } private getGlyphPositionAtCoordinate_serialize(x: number, y: number): PositionWithAffinity { const retval = ArkUIGeneratedNativeModule._LayoutManager_getGlyphPositionAtCoordinate(this.peer!.ptr, x, y) - return new Deserializer(retval, retval.byteLength).readPositionWithAffinity() + return new Deserializer(retval.buffer, retval.byteLength).readPositionWithAffinity() } private getLineMetrics_serialize(lineNumber: number): LineMetrics { const retval = ArkUIGeneratedNativeModule._LayoutManager_getLineMetrics(this.peer!.ptr, lineNumber) - return new Deserializer(retval, retval.byteLength).readLineMetrics() + return new Deserializer(retval.buffer, retval.byteLength).readLineMetrics() } private getRectsForRange_serialize(range: TextRange, widthStyle: RectWidthStyle, heightStyle: RectHeightStyle): Array { const thisSerializer: Serializer = Serializer.hold() diff --git a/arkoala/arkui/src/generated/ArkListScrollerMaterialized.ts b/arkoala/arkui/src/generated/ArkListScrollerMaterialized.ts index 8d86eea5ab10e390b7e766e41475aa4686b7bcb9..6f9df2801eddb13bb764553c724e310355c297df 100644 --- a/arkoala/arkui/src/generated/ArkListScrollerMaterialized.ts +++ b/arkoala/arkui/src/generated/ArkListScrollerMaterialized.ts @@ -82,7 +82,7 @@ export class ListScroller extends Scroller implements MaterializedBase { } private getItemRectInGroup_serialize(index: number, indexInGroup: number): RectResult { const retval = ArkUIGeneratedNativeModule._ListScroller_getItemRectInGroup(this.peer!.ptr, index, indexInGroup) - return new Deserializer(retval, retval.byteLength).readRectResult() + return new Deserializer(retval.buffer, retval.byteLength).readRectResult() } private scrollToItemInGroup_serialize(index: number, indexInGroup: number, smooth?: boolean, align?: ScrollAlign): void { const thisSerializer: Serializer = Serializer.hold() @@ -117,6 +117,6 @@ export class ListScroller extends Scroller implements MaterializedBase { } private getVisibleListContentInfo_serialize(x: number, y: number): VisibleListContentInfo { const retval = ArkUIGeneratedNativeModule._ListScroller_getVisibleListContentInfo(this.peer!.ptr, x, y) - return new Deserializer(retval, retval.byteLength).readVisibleListContentInfo() + return new Deserializer(retval.buffer, retval.byteLength).readVisibleListContentInfo() } } diff --git a/arkoala/arkui/src/generated/ArkMeasurableMaterialized.ts b/arkoala/arkui/src/generated/ArkMeasurableMaterialized.ts index 166bf5cc202223609828831e2543cb91fc84c91b..cf5c278c9ae5287fdc4068f70adf491de79fa4aa 100644 --- a/arkoala/arkui/src/generated/ArkMeasurableMaterialized.ts +++ b/arkoala/arkui/src/generated/ArkMeasurableMaterialized.ts @@ -66,19 +66,19 @@ export class MeasurableInternal implements MaterializedBase,Measurable { thisSerializer.writeConstraintSizeOptions(constraint) const retval = ArkUIGeneratedNativeModule._Measurable_measure(this.peer!.ptr, thisSerializer.asArray(), thisSerializer.length()) thisSerializer.release() - return new Deserializer(retval, retval.byteLength).readMeasureResult() + return new Deserializer(retval.buffer, retval.byteLength).readMeasureResult() } private getMargin_serialize(): DirectionalEdgesT { const retval = ArkUIGeneratedNativeModule._Measurable_getMargin(this.peer!.ptr) - return new Deserializer(retval, retval.byteLength).readDirectionalEdgesT() + return new Deserializer(retval.buffer, retval.byteLength).readDirectionalEdgesT() } private getPadding_serialize(): DirectionalEdgesT { const retval = ArkUIGeneratedNativeModule._Measurable_getPadding(this.peer!.ptr) - return new Deserializer(retval, retval.byteLength).readDirectionalEdgesT() + return new Deserializer(retval.buffer, retval.byteLength).readDirectionalEdgesT() } private getBorderWidth_serialize(): DirectionalEdgesT { const retval = ArkUIGeneratedNativeModule._Measurable_getBorderWidth(this.peer!.ptr) - return new Deserializer(retval, retval.byteLength).readDirectionalEdgesT() + return new Deserializer(retval.buffer, retval.byteLength).readDirectionalEdgesT() } public static fromPtr(ptr: KPointer): MeasurableInternal { const obj: MeasurableInternal = new MeasurableInternal() diff --git a/arkoala/arkui/src/generated/ArkOffscreenCanvasRenderingContext2DMaterialized.ts b/arkoala/arkui/src/generated/ArkOffscreenCanvasRenderingContext2DMaterialized.ts index 7ecd1d2745de0688823e869662acba48b83c2cd4..10afb8f8555379ca3910061d0414a14e78efa16f 100644 --- a/arkoala/arkui/src/generated/ArkOffscreenCanvasRenderingContext2DMaterialized.ts +++ b/arkoala/arkui/src/generated/ArkOffscreenCanvasRenderingContext2DMaterialized.ts @@ -71,15 +71,15 @@ export class OffscreenCanvasRenderingContext2D extends CanvasRenderer implements static getFinalizer(): KPointer { return ArkUIGeneratedNativeModule._OffscreenCanvasRenderingContext2D_getFinalizer() } - public toDataURL(type?: string, quality?: any): string { + public toDataURL(type?: string, quality?: float32): string { const type_casted = type as (string | undefined) - const quality_casted = quality as (any | undefined) + const quality_casted = quality as (float32 | undefined) return this.toDataURL_serialize(type_casted, quality_casted) } public transferToImageBitmap(): ImageBitmap { return this.transferToImageBitmap_serialize() } - private toDataURL_serialize(type?: string, quality?: any): string { + private toDataURL_serialize(type?: string, quality?: float32): string { const thisSerializer: Serializer = Serializer.hold() let type_type: int32 = RuntimeType.UNDEFINED type_type = runtimeType(type) @@ -93,7 +93,7 @@ export class OffscreenCanvasRenderingContext2D extends CanvasRenderer implements thisSerializer.writeInt8(quality_type) if ((RuntimeType.UNDEFINED) != (quality_type)) { const quality_value = quality! - thisSerializer.writeCustomObject("Any", quality_value) + thisSerializer.writeFloat32(quality_value) } const retval = ArkUIGeneratedNativeModule._OffscreenCanvasRenderingContext2D_toDataURL(this.peer!.ptr, thisSerializer.asArray(), thisSerializer.length()) thisSerializer.release() diff --git a/arkoala/arkui/src/generated/ArkRichEditorBaseControllerMaterialized.ts b/arkoala/arkui/src/generated/ArkRichEditorBaseControllerMaterialized.ts index 4092c0fd78e622ee3d2dc0bf67b0687d5e4beed7..79b31138fd7912ffde6be079c50e205c93fe3b93 100644 --- a/arkoala/arkui/src/generated/ArkRichEditorBaseControllerMaterialized.ts +++ b/arkoala/arkui/src/generated/ArkRichEditorBaseControllerMaterialized.ts @@ -109,7 +109,7 @@ export class RichEditorBaseController implements MaterializedBase { } private getTypingStyle_serialize(): RichEditorTextStyle { const retval = ArkUIGeneratedNativeModule._RichEditorBaseController_getTypingStyle(this.peer!.ptr) - return new Deserializer(retval, retval.byteLength).readRichEditorTextStyle() + return new Deserializer(retval.buffer, retval.byteLength).readRichEditorTextStyle() } private setTypingStyle_serialize(value: RichEditorTextStyle): void { const thisSerializer: Serializer = Serializer.hold() @@ -142,6 +142,6 @@ export class RichEditorBaseController implements MaterializedBase { } private getPreviewText_serialize(): PreviewText { const retval = ArkUIGeneratedNativeModule._RichEditorBaseController_getPreviewText(this.peer!.ptr) - return new Deserializer(retval, retval.byteLength).readPreviewText() + return new Deserializer(retval.buffer, retval.byteLength).readPreviewText() } } diff --git a/arkoala/arkui/src/generated/ArkRichEditorControllerMaterialized.ts b/arkoala/arkui/src/generated/ArkRichEditorControllerMaterialized.ts index 588ca8e640e7cab141169c813ee8b32da2c79348..2a9e208e6562663cdc4a90ca3e650cd92cc432a5 100644 --- a/arkoala/arkui/src/generated/ArkRichEditorControllerMaterialized.ts +++ b/arkoala/arkui/src/generated/ArkRichEditorControllerMaterialized.ts @@ -25,6 +25,7 @@ import { PreviewText, DecorationStyleResult, PositionWithAffinity, LineMetrics, import { RichEditorTextStyle, RichEditorTextSpanOptions, RichEditorImageSpanOptions, RichEditorBuilderSpanOptions, RichEditorSymbolSpanOptions, RichEditorUpdateTextSpanStyleOptions, RichEditorUpdateImageSpanStyleOptions, RichEditorUpdateSymbolSpanStyleOptions, RichEditorParagraphStyleOptions, RichEditorRange, RichEditorImageSpanResult, RichEditorTextSpanResult, RichEditorParagraphResult, RichEditorSelection, RichEditorSpan, RichEditorSpanPosition, RichEditorImageSpanStyleResult, RichEditorLayoutStyle, RichEditorTextStyleResult, RichEditorSymbolSpanStyle, RichEditorParagraphStyle, LeadingMarginPlaceholder, RichEditorGesture, RichEditorImageSpanStyle, RichEditorSpanStyleOptions } from "./ArkRichEditorInterfaces" import { PixelMap, PixelMapInternal } from "./ArkPixelMapMaterialized" import { ResourceStr, Dimension, Margin, BorderRadiuses, Length, ResourceColor, PX, VP, FP, LPX, Percentage, Padding, Area, Position, SizeOptions } from "./ArkUnitsInterfaces" +import { CustomNodeBuilder } from "./ArkCustomBuilderInterfaces" import { Resource } from "./ArkResourceInterfaces" import { StyledString, StyledStringInternal } from "./ArkStyledStringMaterialized" import { ImageSpanAlignment, ImageFit, FontStyle, TextDecorationType, TextDecorationStyle, Color, ColoringStrategy, FontWeight, TextAlign, WordBreak, LineBreakStrategy } from "./ArkEnumsInterfaces" @@ -268,7 +269,7 @@ export class RichEditorController extends RichEditorBaseController implements Ma } private getSelection_serialize(): RichEditorSelection { const retval = ArkUIGeneratedNativeModule._RichEditorController_getSelection(this.peer!.ptr) - return new Deserializer(retval, retval.byteLength).readRichEditorSelection() + return new Deserializer(retval.buffer, retval.byteLength).readRichEditorSelection() } private fromStyledString_serialize(value: StyledString): Array { const thisSerializer: Serializer = Serializer.hold() diff --git a/arkoala/arkui/src/generated/ArkRichEditorStyledStringControllerMaterialized.ts b/arkoala/arkui/src/generated/ArkRichEditorStyledStringControllerMaterialized.ts index 8277fb411be3fddce61d7435db73b9502157a588..071d4022c67ee16034db4b3c2c8c783feff9f755 100644 --- a/arkoala/arkui/src/generated/ArkRichEditorStyledStringControllerMaterialized.ts +++ b/arkoala/arkui/src/generated/ArkRichEditorStyledStringControllerMaterialized.ts @@ -94,7 +94,7 @@ export class RichEditorStyledStringController extends RichEditorBaseController i } private getSelection_serialize(): RichEditorRange { const retval = ArkUIGeneratedNativeModule._RichEditorStyledStringController_getSelection(this.peer!.ptr) - return new Deserializer(retval, retval.byteLength).readRichEditorRange() + return new Deserializer(retval.buffer, retval.byteLength).readRichEditorRange() } private onContentChanged_serialize(listener: StyledStringChangedListener): void { const thisSerializer: Serializer = Serializer.hold() diff --git a/arkoala/arkui/src/generated/ArkScrollerMaterialized.ts b/arkoala/arkui/src/generated/ArkScrollerMaterialized.ts index e22a31519ac0c7e7f94907aeec8f35b65abe5afe..7cd46889ad18f6907e9914a608f0a971585fb6c4 100644 --- a/arkoala/arkui/src/generated/ArkScrollerMaterialized.ts +++ b/arkoala/arkui/src/generated/ArkScrollerMaterialized.ts @@ -155,7 +155,7 @@ export class Scroller implements MaterializedBase { } private currentOffset_serialize(): OffsetResult { const retval = ArkUIGeneratedNativeModule._Scroller_currentOffset(this.peer!.ptr) - return new Deserializer(retval, retval.byteLength).readOffsetResult() + return new Deserializer(retval.buffer, retval.byteLength).readOffsetResult() } private scrollToIndex_serialize(value: number, smooth?: boolean, align?: ScrollAlign, options?: ScrollToIndexOptions): undefined { const thisSerializer: Serializer = Serializer.hold() @@ -194,7 +194,7 @@ export class Scroller implements MaterializedBase { } private getItemRect_serialize(index: number): RectResult { const retval = ArkUIGeneratedNativeModule._Scroller_getItemRect(this.peer!.ptr, index) - return new Deserializer(retval, retval.byteLength).readRectResult() + return new Deserializer(retval.buffer, retval.byteLength).readRectResult() } private getItemIndex_serialize(x: number, y: number): number { const retval = ArkUIGeneratedNativeModule._Scroller_getItemIndex(this.peer!.ptr, x, y) diff --git a/arkoala/arkui/src/generated/ArkTextContentControllerBaseMaterialized.ts b/arkoala/arkui/src/generated/ArkTextContentControllerBaseMaterialized.ts index a17a394d560ed55ead16d2c7367d4a76f19424f1..853da9233d8d7f8abc95cdaecdb1904aa873f0e8 100644 --- a/arkoala/arkui/src/generated/ArkTextContentControllerBaseMaterialized.ts +++ b/arkoala/arkui/src/generated/ArkTextContentControllerBaseMaterialized.ts @@ -58,11 +58,11 @@ export class TextContentControllerBase implements MaterializedBase { } private getCaretOffset_serialize(): CaretOffset { const retval = ArkUIGeneratedNativeModule._TextContentControllerBase_getCaretOffset(this.peer!.ptr) - return new Deserializer(retval, retval.byteLength).readCaretOffset() + return new Deserializer(retval.buffer, retval.byteLength).readCaretOffset() } private getTextContentRect_serialize(): RectResult { const retval = ArkUIGeneratedNativeModule._TextContentControllerBase_getTextContentRect(this.peer!.ptr) - return new Deserializer(retval, retval.byteLength).readRectResult() + return new Deserializer(retval.buffer, retval.byteLength).readRectResult() } private getTextContentLineCount_serialize(): number { const retval = ArkUIGeneratedNativeModule._TextContentControllerBase_getTextContentLineCount(this.peer!.ptr) diff --git a/arkoala/arkui/src/generated/ArkTextEditControllerExMaterialized.ts b/arkoala/arkui/src/generated/ArkTextEditControllerExMaterialized.ts index a26351c5178a5da4fe6a8de511862fefc7f4c798..bd9c2d9240a7e3ea7a820af9edc5c0c5a2ee40d1 100644 --- a/arkoala/arkui/src/generated/ArkTextEditControllerExMaterialized.ts +++ b/arkoala/arkui/src/generated/ArkTextEditControllerExMaterialized.ts @@ -86,7 +86,7 @@ export class TextEditControllerExInternal extends TextBaseControllerInternal imp } private getPreviewText_serialize(): PreviewText { const retval = ArkUIGeneratedNativeModule._TextEditControllerEx_getPreviewText(this.peer!.ptr) - return new Deserializer(retval, retval.byteLength).readPreviewText() + return new Deserializer(retval.buffer, retval.byteLength).readPreviewText() } public static fromPtr(ptr: KPointer): TextEditControllerExInternal { const obj: TextEditControllerExInternal = new TextEditControllerExInternal() diff --git a/arkoala/arkui/src/generated/ArkUIGeneratedNativeModule.ts b/arkoala/arkui/src/generated/ArkUIGeneratedNativeModule.ts index b03035ffc7c6f16ff17e0c11673eb0b3c08e1c8a..25f6eb6a8ac3194281fc3241e8d60876216398f5 100644 --- a/arkoala/arkui/src/generated/ArkUIGeneratedNativeModule.ts +++ b/arkoala/arkui/src/generated/ArkUIGeneratedNativeModule.ts @@ -12579,6 +12579,27 @@ export class ArkUIGeneratedNativeModule { } throw new Error("Not implemented") } + static _GlobalScope_focusControl_common_requestFocus(value: KStringPtr): boolean { + if ((this._LoadOnce()) == (true)) + { + return this._GlobalScope_focusControl_common_requestFocus(value) + } + throw new Error("Not implemented") + } + static _GlobalScope_cursorControl_common_setCursor(value: KInt): void { + if ((this._LoadOnce()) == (true)) + { + return this._GlobalScope_cursorControl_common_setCursor(value) + } + throw new Error("Not implemented") + } + static _GlobalScope_cursorControl_common_restoreDefault(): void { + if ((this._LoadOnce()) == (true)) + { + return this._GlobalScope_cursorControl_common_restoreDefault() + } + throw new Error("Not implemented") + } static _BaseEvent_ctor(): KPointer { if ((this._LoadOnce()) == (true)) { @@ -13909,111 +13930,6 @@ export class ArkUIGeneratedNativeModule { } throw new Error("Not implemented") } - static _GlobalScope_focusControl_common_requestFocus(value: KStringPtr): boolean { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScope_focusControl_common_requestFocus(value) - } - throw new Error("Not implemented") - } - static _GlobalScope_cursorControl_common_setCursor(value: KInt): void { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScope_cursorControl_common_setCursor(value) - } - throw new Error("Not implemented") - } - static _GlobalScope_cursorControl_common_restoreDefault(): void { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScope_cursorControl_common_restoreDefault() - } - throw new Error("Not implemented") - } - static _GlobalScopecommon_getContext(thisArray: Uint8Array, thisLength: int32): KInteropReturnBuffer { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScopecommon_getContext(thisArray, thisLength) - } - throw new Error("Not implemented") - } - static _GlobalScopecommon_postCardAction(thisArray: Uint8Array, thisLength: int32): void { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScopecommon_postCardAction(thisArray, thisLength) - } - throw new Error("Not implemented") - } - static _GlobalScopecommon_dollar_r(value: KStringPtr, thisArray: Uint8Array, thisLength: int32): KInteropReturnBuffer { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScopecommon_dollar_r(value, thisArray, thisLength) - } - throw new Error("Not implemented") - } - static _GlobalScopecommon_dollar_rawfile(value: KStringPtr): KInteropReturnBuffer { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScopecommon_dollar_rawfile(value) - } - throw new Error("Not implemented") - } - static _GlobalScopecommon_animateTo(thisArray: Uint8Array, thisLength: int32): void { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScopecommon_animateTo(thisArray, thisLength) - } - throw new Error("Not implemented") - } - static _GlobalScopecommon_animateToImmediately(thisArray: Uint8Array, thisLength: int32): void { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScopecommon_animateToImmediately(thisArray, thisLength) - } - throw new Error("Not implemented") - } - static _GlobalScopecommon_vp2px(value: number): number { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScopecommon_vp2px(value) - } - throw new Error("Not implemented") - } - static _GlobalScopecommon_px2vp(value: number): number { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScopecommon_px2vp(value) - } - throw new Error("Not implemented") - } - static _GlobalScopecommon_fp2px(value: number): number { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScopecommon_fp2px(value) - } - throw new Error("Not implemented") - } - static _GlobalScopecommon_px2fp(value: number): number { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScopecommon_px2fp(value) - } - throw new Error("Not implemented") - } - static _GlobalScopecommon_lpx2px(value: number): number { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScopecommon_lpx2px(value) - } - throw new Error("Not implemented") - } - static _GlobalScopecommon_px2lpx(value: number): number { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScopecommon_px2lpx(value) - } - throw new Error("Not implemented") - } static _ContextMenu_ctor(): KPointer { if ((this._LoadOnce()) == (true)) { @@ -18494,25 +18410,4 @@ export class ArkUIGeneratedNativeModule { } throw new Error("Not implemented") } - static _GlobalScopeinspector_getInspectorNodes(): KPointer { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScopeinspector_getInspectorNodes() - } - throw new Error("Not implemented") - } - static _GlobalScopeinspector_getInspectorNodeById(id: number): KPointer { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScopeinspector_getInspectorNodeById(id) - } - throw new Error("Not implemented") - } - static _GlobalScopeinspector_setAppBgColor(value: KStringPtr): void { - if ((this._LoadOnce()) == (true)) - { - return this._GlobalScopeinspector_setAppBgColor(value) - } - throw new Error("Not implemented") - } } \ No newline at end of file diff --git a/arkoala/arkui/src/generated/ArkUIGeneratedNativeModuleEmpty.ts b/arkoala/arkui/src/generated/ArkUIGeneratedNativeModuleEmpty.ts index 9d4ed761dfd7ef6d5faf760317e211e9cd5c9d5a..31d753f5988b12b7e97676d95da16f933c35cc4d 100644 --- a/arkoala/arkui/src/generated/ArkUIGeneratedNativeModuleEmpty.ts +++ b/arkoala/arkui/src/generated/ArkUIGeneratedNativeModuleEmpty.ts @@ -5660,6 +5660,16 @@ export class ArkUIGeneratedNativeModuleEmpty { console.log("_TransitionEffect_combine") return -1 } + _GlobalScope_focusControl_common_requestFocus(value: KStringPtr): boolean { + console.log("_GlobalScope_focusControl_common_requestFocus") + return false + } + _GlobalScope_cursorControl_common_setCursor(value: KInt): void { + console.log("_GlobalScope_cursorControl_common_setCursor") + } + _GlobalScope_cursorControl_common_restoreDefault(): void { + console.log("_GlobalScope_cursorControl_common_restoreDefault") + } _BaseEvent_ctor(): KPointer { console.log("_BaseEvent_ctor") return -1 @@ -6344,61 +6354,6 @@ export class ArkUIGeneratedNativeModuleEmpty { _GestureModifier_applyGesture(ptr: KPointer, thisArray: Uint8Array, thisLength: int32): void { console.log("_GestureModifier_applyGesture") } - _GlobalScope_focusControl_common_requestFocus(value: KStringPtr): boolean { - console.log("_GlobalScope_focusControl_common_requestFocus") - return false - } - _GlobalScope_cursorControl_common_setCursor(value: KInt): void { - console.log("_GlobalScope_cursorControl_common_setCursor") - } - _GlobalScope_cursorControl_common_restoreDefault(): void { - console.log("_GlobalScope_cursorControl_common_restoreDefault") - } - _GlobalScopecommon_getContext(thisArray: Uint8Array, thisLength: int32): KInteropReturnBuffer { - console.log("_GlobalScopecommon_getContext") - return new Uint8Array() - } - _GlobalScopecommon_postCardAction(thisArray: Uint8Array, thisLength: int32): void { - console.log("_GlobalScopecommon_postCardAction") - } - _GlobalScopecommon_dollar_r(value: KStringPtr, thisArray: Uint8Array, thisLength: int32): KInteropReturnBuffer { - console.log("_GlobalScopecommon_dollar_r") - return new Uint8Array() - } - _GlobalScopecommon_dollar_rawfile(value: KStringPtr): KInteropReturnBuffer { - console.log("_GlobalScopecommon_dollar_rawfile") - return new Uint8Array() - } - _GlobalScopecommon_animateTo(thisArray: Uint8Array, thisLength: int32): void { - console.log("_GlobalScopecommon_animateTo") - } - _GlobalScopecommon_animateToImmediately(thisArray: Uint8Array, thisLength: int32): void { - console.log("_GlobalScopecommon_animateToImmediately") - } - _GlobalScopecommon_vp2px(value: number): number { - console.log("_GlobalScopecommon_vp2px") - return 1 - } - _GlobalScopecommon_px2vp(value: number): number { - console.log("_GlobalScopecommon_px2vp") - return 1 - } - _GlobalScopecommon_fp2px(value: number): number { - console.log("_GlobalScopecommon_fp2px") - return 1 - } - _GlobalScopecommon_px2fp(value: number): number { - console.log("_GlobalScopecommon_px2fp") - return 1 - } - _GlobalScopecommon_lpx2px(value: number): number { - console.log("_GlobalScopecommon_lpx2px") - return 1 - } - _GlobalScopecommon_px2lpx(value: number): number { - console.log("_GlobalScopecommon_px2lpx") - return 1 - } _ContextMenu_ctor(): KPointer { console.log("_ContextMenu_ctor") return -1 @@ -8774,15 +8729,4 @@ export class ArkUIGeneratedNativeModuleEmpty { _GlobalScope_Profiler_inspector_unregisterVsyncCallback(): void { console.log("_GlobalScope_Profiler_inspector_unregisterVsyncCallback") } - _GlobalScopeinspector_getInspectorNodes(): KPointer { - console.log("_GlobalScopeinspector_getInspectorNodes") - return -1 - } - _GlobalScopeinspector_getInspectorNodeById(id: number): KPointer { - console.log("_GlobalScopeinspector_getInspectorNodeById") - return -1 - } - _GlobalScopeinspector_setAppBgColor(value: KStringPtr): void { - console.log("_GlobalScopeinspector_setAppBgColor") - } } \ No newline at end of file diff --git a/arkoala/arkui/src/generated/ArkXComponentControllerMaterialized.ts b/arkoala/arkui/src/generated/ArkXComponentControllerMaterialized.ts index 5aa67c9f4ca5abed66578cd324758bbb821dd920..925249690fd5f97ff1a378f25ba573eb34492394 100644 --- a/arkoala/arkui/src/generated/ArkXComponentControllerMaterialized.ts +++ b/arkoala/arkui/src/generated/ArkXComponentControllerMaterialized.ts @@ -124,7 +124,7 @@ export class XComponentController implements MaterializedBase { } private getXComponentSurfaceRect_serialize(): SurfaceRect { const retval = ArkUIGeneratedNativeModule._XComponentController_getXComponentSurfaceRect(this.peer!.ptr) - return new Deserializer(retval, retval.byteLength).readSurfaceRect() + return new Deserializer(retval.buffer, retval.byteLength).readSurfaceRect() } private setXComponentSurfaceRotation_serialize(rotationOptions: SurfaceRotationOptions): void { const thisSerializer: Serializer = Serializer.hold() @@ -134,7 +134,7 @@ export class XComponentController implements MaterializedBase { } private getXComponentSurfaceRotation_serialize(): SurfaceRotationOptions { const retval = ArkUIGeneratedNativeModule._XComponentController_getXComponentSurfaceRotation(this.peer!.ptr) - return new Deserializer(retval, retval.byteLength).readSurfaceRotationOptions() + return new Deserializer(retval.buffer, retval.byteLength).readSurfaceRotationOptions() } private onSurfaceCreated_serialize(surfaceId: string): void { ArkUIGeneratedNativeModule._XComponentController_onSurfaceCreated(this.peer!.ptr, surfaceId) diff --git a/arkoala/arkui/src/generated/GlobalScope.ts b/arkoala/arkui/src/generated/GlobalScope.ts deleted file mode 100644 index 6bd0ad3237ea3d6a237024bcba990962ab9e00ad..0000000000000000000000000000000000000000 --- a/arkoala/arkui/src/generated/GlobalScope.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2024-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. - */ - - -// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! - -import { GlobalScopecommon } from "./ArkGlobalScopecommonMaterialized" -import { ICurve } from "./ArkICurveMaterialized" -import { GlobalScopeinspector } from "./ArkGlobalScopeinspectorMaterialized" -export function getContext(component: Object): Context { - return GlobalScopecommon.getContext(component) -} -export function postCardAction(component: Object, action: Object): void { - GlobalScopecommon.postCardAction(component, action) -} -export function dollar_r(value: string, params: Array): Resource { - return GlobalScopecommon.dollar_r(value, params) -} -export function dollar_rawfile(value: string): Resource { - return GlobalScopecommon.dollar_rawfile(value) -} -export function animateTo(value: AnimateParam, event: (() => void)): void { - GlobalScopecommon.animateTo(value, event) -} -export function animateToImmediately(value: AnimateParam, event: (() => void)): void { - GlobalScopecommon.animateToImmediately(value, event) -} -export function vp2px(value: number): number { - return GlobalScopecommon.vp2px(value) -} -export function px2vp(value: number): number { - return GlobalScopecommon.px2vp(value) -} -export function fp2px(value: number): number { - return GlobalScopecommon.fp2px(value) -} -export function px2fp(value: number): number { - return GlobalScopecommon.px2fp(value) -} -export function lpx2px(value: number): number { - return GlobalScopecommon.lpx2px(value) -} -export function px2lpx(value: number): number { - return GlobalScopecommon.px2lpx(value) -} -export function getInspectorNodes(): Object { - return GlobalScopeinspector.getInspectorNodes() -} -export function getInspectorNodeById(id: number): Object { - return GlobalScopeinspector.getInspectorNodeById(id) -} -export function setAppBgColor(value: string): void { - GlobalScopeinspector.setAppBgColor(value) -} diff --git a/arkoala/arkui/src/generated/peers/Deserializer.ts b/arkoala/arkui/src/generated/peers/Deserializer.ts index d6ccc8a27589e28f8ecff6822c96fa6ef85892c6..fc65e09eaf017ef5f4a51cdb074a3e752a566169 100644 --- a/arkoala/arkui/src/generated/peers/Deserializer.ts +++ b/arkoala/arkui/src/generated/peers/Deserializer.ts @@ -22,7 +22,7 @@ import { Serializer } from "./Serializer" import { Finalizable } from "@koalaui/interop" import { CallbackTransformer } from "./CallbackTransformer" -import { AccessibilityCallback, CustomBuilder, GestureRecognizerJudgeBeginCallback, HoverCallback, OnMoveHandler, OnScrollCallback, ShouldBuiltInRecognizerParallelWithCallback, SizeChangeCallback, TransitionFinishCallback, VisibleAreaChangeCallback, SymbolGlyphModifier, ShadowOptions, ShadowType, ComponentContent, EventTarget, SourceType, SourceTool, SheetTitleOptions, TransitionEffects, TranslateOptions, RotateOptions, ScaleOptions, TransitionEdge, AnimateParam, FinishCallbackType, ExpectedFrameRateRange, DismissPopupAction, DismissReason, Rectangle, PickerTextStyle, PickerDialogButtonStyle, BlurOptions, DrawContext, UIContext, SheetType, SpringBackAction, DismissSheetAction, SheetDismiss, DismissContentCoverAction, ContextMenuAnimationOptions, AnimationRange, PopupMessageOptions, OverlayOffset, ImageModifier, MotionPathOptions, LinearGradient_common, ScrollableCommonMethod, CommonMethod, PixelRoundPolicy, BackgroundEffectOptions, ForegroundEffectOptions, VisualEffect, Filter, BorderImageOption, OutlineStyle, TransitionOptions, MotionBlurOptions, InvertOptions, AlignRuleOption, LocalizedAlignRuleOptions, ClickEffect, UniformDataType, DragItemInfo, ShadowStyle, CircleShape, EllipseShape, PathShape, RectShape, StateStyles, PixelStretchEffectOptions, BackgroundBrightnessOptions, SafeAreaType, SafeAreaEdge, BlurStyle, BackgroundBlurStyleOptions, ForegroundBlurStyleOptions, LinearGradientBlurOptions, EffectType, sharedTransitionOptions, ChainStyle, DragPreviewOptions, DragInteractionOptions, OverlayOptions, BlendMode, BlendApplyType, Blender, GeometryTransitionOptions, PopupOptions, CustomPopupOptions, MenuElement, MenuOptions, ContextMenuOptions, ModalTransition, ContentCoverOptions, SheetOptions, TouchTestInfo, TouchResult, AdaptiveColor, BlurStyleActivePolicy, RepeatMode, MotionBlurAnchor, LocalizedHorizontalAlignParam, LocalizedVerticalAlignParam, PreDragStatus, UIGestureEvent, BlurStyleOptions, ThemeColorMode, FractionStop, DragPreviewMode, TransitionHierarchyStrategy, MenuPreviewMode, BindOptions, SheetSize, SheetMode, ScrollSizeMode, SheetKeyboardAvoidMode, RectResult, TouchTestStrategy, TouchObject, HistoricalPoint, IntentionCode, DragBehavior, Summary, DragResult, NestedScrollOptions, ContentClipMode, EdgeEffectOptions, FadingEdgeOptions, HoverModeAreaType, TextDecorationOptions, InputCounterOptions, CaretOffset, SelectionOptions, MenuPolicy, ContentModifier, CommonConfiguration, LayoutSafeAreaType, LayoutSafeAreaEdge, ItemDragInfo, Context, VisibleAreaEventOptions, MeasureResult, SizeResult, LightSource, MultiShadowOptions, KeyboardAvoidMode, PointLightStyle } from "./../ArkCommonInterfaces" +import { AccessibilityCallback, CustomBuilder, GestureRecognizerJudgeBeginCallback, HoverCallback, OnMoveHandler, OnScrollCallback, ShouldBuiltInRecognizerParallelWithCallback, SizeChangeCallback, TransitionFinishCallback, VisibleAreaChangeCallback, SymbolGlyphModifier, ShadowOptions, ShadowType, ComponentContent, EventTarget, SourceType, SourceTool, SheetTitleOptions, TransitionEffects, TranslateOptions, RotateOptions, ScaleOptions, TransitionEdge, AnimateParam, FinishCallbackType, ExpectedFrameRateRange, DismissPopupAction, DismissReason, Rectangle, PickerTextStyle, PickerDialogButtonStyle, BlurOptions, DrawContext, UIContext, SheetType, SpringBackAction, DismissSheetAction, SheetDismiss, DismissContentCoverAction, ContextMenuAnimationOptions, AnimationRange, PopupMessageOptions, OverlayOffset, ImageModifier, MotionPathOptions, LinearGradient_common, ScrollableCommonMethod, CommonMethod, PixelRoundPolicy, BackgroundEffectOptions, ForegroundEffectOptions, VisualEffect, Filter, BorderImageOption, OutlineStyle, TransitionOptions, MotionBlurOptions, InvertOptions, AlignRuleOption, LocalizedAlignRuleOptions, ClickEffect, UniformDataType, DragItemInfo, ShadowStyle, CircleShape, EllipseShape, PathShape, RectShape, StateStyles, PixelStretchEffectOptions, BackgroundBrightnessOptions, SafeAreaType, SafeAreaEdge, BlurStyle, BackgroundBlurStyleOptions, ForegroundBlurStyleOptions, LinearGradientBlurOptions, EffectType, sharedTransitionOptions, ChainStyle, DragPreviewOptions, DragInteractionOptions, OverlayOptions, BlendMode, BlendApplyType, Blender, GeometryTransitionOptions, PopupOptions, CustomPopupOptions, MenuElement, MenuOptions, ContextMenuOptions, ModalTransition, ContentCoverOptions, SheetOptions, TouchTestInfo, TouchResult, AdaptiveColor, BlurStyleActivePolicy, RepeatMode, MotionBlurAnchor, LocalizedHorizontalAlignParam, LocalizedVerticalAlignParam, PreDragStatus, UIGestureEvent, BlurStyleOptions, ThemeColorMode, FractionStop, DragPreviewMode, TransitionHierarchyStrategy, MenuPreviewMode, BindOptions, SheetSize, SheetMode, ScrollSizeMode, SheetKeyboardAvoidMode, RectResult, TouchTestStrategy, TouchObject, HistoricalPoint, IntentionCode, DragBehavior, Summary, DragResult, NestedScrollOptions, ContentClipMode, EdgeEffectOptions, FadingEdgeOptions, HoverModeAreaType, TextDecorationOptions, InputCounterOptions, CaretOffset, SelectionOptions, MenuPolicy, ContentModifier, CommonConfiguration, LayoutSafeAreaType, LayoutSafeAreaEdge, ItemDragInfo, VisibleAreaEventOptions, MeasureResult, SizeResult, LightSource, MultiShadowOptions, KeyboardAvoidMode, PointLightStyle } from "./../ArkCommonInterfaces" import { ButtonTriggerClickCallback, ButtonType, ButtonStyleMode, ButtonRole, LabelStyle, ControlSize, ButtonOptions } from "./../ArkButtonInterfaces" import { Callback_Extender_OnFinish, Callback_Extender_OnProgress, DoubleAnimationParam } from "./../ArkAnimationExtenderInterfaces" import { Callback_RangeUpdate } from "./../ArkArkuiCustomInterfaces" @@ -7825,12 +7825,6 @@ export class Deserializer extends DeserializerBase { let value: Component3DAttribute = ({} as Component3DAttribute) return value } - readContext(): Context { - let valueDeserializer: Deserializer = this - const _ContextStub_result: string = (valueDeserializer.readString() as string) - let value: Context = ({_ContextStub: _ContextStub_result} as Context) - return value - } readUIGestureEvent(): UIGestureEvent { let value: UIGestureEvent = ({} as UIGestureEvent) return value diff --git a/arkoala/arkui/src/generated/peers/Serializer.ts b/arkoala/arkui/src/generated/peers/Serializer.ts index b28f91bb131494eb0942769710026bc95d52e5f2..64d1a3465243038f72c611c1ec322eea75c05dbe 100644 --- a/arkoala/arkui/src/generated/peers/Serializer.ts +++ b/arkoala/arkui/src/generated/peers/Serializer.ts @@ -18,7 +18,7 @@ import { int32, float32, unsafeCast } from "@koalaui/common" import { CallbackKind } from "./CallbackKind" import { Finalizable } from "@koalaui/interop" import { CallbackTransformer } from "./CallbackTransformer" -import { AccessibilityCallback, CustomBuilder, GestureRecognizerJudgeBeginCallback, HoverCallback, OnMoveHandler, OnScrollCallback, ShouldBuiltInRecognizerParallelWithCallback, SizeChangeCallback, TransitionFinishCallback, VisibleAreaChangeCallback, SymbolGlyphModifier, ShadowOptions, ShadowType, ComponentContent, EventTarget, SourceType, SourceTool, SheetTitleOptions, TransitionEffects, TranslateOptions, RotateOptions, ScaleOptions, TransitionEdge, AnimateParam, FinishCallbackType, ExpectedFrameRateRange, DismissPopupAction, DismissReason, Rectangle, PickerTextStyle, PickerDialogButtonStyle, BlurOptions, DrawContext, UIContext, SheetType, SpringBackAction, DismissSheetAction, SheetDismiss, DismissContentCoverAction, ContextMenuAnimationOptions, AnimationRange, PopupMessageOptions, OverlayOffset, ImageModifier, MotionPathOptions, LinearGradient_common, ScrollableCommonMethod, CommonMethod, PixelRoundPolicy, BackgroundEffectOptions, ForegroundEffectOptions, VisualEffect, Filter, BorderImageOption, OutlineStyle, TransitionOptions, MotionBlurOptions, InvertOptions, AlignRuleOption, LocalizedAlignRuleOptions, ClickEffect, UniformDataType, DragItemInfo, ShadowStyle, CircleShape, EllipseShape, PathShape, RectShape, StateStyles, PixelStretchEffectOptions, BackgroundBrightnessOptions, SafeAreaType, SafeAreaEdge, BlurStyle, BackgroundBlurStyleOptions, ForegroundBlurStyleOptions, LinearGradientBlurOptions, EffectType, sharedTransitionOptions, ChainStyle, DragPreviewOptions, DragInteractionOptions, OverlayOptions, BlendMode, BlendApplyType, Blender, GeometryTransitionOptions, PopupOptions, CustomPopupOptions, MenuElement, MenuOptions, ContextMenuOptions, ModalTransition, ContentCoverOptions, SheetOptions, TouchTestInfo, TouchResult, AdaptiveColor, BlurStyleActivePolicy, RepeatMode, MotionBlurAnchor, LocalizedHorizontalAlignParam, LocalizedVerticalAlignParam, PreDragStatus, UIGestureEvent, BlurStyleOptions, ThemeColorMode, FractionStop, DragPreviewMode, TransitionHierarchyStrategy, MenuPreviewMode, BindOptions, SheetSize, SheetMode, ScrollSizeMode, SheetKeyboardAvoidMode, RectResult, TouchTestStrategy, TouchObject, HistoricalPoint, IntentionCode, DragBehavior, Summary, DragResult, NestedScrollOptions, ContentClipMode, EdgeEffectOptions, FadingEdgeOptions, HoverModeAreaType, TextDecorationOptions, InputCounterOptions, CaretOffset, SelectionOptions, MenuPolicy, ContentModifier, CommonConfiguration, LayoutSafeAreaType, LayoutSafeAreaEdge, ItemDragInfo, Context, VisibleAreaEventOptions, MeasureResult, SizeResult, LightSource, MultiShadowOptions, KeyboardAvoidMode, PointLightStyle } from "./../ArkCommonInterfaces" +import { AccessibilityCallback, CustomBuilder, GestureRecognizerJudgeBeginCallback, HoverCallback, OnMoveHandler, OnScrollCallback, ShouldBuiltInRecognizerParallelWithCallback, SizeChangeCallback, TransitionFinishCallback, VisibleAreaChangeCallback, SymbolGlyphModifier, ShadowOptions, ShadowType, ComponentContent, EventTarget, SourceType, SourceTool, SheetTitleOptions, TransitionEffects, TranslateOptions, RotateOptions, ScaleOptions, TransitionEdge, AnimateParam, FinishCallbackType, ExpectedFrameRateRange, DismissPopupAction, DismissReason, Rectangle, PickerTextStyle, PickerDialogButtonStyle, BlurOptions, DrawContext, UIContext, SheetType, SpringBackAction, DismissSheetAction, SheetDismiss, DismissContentCoverAction, ContextMenuAnimationOptions, AnimationRange, PopupMessageOptions, OverlayOffset, ImageModifier, MotionPathOptions, LinearGradient_common, ScrollableCommonMethod, CommonMethod, PixelRoundPolicy, BackgroundEffectOptions, ForegroundEffectOptions, VisualEffect, Filter, BorderImageOption, OutlineStyle, TransitionOptions, MotionBlurOptions, InvertOptions, AlignRuleOption, LocalizedAlignRuleOptions, ClickEffect, UniformDataType, DragItemInfo, ShadowStyle, CircleShape, EllipseShape, PathShape, RectShape, StateStyles, PixelStretchEffectOptions, BackgroundBrightnessOptions, SafeAreaType, SafeAreaEdge, BlurStyle, BackgroundBlurStyleOptions, ForegroundBlurStyleOptions, LinearGradientBlurOptions, EffectType, sharedTransitionOptions, ChainStyle, DragPreviewOptions, DragInteractionOptions, OverlayOptions, BlendMode, BlendApplyType, Blender, GeometryTransitionOptions, PopupOptions, CustomPopupOptions, MenuElement, MenuOptions, ContextMenuOptions, ModalTransition, ContentCoverOptions, SheetOptions, TouchTestInfo, TouchResult, AdaptiveColor, BlurStyleActivePolicy, RepeatMode, MotionBlurAnchor, LocalizedHorizontalAlignParam, LocalizedVerticalAlignParam, PreDragStatus, UIGestureEvent, BlurStyleOptions, ThemeColorMode, FractionStop, DragPreviewMode, TransitionHierarchyStrategy, MenuPreviewMode, BindOptions, SheetSize, SheetMode, ScrollSizeMode, SheetKeyboardAvoidMode, RectResult, TouchTestStrategy, TouchObject, HistoricalPoint, IntentionCode, DragBehavior, Summary, DragResult, NestedScrollOptions, ContentClipMode, EdgeEffectOptions, FadingEdgeOptions, HoverModeAreaType, TextDecorationOptions, InputCounterOptions, CaretOffset, SelectionOptions, MenuPolicy, ContentModifier, CommonConfiguration, LayoutSafeAreaType, LayoutSafeAreaEdge, ItemDragInfo, VisibleAreaEventOptions, MeasureResult, SizeResult, LightSource, MultiShadowOptions, KeyboardAvoidMode, PointLightStyle } from "./../ArkCommonInterfaces" import { ButtonTriggerClickCallback, ButtonType, ButtonStyleMode, ButtonRole, LabelStyle, ControlSize, ButtonOptions } from "./../ArkButtonInterfaces" import { Callback_Extender_OnFinish, Callback_Extender_OnProgress, DoubleAnimationParam } from "./../ArkAnimationExtenderInterfaces" import { Callback_RangeUpdate } from "./../ArkArkuiCustomInterfaces" @@ -8858,11 +8858,6 @@ export class Serializer extends SerializerBase { } writeComponent3DAttribute(value: Component3DAttribute): void { } - writeContext(value: Context): void { - let valueSerializer: Serializer = this - const value__ContextStub = value._ContextStub - valueSerializer.writeString(value__ContextStub) - } writeUIGestureEvent(value: UIGestureEvent): void { } writeVisibleAreaEventOptions(value: VisibleAreaEventOptions): void { diff --git a/arkoala/arkui/src/resources.ts b/arkoala/arkui/src/resources.ts index 59269a9580a7cea85a8d7e2734265fc50be63c13..134a18a4c1d351fe02f6c2ca74f754b981e88a76 100644 --- a/arkoala/arkui/src/resources.ts +++ b/arkoala/arkui/src/resources.ts @@ -1,103 +1,40 @@ -/* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { ArkResource } from "./shared/ArkResource" - -const RESOURCE_TYPE: Record = { // Copied from ets2bundle/compiler/src/pre_define.ts - color: 10001, - float: 10002, - string: 10003, - plural: 10004, - boolean: 10005, - intarray: 10006, - integer: 10007, - pattern: 10008, - strarray: 10009, - media: 20000, - rawfile: 30000 -}; - -class ResourceContext { - private bundleName: string = "" - private moduleName: string = "" - private resources: Record = {} - - initialize(bundleName: string, moduleName: string, resources: Record) { - this.bundleName = bundleName - this.moduleName = moduleName - this.resources = resources - } - - getResourceDescriptor(name: string, key: string, type: string, params?: any[]): Resource { - if (!this.bundleName) throw new Error("Uninitialized resources") - - let typeId = RESOURCE_TYPE[type]! - if (typeId == undefined) throw new Error("Illegal resource type: " + type) - - let id = this.resources[key] - if (id == undefined) throw new Error("No such resource: " + key) - - return this.getResourceDescriptorFromRaw(name, id, typeId, params) - } - - getRawfileResourceDescriptor(name: string, key: string): Resource { - if (!this.bundleName) throw new Error("Uninitialized resources") - return this.getResourceDescriptorFromRaw(name, 0, RESOURCE_TYPE.rawfile, [key]) - } - - private getResourceDescriptorFromRaw(name: string, id: number, type: number, params?: any[]): Resource { - return new ArkResource( - this.bundleName, - this.moduleName, - id, - type, - name, - params - ) +export function _r(bundleName: string, moduleName: string, name: string): Resource { + const param: string = name.split(".")[1]; + let res_type = 20000; + + switch (param) { + case 'media': + res_type = 20000; + break; + case 'color': + res_type = 10001; + break; + case 'string': + res_type = 10003; + break; + case 'float': + res_type = 10002; + break; } -} - -const resourceContext = new ResourceContext() -// TODO consider resolving resources in plugin - -const KEY_SCOPE_SPLIT_REGEXP = new RegExp("(.*?)\\.(.*)") - -function getAppKey(key: string): string { - let parts = key.match(KEY_SCOPE_SPLIT_REGEXP) - if (!parts) throw new Error("Illegal key: " + key) - if (parts[1] !== "app") throw new Error("Only 'app' resources are supported") // TODO 'sys' resources - return parts[2] + return { + "id": -1, + "type": res_type, + "params": new Array(name), + "bundleName": bundleName, + "moduleName": moduleName + } as Resource } -export function _r(name: string, ...params: any[]): Resource { - let key = getAppKey(name) - let type = key.split(".", 1)[0] - return resourceContext.getResourceDescriptor(name, key, type, params) +export function _rawfile(bundleName: string, moduleName: string, name: string): Resource { + return { + "id": 0, + "type": 30000, + "params": new Array(name), + "bundleName": bundleName, + "moduleName": moduleName + } as Resource } -export function _rawfile(name: string): Resource { - // TODO Does rawfile support extra params? - return resourceContext.getRawfileResourceDescriptor(name, getAppKey('app.' + name)) -} - -// /** @internal */ -export function __registerResources(bundleName: string, moduleName: string, resources: Record) { - if (!bundleName) throw new RangeError("Illegal bundle name") - if (!moduleName) throw new RangeError("Illegal module name") - - resourceContext.initialize(bundleName, moduleName, resources) -} \ No newline at end of file +export function __registerResources(bundleName: string, moduleName: string, resources: Record) {} \ No newline at end of file diff --git a/arkoala/framework/native/src/generated/Serializers.h b/arkoala/framework/native/src/generated/Serializers.h index 9048b0fa8e22209cfa5fb19da02f5e17b3188937..33285e0e965c6b7bfdc5881b8999f267d67dd028 100644 --- a/arkoala/framework/native/src/generated/Serializers.h +++ b/arkoala/framework/native/src/generated/Serializers.h @@ -21263,37 +21263,6 @@ inline Ark_RuntimeType runtimeType(const Opt_Union_ResourceStr_Scene& value) return (value.tag != INTEROP_TAG_UNDEFINED) ? (INTEROP_RUNTIME_OBJECT) : (INTEROP_RUNTIME_UNDEFINED); } template <> -inline Ark_RuntimeType runtimeType(const Ark_Context& value) -{ - return INTEROP_RUNTIME_OBJECT; -} -template <> -inline void WriteToString(std::string* result, const Ark_Context* value) { - result->append("{"); - // Ark_String _ContextStub - result->append("._ContextStub="); - WriteToString(result, &value->_ContextStub); - result->append("}"); -} -template <> -inline void WriteToString(std::string* result, const Opt_Context* value) { - result->append("{.tag="); - result->append(tagNameExact((Ark_Tag)(value->tag))); - result->append(", .value="); - if (value->tag != INTEROP_TAG_UNDEFINED) { - WriteToString(result, &value->value); - } else { - Ark_Undefined undefined = { 0 }; - WriteToString(result, undefined); - } - result->append("}"); -} -template <> -inline Ark_RuntimeType runtimeType(const Opt_Context& value) -{ - return (value.tag != INTEROP_TAG_UNDEFINED) ? (INTEROP_RUNTIME_OBJECT) : (INTEROP_RUNTIME_UNDEFINED); -} -template <> inline Ark_RuntimeType runtimeType(const Ark_UIGestureEvent& value) { return INTEROP_RUNTIME_OBJECT; @@ -27826,33 +27795,6 @@ inline Ark_RuntimeType runtimeType(const Opt_ButtonTriggerClickCallback& value) return (value.tag != INTEROP_TAG_UNDEFINED) ? (INTEROP_RUNTIME_OBJECT) : (INTEROP_RUNTIME_UNDEFINED); } template <> -inline Ark_RuntimeType runtimeType(const Ark_GlobalScope_inspector& value) -{ - return INTEROP_RUNTIME_OBJECT; -} -template <> -inline void WriteToString(std::string* result, const Ark_GlobalScope_inspector value) { - WriteToString(result, static_cast(value)); -} -template <> -inline void WriteToString(std::string* result, const Opt_GlobalScope_inspector* value) { - result->append("{.tag="); - result->append(tagNameExact((Ark_Tag)(value->tag))); - result->append(", .value="); - if (value->tag != INTEROP_TAG_UNDEFINED) { - WriteToString(result, value->value); - } else { - Ark_Undefined undefined = { 0 }; - WriteToString(result, undefined); - } - result->append("}"); -} -template <> -inline Ark_RuntimeType runtimeType(const Opt_GlobalScope_inspector& value) -{ - return (value.tag != INTEROP_TAG_UNDEFINED) ? (INTEROP_RUNTIME_OBJECT) : (INTEROP_RUNTIME_UNDEFINED); -} -template <> inline Ark_RuntimeType runtimeType(const Ark_GlobalScope_Profiler_inspector& value) { return INTEROP_RUNTIME_OBJECT; @@ -45633,33 +45575,6 @@ inline Ark_RuntimeType runtimeType(const Opt_SceneOptions& value) return (value.tag != INTEROP_TAG_UNDEFINED) ? (INTEROP_RUNTIME_OBJECT) : (INTEROP_RUNTIME_UNDEFINED); } template <> -inline Ark_RuntimeType runtimeType(const Ark_GlobalScope_common& value) -{ - return INTEROP_RUNTIME_OBJECT; -} -template <> -inline void WriteToString(std::string* result, const Ark_GlobalScope_common value) { - WriteToString(result, static_cast(value)); -} -template <> -inline void WriteToString(std::string* result, const Opt_GlobalScope_common* value) { - result->append("{.tag="); - result->append(tagNameExact((Ark_Tag)(value->tag))); - result->append(", .value="); - if (value->tag != INTEROP_TAG_UNDEFINED) { - WriteToString(result, value->value); - } else { - Ark_Undefined undefined = { 0 }; - WriteToString(result, undefined); - } - result->append("}"); -} -template <> -inline Ark_RuntimeType runtimeType(const Opt_GlobalScope_common& value) -{ - return (value.tag != INTEROP_TAG_UNDEFINED) ? (INTEROP_RUNTIME_OBJECT) : (INTEROP_RUNTIME_UNDEFINED); -} -template <> inline Ark_RuntimeType runtimeType(const Ark_UICommonEvent& value) { return INTEROP_RUNTIME_OBJECT; @@ -60299,12 +60214,6 @@ class Serializer : public SerializerBase { void writeComponent3DAttribute(Ark_Component3DAttribute value) { } - void writeContext(Ark_Context value) - { - Serializer& valueSerializer = *this; - const auto value__ContextStub = value._ContextStub; - valueSerializer.writeString(value__ContextStub); - } void writeUIGestureEvent(Ark_UIGestureEvent value) { } @@ -82978,13 +82887,6 @@ class Deserializer : public DeserializerBase { Ark_Component3DAttribute value = {}; return value; } - Ark_Context readContext() - { - Ark_Context value = {}; - Deserializer& valueDeserializer = *this; - value._ContextStub = static_cast(valueDeserializer.readString()); - return value; - } Ark_UIGestureEvent readUIGestureEvent() { Ark_UIGestureEvent value = {}; diff --git a/arkoala/framework/native/src/generated/arkoala_api_generated.h b/arkoala/framework/native/src/generated/arkoala_api_generated.h index 034d8d93b15f8b696909422e4780ed3ca8c2ac2c..579261b2b8038dbbef83b774c31d74f3809b4d85 100644 --- a/arkoala/framework/native/src/generated/arkoala_api_generated.h +++ b/arkoala/framework/native/src/generated/arkoala_api_generated.h @@ -1150,8 +1150,6 @@ typedef struct Ark_Component3DAttribute Ark_Component3DAttribute; typedef struct Opt_Component3DAttribute Opt_Component3DAttribute; typedef struct Ark_Union_ResourceStr_Scene Ark_Union_ResourceStr_Scene; typedef struct Opt_Union_ResourceStr_Scene Opt_Union_ResourceStr_Scene; -typedef struct Ark_Context Ark_Context; -typedef struct Opt_Context Opt_Context; typedef struct Ark_UIGestureEvent Ark_UIGestureEvent; typedef struct Opt_UIGestureEvent Opt_UIGestureEvent; typedef struct VisibleAreaChangeCallback VisibleAreaChangeCallback; @@ -1432,9 +1430,6 @@ typedef struct Callback_Array_String_Void Callback_Array_String_Void; typedef struct Opt_Callback_Array_String_Void Opt_Callback_Array_String_Void; typedef struct ButtonTriggerClickCallback ButtonTriggerClickCallback; typedef struct Opt_ButtonTriggerClickCallback Opt_ButtonTriggerClickCallback; -typedef struct GlobalScope_inspectorPeer GlobalScope_inspectorPeer; -typedef struct GlobalScope_inspectorPeer* Ark_GlobalScope_inspector; -typedef struct Opt_GlobalScope_inspector Opt_GlobalScope_inspector; typedef struct GlobalScope_Profiler_inspectorPeer GlobalScope_Profiler_inspectorPeer; typedef struct GlobalScope_Profiler_inspectorPeer* Ark_GlobalScope_Profiler_inspector; typedef struct Opt_GlobalScope_Profiler_inspector Opt_GlobalScope_Profiler_inspector; @@ -2351,9 +2346,6 @@ typedef struct ContextMenuPeer* Ark_ContextMenu; typedef struct Opt_ContextMenu Opt_ContextMenu; typedef struct Ark_SceneOptions Ark_SceneOptions; typedef struct Opt_SceneOptions Opt_SceneOptions; -typedef struct GlobalScope_commonPeer GlobalScope_commonPeer; -typedef struct GlobalScope_commonPeer* Ark_GlobalScope_common; -typedef struct Opt_GlobalScope_common Opt_GlobalScope_common; typedef struct UICommonEventPeer UICommonEventPeer; typedef struct UICommonEventPeer* Ark_UICommonEvent; typedef struct Opt_UICommonEvent Opt_UICommonEvent; @@ -9322,13 +9314,6 @@ typedef struct Opt_Union_ResourceStr_Scene { Ark_Tag tag; Ark_Union_ResourceStr_Scene value; } Opt_Union_ResourceStr_Scene; -typedef struct Ark_Context { - Ark_String _ContextStub; -} Ark_Context; -typedef struct Opt_Context { - Ark_Tag tag; - Ark_Context value; -} Opt_Context; typedef struct Ark_UIGestureEvent { void *handle; } Ark_UIGestureEvent; @@ -10709,10 +10694,6 @@ typedef struct Opt_ButtonTriggerClickCallback { Ark_Tag tag; ButtonTriggerClickCallback value; } Opt_ButtonTriggerClickCallback; -typedef struct Opt_GlobalScope_inspector { - Ark_Tag tag; - Ark_GlobalScope_inspector value; -} Opt_GlobalScope_inspector; typedef struct Opt_GlobalScope_Profiler_inspector { Ark_Tag tag; Ark_GlobalScope_Profiler_inspector value; @@ -14474,10 +14455,6 @@ typedef struct Opt_SceneOptions { Ark_Tag tag; Ark_SceneOptions value; } Opt_SceneOptions; -typedef struct Opt_GlobalScope_common { - Ark_Tag tag; - Ark_GlobalScope_common value; -} Opt_GlobalScope_common; typedef struct Opt_UICommonEvent { Ark_Tag tag; Ark_UICommonEvent value; @@ -19800,14 +19777,14 @@ typedef struct GENERATED_ArkUICanvasRendererAccessor { Ark_Int32 (*getGlobalAlpha)(Ark_CanvasRenderer peer); void (*setGlobalAlpha)(Ark_CanvasRenderer peer, const Ark_Number* globalAlpha); - void (*getGlobalCompositeOperation)(Ark_CanvasRenderer peer); + Ark_String (*getGlobalCompositeOperation)(Ark_CanvasRenderer peer); void (*setGlobalCompositeOperation)(Ark_CanvasRenderer peer, const Ark_String* globalCompositeOperation); void (*setFillStyle)(Ark_CanvasRenderer peer, const Ark_Union_String_Number_CanvasGradient_CanvasPattern* fillStyle); void (*setStrokeStyle)(Ark_CanvasRenderer peer, const Ark_Union_String_Number_CanvasGradient_CanvasPattern* strokeStyle); - void (*getFilter)(Ark_CanvasRenderer peer); + Ark_String (*getFilter)(Ark_CanvasRenderer peer); void (*setFilter)(Ark_CanvasRenderer peer, const Ark_String* filter); Ark_Boolean (*getImageSmoothingEnabled)(Ark_CanvasRenderer peer); @@ -19834,7 +19811,7 @@ typedef struct GENERATED_ArkUICanvasRendererAccessor { Ark_Int32 (*getShadowBlur)(Ark_CanvasRenderer peer); void (*setShadowBlur)(Ark_CanvasRenderer peer, const Ark_Number* shadowBlur); - void (*getShadowColor)(Ark_CanvasRenderer peer); + Ark_String (*getShadowColor)(Ark_CanvasRenderer peer); void (*setShadowColor)(Ark_CanvasRenderer peer, const Ark_String* shadowColor); Ark_Int32 (*getShadowOffsetX)(Ark_CanvasRenderer peer); @@ -19846,7 +19823,7 @@ typedef struct GENERATED_ArkUICanvasRendererAccessor { Ark_String (*getDirection)(Ark_CanvasRenderer peer); void (*setDirection)(Ark_CanvasRenderer peer, const Ark_String* direction); - void (*getFont)(Ark_CanvasRenderer peer); + Ark_String (*getFont)(Ark_CanvasRenderer peer); void (*setFont)(Ark_CanvasRenderer peer, const Ark_String* font); Ark_String (*getTextAlign)(Ark_CanvasRenderer peer); @@ -19861,9 +19838,9 @@ typedef struct GENERATED_ArkUICanvasRenderingContext2DAccessor { void (*destroyPeer)(Ark_CanvasRenderingContext2D peer); Ark_CanvasRenderingContext2D (*ctor)(const Opt_RenderingContextSettings* settings); Ark_NativePointer (*getFinalizer)(); - void (*toDataURL)(Ark_CanvasRenderingContext2D peer, - const Opt_String* type, - const Opt_Number* quality); + Ark_String (*toDataURL)(Ark_CanvasRenderingContext2D peer, + const Opt_String* type, + const Opt_Float32* quality); void (*startImageAnalyzer)(Ark_CanvasRenderingContext2D peer, const Ark_ImageAnalyzerConfig* config, const Callback_Opt_Array_String_Void* outputArgumentForReturningPromise); @@ -19886,9 +19863,9 @@ typedef struct GENERATED_ArkUIOffscreenCanvasRenderingContext2DAccessor { const Ark_Number* height, const Opt_RenderingContextSettings* settings); Ark_NativePointer (*getFinalizer)(); - void (*toDataURL)(Ark_OffscreenCanvasRenderingContext2D peer, - const Opt_String* type, - const Opt_CustomObject* quality); + Ark_String (*toDataURL)(Ark_OffscreenCanvasRenderingContext2D peer, + const Opt_String* type, + const Opt_Float32* quality); Ark_ImageBitmap (*transferToImageBitmap)(Ark_OffscreenCanvasRenderingContext2D peer); } GENERATED_ArkUIOffscreenCanvasRenderingContext2DAccessor; @@ -20182,7 +20159,7 @@ typedef struct GENERATED_ArkUIKeyEventAccessor { Ark_Int32 (*getKeyCode)(Ark_KeyEvent peer); void (*setKeyCode)(Ark_KeyEvent peer, const Ark_Number* keyCode); - void (*getKeyText)(Ark_KeyEvent peer); + Ark_String (*getKeyText)(Ark_KeyEvent peer); void (*setKeyText)(Ark_KeyEvent peer, const Ark_String* keyText); Ark_KeySource (*getKeySource)(Ark_KeyEvent peer); @@ -20310,26 +20287,6 @@ typedef struct GENERATED_ArkUIGestureModifierAccessor { const Ark_UIGestureEvent* event); } GENERATED_ArkUIGestureModifierAccessor; -typedef struct GENERATED_ArkUIGlobalScope_commonAccessor { - void (*destroyPeer)(Ark_GlobalScope_common peer); - Ark_Context (*getContext)(const Opt_CustomObject* component); - void (*postCardAction)(const Ark_CustomObject* component, - const Ark_CustomObject* action); - Ark_Resource (*dollar_r)(const Ark_String* value, - const Array_CustomObject* params); - Ark_Resource (*dollar_rawfile)(const Ark_String* value); - void (*animateTo)(const Ark_AnimateParam* value, - const Callback_Void* event); - void (*animateToImmediately)(const Ark_AnimateParam* value, - const Callback_Void* event); - Ark_Int32 (*vp2px)(const Ark_Number* value); - Ark_Int32 (*px2vp)(const Ark_Number* value); - Ark_Int32 (*fp2px)(const Ark_Number* value); - Ark_Int32 (*px2fp)(const Ark_Number* value); - Ark_Int32 (*lpx2px)(const Ark_Number* value); - Ark_Int32 (*px2lpx)(const Ark_Number* value); -} GENERATED_ArkUIGlobalScope_commonAccessor; - typedef struct GENERATED_ArkUIContextMenuAccessor { void (*destroyPeer)(Ark_ContextMenu peer); Ark_ContextMenu (*ctor)(); @@ -20506,14 +20463,14 @@ typedef struct GENERATED_ArkUIEventTargetInfoAccessor { void (*destroyPeer)(Ark_EventTargetInfo peer); Ark_EventTargetInfo (*ctor)(); Ark_NativePointer (*getFinalizer)(); - void (*getId)(Ark_EventTargetInfo peer); + Ark_String (*getId)(Ark_EventTargetInfo peer); } GENERATED_ArkUIEventTargetInfoAccessor; typedef struct GENERATED_ArkUIGestureRecognizerAccessor { void (*destroyPeer)(Ark_GestureRecognizer peer); Ark_GestureRecognizer (*ctor)(); Ark_NativePointer (*getFinalizer)(); - void (*getTag)(Ark_GestureRecognizer peer); + Ark_String (*getTag)(Ark_GestureRecognizer peer); Ark_GestureControl_GestureType (*getType)(Ark_GestureRecognizer peer); Ark_Boolean (*isBuiltIn)(Ark_GestureRecognizer peer); void (*setEnabled)(Ark_GestureRecognizer peer, @@ -20607,7 +20564,7 @@ typedef struct GENERATED_ArkUINavDestinationContextAccessor { Ark_NavPathInfo pathInfo); void (*setPathStack)(Ark_NavDestinationContext peer, Ark_NavPathStack pathStack); - void (*getNavDestinationId)(Ark_NavDestinationContext peer); + Ark_String (*getNavDestinationId)(Ark_NavDestinationContext peer); void (*setNavDestinationId)(Ark_NavDestinationContext peer, const Ark_String* navDestinationId); } GENERATED_ArkUINavDestinationContextAccessor; @@ -20619,7 +20576,7 @@ typedef struct GENERATED_ArkUINavPathInfoAccessor { const Opt_Callback_PopInfo_Void* onPop, const Opt_Boolean* isEntry); Ark_NativePointer (*getFinalizer)(); - void (*getName)(Ark_NavPathInfo peer); + Ark_String (*getName)(Ark_NavPathInfo peer); void (*setName)(Ark_NavPathInfo peer, const Ark_String* name); void (*setParam)(Ark_NavPathInfo peer, @@ -21107,7 +21064,7 @@ typedef struct GENERATED_ArkUISubmitEventAccessor { Ark_SubmitEvent (*ctor)(); Ark_NativePointer (*getFinalizer)(); void (*keepEditableState)(Ark_SubmitEvent peer); - void (*getText)(Ark_SubmitEvent peer); + Ark_String (*getText)(Ark_SubmitEvent peer); void (*setText)(Ark_SubmitEvent peer, const Ark_String* text); } GENERATED_ArkUISubmitEventAccessor; @@ -21198,7 +21155,7 @@ typedef struct GENERATED_ArkUIFileSelectorParamAccessor { void (*destroyPeer)(Ark_FileSelectorParam peer); Ark_FileSelectorParam (*ctor)(); Ark_NativePointer (*getFinalizer)(); - void (*getTitle)(Ark_FileSelectorParam peer); + Ark_String (*getTitle)(Ark_FileSelectorParam peer); Ark_FileSelectorMode (*getMode)(Ark_FileSelectorParam peer); Array_String (*getAcceptType)(Ark_FileSelectorParam peer); Ark_Boolean (*isCapture)(Ark_FileSelectorParam peer); @@ -21259,7 +21216,7 @@ typedef struct GENERATED_ArkUIPermissionRequestAccessor { Ark_PermissionRequest (*ctor)(); Ark_NativePointer (*getFinalizer)(); void (*deny)(Ark_PermissionRequest peer); - void (*getOrigin)(Ark_PermissionRequest peer); + Ark_String (*getOrigin)(Ark_PermissionRequest peer); Array_String (*getAccessibleResource)(Ark_PermissionRequest peer); void (*grant)(Ark_PermissionRequest peer, const Array_String* resources); @@ -21269,7 +21226,7 @@ typedef struct GENERATED_ArkUIScreenCaptureHandlerAccessor { void (*destroyPeer)(Ark_ScreenCaptureHandler peer); Ark_ScreenCaptureHandler (*ctor)(); Ark_NativePointer (*getFinalizer)(); - void (*getOrigin)(Ark_ScreenCaptureHandler peer); + Ark_String (*getOrigin)(Ark_ScreenCaptureHandler peer); void (*grant)(Ark_ScreenCaptureHandler peer, const Ark_ScreenCaptureConfig* config); void (*deny)(Ark_ScreenCaptureHandler peer); @@ -21297,12 +21254,12 @@ typedef struct GENERATED_ArkUIWebContextMenuParamAccessor { Ark_NativePointer (*getFinalizer)(); Ark_Int32 (*x)(Ark_WebContextMenuParam peer); Ark_Int32 (*y)(Ark_WebContextMenuParam peer); - void (*getLinkUrl)(Ark_WebContextMenuParam peer); - void (*getUnfilteredLinkUrl)(Ark_WebContextMenuParam peer); - void (*getSourceUrl)(Ark_WebContextMenuParam peer); + Ark_String (*getLinkUrl)(Ark_WebContextMenuParam peer); + Ark_String (*getUnfilteredLinkUrl)(Ark_WebContextMenuParam peer); + Ark_String (*getSourceUrl)(Ark_WebContextMenuParam peer); Ark_Boolean (*existsImageContents)(Ark_WebContextMenuParam peer); Ark_ContextMenuMediaType (*getMediaType)(Ark_WebContextMenuParam peer); - void (*getSelectionText)(Ark_WebContextMenuParam peer); + Ark_String (*getSelectionText)(Ark_WebContextMenuParam peer); Ark_ContextMenuSourceType (*getSourceType)(Ark_WebContextMenuParam peer); Ark_ContextMenuInputFieldType (*getInputFieldType)(Ark_WebContextMenuParam peer); Ark_Boolean (*isEditable)(Ark_WebContextMenuParam peer); @@ -21330,8 +21287,8 @@ typedef struct GENERATED_ArkUIConsoleMessageAccessor { const Ark_Number* lineNumber, Ark_MessageLevel messageLevel); Ark_NativePointer (*getFinalizer)(); - void (*getMessage)(Ark_ConsoleMessage peer); - void (*getSourceId)(Ark_ConsoleMessage peer); + Ark_String (*getMessage)(Ark_ConsoleMessage peer); + Ark_String (*getSourceId)(Ark_ConsoleMessage peer); Ark_Int32 (*getLineNumber)(Ark_ConsoleMessage peer); Ark_MessageLevel (*getMessageLevel)(Ark_ConsoleMessage peer); } GENERATED_ArkUIConsoleMessageAccessor; @@ -21341,22 +21298,22 @@ typedef struct GENERATED_ArkUIWebResourceRequestAccessor { Ark_WebResourceRequest (*ctor)(); Ark_NativePointer (*getFinalizer)(); Array_Header (*getRequestHeader)(Ark_WebResourceRequest peer); - void (*getRequestUrl)(Ark_WebResourceRequest peer); + Ark_String (*getRequestUrl)(Ark_WebResourceRequest peer); Ark_Boolean (*isRequestGesture)(Ark_WebResourceRequest peer); Ark_Boolean (*isMainFrame)(Ark_WebResourceRequest peer); Ark_Boolean (*isRedirect)(Ark_WebResourceRequest peer); - void (*getRequestMethod)(Ark_WebResourceRequest peer); + Ark_String (*getRequestMethod)(Ark_WebResourceRequest peer); } GENERATED_ArkUIWebResourceRequestAccessor; typedef struct GENERATED_ArkUIWebResourceResponseAccessor { void (*destroyPeer)(Ark_WebResourceResponse peer); Ark_WebResourceResponse (*ctor)(); Ark_NativePointer (*getFinalizer)(); - void (*getResponseData)(Ark_WebResourceResponse peer); + Ark_String (*getResponseData)(Ark_WebResourceResponse peer); Opt_Union_String_Number_Buffer_Resource (*getResponseDataEx)(Ark_WebResourceResponse peer); - void (*getResponseEncoding)(Ark_WebResourceResponse peer); - void (*getResponseMimeType)(Ark_WebResourceResponse peer); - void (*getReasonMessage)(Ark_WebResourceResponse peer); + Ark_String (*getResponseEncoding)(Ark_WebResourceResponse peer); + Ark_String (*getResponseMimeType)(Ark_WebResourceResponse peer); + Ark_String (*getReasonMessage)(Ark_WebResourceResponse peer); Array_Header (*getResponseHeader)(Ark_WebResourceResponse peer); Ark_Int32 (*getResponseCode)(Ark_WebResourceResponse peer); void (*setResponseData)(Ark_WebResourceResponse peer, @@ -21380,7 +21337,7 @@ typedef struct GENERATED_ArkUIWebResourceErrorAccessor { void (*destroyPeer)(Ark_WebResourceError peer); Ark_WebResourceError (*ctor)(); Ark_NativePointer (*getFinalizer)(); - void (*getErrorInfo)(Ark_WebResourceError peer); + Ark_String (*getErrorInfo)(Ark_WebResourceError peer); Ark_Int32 (*getErrorCode)(Ark_WebResourceError peer); } GENERATED_ArkUIWebResourceErrorAccessor; @@ -21446,7 +21403,7 @@ typedef struct GENERATED_ArkUIXComponentControllerAccessor { void (*destroyPeer)(Ark_XComponentController peer); Ark_XComponentController (*ctor)(); Ark_NativePointer (*getFinalizer)(); - void (*getXComponentSurfaceId)(Ark_XComponentController peer); + Ark_String (*getXComponentSurfaceId)(Ark_XComponentController peer); Ark_CustomObject (*getXComponentContext)(Ark_XComponentController peer); void (*setXComponentSurfaceSize)(Ark_XComponentController peer, const Ark_Literal_Number_surfaceHeight_surfaceWidth* value); @@ -21509,7 +21466,7 @@ typedef struct GENERATED_ArkUIStyledStringAccessor { Ark_StyledString (*ctor)(const Ark_Union_String_ImageAttachment_CustomSpan* value, const Opt_Array_StyleOptions* styles); Ark_NativePointer (*getFinalizer)(); - void (*getString)(Ark_StyledString peer); + Ark_String (*getString)(Ark_StyledString peer); Array_SpanStyle (*getStyles)(Ark_StyledString peer, const Ark_Number* start, const Ark_Number* length, @@ -21521,7 +21478,7 @@ typedef struct GENERATED_ArkUIStyledStringAccessor { const Opt_Number* length); void (*fromHtml)(const Ark_String* html, const Callback_Opt_StyledString_Opt_Array_String_Void* outputArgumentForReturningPromise); - void (*toHtml)(Ark_StyledString styledString); + Ark_String (*toHtml)(Ark_StyledString styledString); Ark_Buffer (*marshalling)(Ark_StyledString styledString); void (*unmarshalling)(const Ark_Buffer* buffer, const Callback_Opt_StyledString_Opt_Array_String_Void* outputArgumentForReturningPromise); @@ -21532,7 +21489,7 @@ typedef struct GENERATED_ArkUITextStyle_styled_stringAccessor { void (*destroyPeer)(Ark_TextStyle_styled_string peer); Ark_TextStyle_styled_string (*ctor)(const Opt_TextStyleInterface* value); Ark_NativePointer (*getFinalizer)(); - void (*getFontFamily)(Ark_TextStyle_styled_string peer); + Ark_String (*getFontFamily)(Ark_TextStyle_styled_string peer); Ark_Int32 (*getFontSize)(Ark_TextStyle_styled_string peer); Ark_Int32 (*getFontWeight)(Ark_TextStyle_styled_string peer); Ark_FontStyle (*getFontStyle)(Ark_TextStyle_styled_string peer); @@ -21601,7 +21558,7 @@ typedef struct GENERATED_ArkUIUrlStyleAccessor { void (*destroyPeer)(Ark_UrlStyle peer); Ark_UrlStyle (*ctor)(const Ark_String* url); Ark_NativePointer (*getFinalizer)(); - void (*getUrl)(Ark_UrlStyle peer); + Ark_String (*getUrl)(Ark_UrlStyle peer); } GENERATED_ArkUIUrlStyleAccessor; typedef struct GENERATED_ArkUIMutableStyledStringAccessor { @@ -21680,13 +21637,6 @@ typedef struct GENERATED_ArkUIGlobalScope_Profiler_inspectorAccessor { void (*unregisterVsyncCallback)(); } GENERATED_ArkUIGlobalScope_Profiler_inspectorAccessor; -typedef struct GENERATED_ArkUIGlobalScope_inspectorAccessor { - void (*destroyPeer)(Ark_GlobalScope_inspector peer); - Ark_CustomObject (*getInspectorNodes)(); - Ark_CustomObject (*getInspectorNodeById)(const Ark_Number* id); - void (*setAppBgColor)(const Ark_String* value); -} GENERATED_ArkUIGlobalScope_inspectorAccessor; - typedef struct GENERATED_ArkUIAbilityComponentEventsReceiver { void (*onConnect)(Ark_Int32 nodeId); void (*onDisconnect)(Ark_Int32 nodeId); @@ -22767,7 +22717,6 @@ typedef struct GENERATED_ArkUIAccessors { const GENERATED_ArkUIChildrenMainSizeAccessor* (*getChildrenMainSizeAccessor)(); const GENERATED_ArkUIUICommonEventAccessor* (*getUICommonEventAccessor)(); const GENERATED_ArkUIGestureModifierAccessor* (*getGestureModifierAccessor)(); - const GENERATED_ArkUIGlobalScope_commonAccessor* (*getGlobalScope_commonAccessor)(); const GENERATED_ArkUIContextMenuAccessor* (*getContextMenuAccessor)(); const GENERATED_ArkUICustomDialogControllerAccessor* (*getCustomDialogControllerAccessor)(); const GENERATED_ArkUILinearGradientAccessor* (*getLinearGradientAccessor)(); @@ -22866,7 +22815,6 @@ typedef struct GENERATED_ArkUIAccessors { const GENERATED_ArkUICustomSpanAccessor* (*getCustomSpanAccessor)(); const GENERATED_ArkUILinearIndicatorControllerAccessor* (*getLinearIndicatorControllerAccessor)(); const GENERATED_ArkUIGlobalScope_Profiler_inspectorAccessor* (*getGlobalScope_Profiler_inspectorAccessor)(); - const GENERATED_ArkUIGlobalScope_inspectorAccessor* (*getGlobalScope_inspectorAccessor)(); } GENERATED_ArkUIAccessors; typedef struct GENERATED_ArkUIGraphicsAPI { diff --git a/arkoala/framework/native/src/generated/bridge_generated.cc b/arkoala/framework/native/src/generated/bridge_generated.cc index 7185a879ee256b3e4b93fdf0c315428989d6bf66..6852d0ddee5145a9ade681a555b461c15c07341c 100644 --- a/arkoala/framework/native/src/generated/bridge_generated.cc +++ b/arkoala/framework/native/src/generated/bridge_generated.cc @@ -18551,14 +18551,14 @@ void impl_CanvasRenderingContext2D_toDataURL(Ark_NativePointer thisPtr, uint8_t* } Opt_String type_value = type_value_buf;; const auto quality_value_buf_runtimeType = static_cast(thisDeserializer.readInt8()); - Opt_Number quality_value_buf = {}; + Opt_Float32 quality_value_buf = {}; quality_value_buf.tag = quality_value_buf_runtimeType == INTEROP_RUNTIME_UNDEFINED ? INTEROP_TAG_UNDEFINED : INTEROP_TAG_OBJECT; if ((INTEROP_RUNTIME_UNDEFINED) != (quality_value_buf_runtimeType)) { - quality_value_buf.value = static_cast(thisDeserializer.readNumber()); + quality_value_buf.value = thisDeserializer.readFloat32(); } - Opt_Number quality_value = quality_value_buf;; - GetAccessors()->getCanvasRenderingContext2DAccessor()->toDataURL(self, (const Opt_String*)&type_value, (const Opt_Number*)&quality_value); + Opt_Float32 quality_value = quality_value_buf;; + GetAccessors()->getCanvasRenderingContext2DAccessor()->toDataURL(self, (const Opt_String*)&type_value, (const Opt_Float32*)&quality_value); } KOALA_INTEROP_V3(CanvasRenderingContext2D_toDataURL, Ark_NativePointer, uint8_t*, int32_t) void impl_CanvasRenderingContext2D_startImageAnalyzer(Ark_NativePointer thisPtr, uint8_t* thisArray, int32_t thisLength) { @@ -18655,14 +18655,14 @@ void impl_OffscreenCanvasRenderingContext2D_toDataURL(Ark_NativePointer thisPtr, } Opt_String type_value = type_value_buf;; const auto quality_value_buf_runtimeType = static_cast(thisDeserializer.readInt8()); - Opt_CustomObject quality_value_buf = {}; + Opt_Float32 quality_value_buf = {}; quality_value_buf.tag = quality_value_buf_runtimeType == INTEROP_RUNTIME_UNDEFINED ? INTEROP_TAG_UNDEFINED : INTEROP_TAG_OBJECT; if ((INTEROP_RUNTIME_UNDEFINED) != (quality_value_buf_runtimeType)) { - quality_value_buf.value = static_cast(thisDeserializer.readCustomObject("Any")); + quality_value_buf.value = thisDeserializer.readFloat32(); } - Opt_CustomObject quality_value = quality_value_buf;; - GetAccessors()->getOffscreenCanvasRenderingContext2DAccessor()->toDataURL(self, (const Opt_String*)&type_value, (const Opt_CustomObject*)&quality_value); + Opt_Float32 quality_value = quality_value_buf;; + GetAccessors()->getOffscreenCanvasRenderingContext2DAccessor()->toDataURL(self, (const Opt_String*)&type_value, (const Opt_Float32*)&quality_value); } KOALA_INTEROP_V3(OffscreenCanvasRenderingContext2D_toDataURL, Ark_NativePointer, uint8_t*, int32_t) Ark_NativePointer impl_OffscreenCanvasRenderingContext2D_transferToImageBitmap(Ark_NativePointer thisPtr) { @@ -20067,87 +20067,6 @@ void impl_GestureModifier_applyGesture(Ark_NativePointer thisPtr, uint8_t* thisA GetAccessors()->getGestureModifierAccessor()->applyGesture(self, (const Ark_UIGestureEvent*)&event_value); } KOALA_INTEROP_V3(GestureModifier_applyGesture, Ark_NativePointer, uint8_t*, int32_t) -KInteropReturnBuffer impl_GlobalScope_common_getContext(uint8_t* thisArray, int32_t thisLength) { - Deserializer thisDeserializer(thisArray, thisLength); - const auto component_value_buf_runtimeType = static_cast(thisDeserializer.readInt8()); - Opt_CustomObject component_value_buf = {}; - component_value_buf.tag = component_value_buf_runtimeType == INTEROP_RUNTIME_UNDEFINED ? INTEROP_TAG_UNDEFINED : INTEROP_TAG_OBJECT; - if ((INTEROP_RUNTIME_UNDEFINED) != (component_value_buf_runtimeType)) - { - component_value_buf.value = static_cast(thisDeserializer.readCustomObject("Object")); - } - Opt_CustomObject component_value = component_value_buf;; - Serializer _retSerializer {}; - _retSerializer.writeContext(GetAccessors()->getGlobalScope_commonAccessor()->getContext((const Opt_CustomObject*)&component_value)); - return _retSerializer.toReturnBuffer(); -} -KOALA_INTEROP_2(GlobalScope_common_getContext, KInteropReturnBuffer, uint8_t*, int32_t) -void impl_GlobalScope_common_postCardAction(uint8_t* thisArray, int32_t thisLength) { - Deserializer thisDeserializer(thisArray, thisLength); - Ark_CustomObject component_value = static_cast(thisDeserializer.readCustomObject("Object"));; - Ark_CustomObject action_value = static_cast(thisDeserializer.readCustomObject("Object"));; - GetAccessors()->getGlobalScope_commonAccessor()->postCardAction((const Ark_CustomObject*)&component_value, (const Ark_CustomObject*)&action_value); -} -KOALA_INTEROP_V2(GlobalScope_common_postCardAction, uint8_t*, int32_t) -KInteropReturnBuffer impl_GlobalScope_common_dollar_r(const KStringPtr& value, uint8_t* thisArray, int32_t thisLength) { - Deserializer thisDeserializer(thisArray, thisLength); - const Ark_Int32 params_value_buf_length = thisDeserializer.readInt32(); - Array_CustomObject params_value_buf = {}; - thisDeserializer.resizeArray::type, - std::decay::type>(¶ms_value_buf, params_value_buf_length); - for (int params_value_buf_i = 0; params_value_buf_i < params_value_buf_length; params_value_buf_i++) { - params_value_buf.array[params_value_buf_i] = static_cast(thisDeserializer.readCustomObject("Any")); - } - Array_CustomObject params_value = params_value_buf;; - Serializer _retSerializer {}; - _retSerializer.writeResource(GetAccessors()->getGlobalScope_commonAccessor()->dollar_r((const Ark_String*) (&value), (const Array_CustomObject*)¶ms_value)); - return _retSerializer.toReturnBuffer(); -} -KOALA_INTEROP_3(GlobalScope_common_dollar_r, KInteropReturnBuffer, KStringPtr, uint8_t*, int32_t) -KInteropReturnBuffer impl_GlobalScope_common_dollar_rawfile(const KStringPtr& value) { - Serializer _retSerializer {}; - _retSerializer.writeResource(GetAccessors()->getGlobalScope_commonAccessor()->dollar_rawfile((const Ark_String*) (&value))); - return _retSerializer.toReturnBuffer(); -} -KOALA_INTEROP_1(GlobalScope_common_dollar_rawfile, KInteropReturnBuffer, KStringPtr) -void impl_GlobalScope_common_animateTo(uint8_t* thisArray, int32_t thisLength) { - Deserializer thisDeserializer(thisArray, thisLength); - Ark_AnimateParam value_value = thisDeserializer.readAnimateParam();; - Callback_Void event_value = {thisDeserializer.readCallbackResource(), reinterpret_cast(thisDeserializer.readPointerOrDefault(reinterpret_cast(getManagedCallbackCaller(Kind_Callback_Void)))), reinterpret_cast(thisDeserializer.readPointerOrDefault(reinterpret_cast(getManagedCallbackCallerSync(Kind_Callback_Void))))};; - GetAccessors()->getGlobalScope_commonAccessor()->animateTo((const Ark_AnimateParam*)&value_value, (const Callback_Void*)&event_value); -} -KOALA_INTEROP_V2(GlobalScope_common_animateTo, uint8_t*, int32_t) -void impl_GlobalScope_common_animateToImmediately(uint8_t* thisArray, int32_t thisLength) { - Deserializer thisDeserializer(thisArray, thisLength); - Ark_AnimateParam value_value = thisDeserializer.readAnimateParam();; - Callback_Void event_value = {thisDeserializer.readCallbackResource(), reinterpret_cast(thisDeserializer.readPointerOrDefault(reinterpret_cast(getManagedCallbackCaller(Kind_Callback_Void)))), reinterpret_cast(thisDeserializer.readPointerOrDefault(reinterpret_cast(getManagedCallbackCallerSync(Kind_Callback_Void))))};; - GetAccessors()->getGlobalScope_commonAccessor()->animateToImmediately((const Ark_AnimateParam*)&value_value, (const Callback_Void*)&event_value); -} -KOALA_INTEROP_V2(GlobalScope_common_animateToImmediately, uint8_t*, int32_t) -Ark_Int32 impl_GlobalScope_common_vp2px(KInteropNumber value) { - return GetAccessors()->getGlobalScope_commonAccessor()->vp2px((const Ark_Number*) (&value)); -} -KOALA_INTEROP_1(GlobalScope_common_vp2px, Ark_Int32, KInteropNumber) -Ark_Int32 impl_GlobalScope_common_px2vp(KInteropNumber value) { - return GetAccessors()->getGlobalScope_commonAccessor()->px2vp((const Ark_Number*) (&value)); -} -KOALA_INTEROP_1(GlobalScope_common_px2vp, Ark_Int32, KInteropNumber) -Ark_Int32 impl_GlobalScope_common_fp2px(KInteropNumber value) { - return GetAccessors()->getGlobalScope_commonAccessor()->fp2px((const Ark_Number*) (&value)); -} -KOALA_INTEROP_1(GlobalScope_common_fp2px, Ark_Int32, KInteropNumber) -Ark_Int32 impl_GlobalScope_common_px2fp(KInteropNumber value) { - return GetAccessors()->getGlobalScope_commonAccessor()->px2fp((const Ark_Number*) (&value)); -} -KOALA_INTEROP_1(GlobalScope_common_px2fp, Ark_Int32, KInteropNumber) -Ark_Int32 impl_GlobalScope_common_lpx2px(KInteropNumber value) { - return GetAccessors()->getGlobalScope_commonAccessor()->lpx2px((const Ark_Number*) (&value)); -} -KOALA_INTEROP_1(GlobalScope_common_lpx2px, Ark_Int32, KInteropNumber) -Ark_Int32 impl_GlobalScope_common_px2lpx(KInteropNumber value) { - return GetAccessors()->getGlobalScope_commonAccessor()->px2lpx((const Ark_Number*) (&value)); -} -KOALA_INTEROP_1(GlobalScope_common_px2lpx, Ark_Int32, KInteropNumber) Ark_NativePointer impl_ContextMenu_ctor() { return GetAccessors()->getContextMenuAccessor()->ctor(); } @@ -24408,16 +24327,4 @@ KOALA_INTEROP_V2(GlobalScope_Profiler_inspector_registerVsyncCallback, uint8_t*, void impl_GlobalScope_Profiler_inspector_unregisterVsyncCallback() { GetAccessors()->getGlobalScope_Profiler_inspectorAccessor()->unregisterVsyncCallback(); } -KOALA_INTEROP_V0(GlobalScope_Profiler_inspector_unregisterVsyncCallback) -void impl_GlobalScope_inspector_getInspectorNodes() { - GetAccessors()->getGlobalScope_inspectorAccessor()->getInspectorNodes(); -} -KOALA_INTEROP_V0(GlobalScope_inspector_getInspectorNodes) -void impl_GlobalScope_inspector_getInspectorNodeById(KInteropNumber id) { - GetAccessors()->getGlobalScope_inspectorAccessor()->getInspectorNodeById((const Ark_Number*) (&id)); -} -KOALA_INTEROP_V1(GlobalScope_inspector_getInspectorNodeById, KInteropNumber) -void impl_GlobalScope_inspector_setAppBgColor(const KStringPtr& value) { - GetAccessors()->getGlobalScope_inspectorAccessor()->setAppBgColor((const Ark_String*) (&value)); -} -KOALA_INTEROP_V1(GlobalScope_inspector_setAppBgColor, KStringPtr) \ No newline at end of file +KOALA_INTEROP_V0(GlobalScope_Profiler_inspector_unregisterVsyncCallback) \ No newline at end of file diff --git a/arkoala/framework/native/src/generated/dummy_impl.cc b/arkoala/framework/native/src/generated/dummy_impl.cc index cea2e2e67b298a91190853d6f9fff30772a229d5..0991ff11e4f7807c108459fd2b3bfdf52acebf0c 100644 --- a/arkoala/framework/native/src/generated/dummy_impl.cc +++ b/arkoala/framework/native/src/generated/dummy_impl.cc @@ -22484,13 +22484,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { out.append(") \n"); appendGroupedLog(1, out); } - void GetGlobalCompositeOperationImpl(Ark_CanvasRenderer peer) + Ark_String GetGlobalCompositeOperationImpl(Ark_CanvasRenderer peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getGlobalCompositeOperation("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } void SetGlobalCompositeOperationImpl(Ark_CanvasRenderer peer, const Ark_String* globalCompositeOperation) @@ -22522,13 +22524,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { out.append(") \n"); appendGroupedLog(1, out); } - void GetFilterImpl(Ark_CanvasRenderer peer) + Ark_String GetFilterImpl(Ark_CanvasRenderer peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getFilter("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } void SetFilterImpl(Ark_CanvasRenderer peer, const Ark_String* filter) @@ -22700,13 +22704,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { out.append(") \n"); appendGroupedLog(1, out); } - void GetShadowColorImpl(Ark_CanvasRenderer peer) + Ark_String GetShadowColorImpl(Ark_CanvasRenderer peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getShadowColor("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } void SetShadowColorImpl(Ark_CanvasRenderer peer, const Ark_String* shadowColor) @@ -22778,13 +22784,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { out.append(") \n"); appendGroupedLog(1, out); } - void GetFontImpl(Ark_CanvasRenderer peer) + Ark_String GetFontImpl(Ark_CanvasRenderer peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getFont("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } void SetFontImpl(Ark_CanvasRenderer peer, const Ark_String* font) @@ -22867,18 +22875,20 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return fnPtr(dummyClassFinalizer); } - void ToDataURLImpl(Ark_CanvasRenderingContext2D peer, - const Opt_String* type, - const Opt_Number* quality) + Ark_String ToDataURLImpl(Ark_CanvasRenderingContext2D peer, + const Opt_String* type, + const Opt_Float32* quality) { if (!needGroupedLog(1)) - return; + return {}; string out("toDataURL("); WriteToString(&out, type); out.append(", "); WriteToString(&out, quality); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } void StartImageAnalyzerImpl(Ark_CanvasRenderingContext2D peer, const Ark_ImageAnalyzerConfig* config, @@ -22998,18 +23008,20 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return fnPtr(dummyClassFinalizer); } - void ToDataURLImpl(Ark_OffscreenCanvasRenderingContext2D peer, - const Opt_String* type, - const Opt_CustomObject* quality) + Ark_String ToDataURLImpl(Ark_OffscreenCanvasRenderingContext2D peer, + const Opt_String* type, + const Opt_Float32* quality) { if (!needGroupedLog(1)) - return; + return {}; string out("toDataURL("); WriteToString(&out, type); out.append(", "); WriteToString(&out, quality); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } Ark_ImageBitmap TransferToImageBitmapImpl(Ark_OffscreenCanvasRenderingContext2D peer) { @@ -24845,13 +24857,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { out.append(") \n"); appendGroupedLog(1, out); } - void GetKeyTextImpl(Ark_KeyEvent peer) + Ark_String GetKeyTextImpl(Ark_KeyEvent peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getKeyText("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } void SetKeyTextImpl(Ark_KeyEvent peer, const Ark_String* keyText) @@ -25540,154 +25554,6 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); } } // GestureModifierAccessor - namespace GlobalScope_commonAccessor { - void DestroyPeerImpl(Ark_GlobalScope_common peer) - { - if (!needGroupedLog(1)) - return; - string out("destroyPeer("); - out.append(") \n"); - appendGroupedLog(1, out); - } - Ark_Context GetContextImpl(const Opt_CustomObject* component) - { - if (!needGroupedLog(1)) - return {}; - string out("getContext("); - WriteToString(&out, component); - out.append(") \n"); - out.append("[return {}] \n"); - appendGroupedLog(1, out); - return {}; - } - void PostCardActionImpl(const Ark_CustomObject* component, - const Ark_CustomObject* action) - { - if (!needGroupedLog(1)) - return; - string out("postCardAction("); - WriteToString(&out, component); - out.append(", "); - WriteToString(&out, action); - out.append(") \n"); - appendGroupedLog(1, out); - } - Ark_Resource Dollar_rImpl(const Ark_String* value, - const Array_CustomObject* params) - { - if (!needGroupedLog(1)) - return {}; - string out("dollar_r("); - WriteToString(&out, value); - out.append(", "); - WriteToString(&out, params); - out.append(") \n"); - out.append("[return {}] \n"); - appendGroupedLog(1, out); - return {}; - } - Ark_Resource Dollar_rawfileImpl(const Ark_String* value) - { - if (!needGroupedLog(1)) - return {}; - string out("dollar_rawfile("); - WriteToString(&out, value); - out.append(") \n"); - out.append("[return {}] \n"); - appendGroupedLog(1, out); - return {}; - } - void AnimateToImpl(const Ark_AnimateParam* value, - const Callback_Void* event) - { - if (!needGroupedLog(1)) - return; - string out("animateTo("); - WriteToString(&out, value); - out.append(", "); - WriteToString(&out, event); - out.append(") \n"); - appendGroupedLog(1, out); - } - void AnimateToImmediatelyImpl(const Ark_AnimateParam* value, - const Callback_Void* event) - { - if (!needGroupedLog(1)) - return; - string out("animateToImmediately("); - WriteToString(&out, value); - out.append(", "); - WriteToString(&out, event); - out.append(") \n"); - appendGroupedLog(1, out); - } - Ark_Int32 Vp2pxImpl(const Ark_Number* value) - { - if (!needGroupedLog(1)) - return 0; - string out("vp2px("); - WriteToString(&out, value); - out.append(") \n"); - out.append("[return 0] \n"); - appendGroupedLog(1, out); - return 0; - } - Ark_Int32 Px2vpImpl(const Ark_Number* value) - { - if (!needGroupedLog(1)) - return 0; - string out("px2vp("); - WriteToString(&out, value); - out.append(") \n"); - out.append("[return 0] \n"); - appendGroupedLog(1, out); - return 0; - } - Ark_Int32 Fp2pxImpl(const Ark_Number* value) - { - if (!needGroupedLog(1)) - return 0; - string out("fp2px("); - WriteToString(&out, value); - out.append(") \n"); - out.append("[return 0] \n"); - appendGroupedLog(1, out); - return 0; - } - Ark_Int32 Px2fpImpl(const Ark_Number* value) - { - if (!needGroupedLog(1)) - return 0; - string out("px2fp("); - WriteToString(&out, value); - out.append(") \n"); - out.append("[return 0] \n"); - appendGroupedLog(1, out); - return 0; - } - Ark_Int32 Lpx2pxImpl(const Ark_Number* value) - { - if (!needGroupedLog(1)) - return 0; - string out("lpx2px("); - WriteToString(&out, value); - out.append(") \n"); - out.append("[return 0] \n"); - appendGroupedLog(1, out); - return 0; - } - Ark_Int32 Px2lpxImpl(const Ark_Number* value) - { - if (!needGroupedLog(1)) - return 0; - string out("px2lpx("); - WriteToString(&out, value); - out.append(") \n"); - out.append("[return 0] \n"); - appendGroupedLog(1, out); - return 0; - } - } // GlobalScope_commonAccessor namespace ContextMenuAccessor { void DestroyPeerImpl(Ark_ContextMenu peer) { @@ -26733,13 +26599,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return fnPtr(dummyClassFinalizer); } - void GetIdImpl(Ark_EventTargetInfo peer) + Ark_String GetIdImpl(Ark_EventTargetInfo peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getId("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } } // EventTargetInfoAccessor namespace GestureRecognizerAccessor { @@ -26771,13 +26639,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return fnPtr(dummyClassFinalizer); } - void GetTagImpl(Ark_GestureRecognizer peer) + Ark_String GetTagImpl(Ark_GestureRecognizer peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getTag("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } Ark_GestureControl_GestureType GetTypeImpl(Ark_GestureRecognizer peer) { @@ -27323,13 +27193,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { out.append(") \n"); appendGroupedLog(1, out); } - void GetNavDestinationIdImpl(Ark_NavDestinationContext peer) + Ark_String GetNavDestinationIdImpl(Ark_NavDestinationContext peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getNavDestinationId("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } void SetNavDestinationIdImpl(Ark_NavDestinationContext peer, const Ark_String* navDestinationId) @@ -27381,13 +27253,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return fnPtr(dummyClassFinalizer); } - void GetNameImpl(Ark_NavPathInfo peer) + Ark_String GetNameImpl(Ark_NavPathInfo peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getName("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } void SetNameImpl(Ark_NavPathInfo peer, const Ark_String* name) @@ -30016,13 +29890,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { out.append(") \n"); appendGroupedLog(1, out); } - void GetTextImpl(Ark_SubmitEvent peer) + Ark_String GetTextImpl(Ark_SubmitEvent peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getText("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } void SetTextImpl(Ark_SubmitEvent peer, const Ark_String* text) @@ -30510,13 +30386,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return fnPtr(dummyClassFinalizer); } - void GetTitleImpl(Ark_FileSelectorParam peer) + Ark_String GetTitleImpl(Ark_FileSelectorParam peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getTitle("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } Ark_FileSelectorMode GetModeImpl(Ark_FileSelectorParam peer) { @@ -30860,13 +30738,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { out.append(") \n"); appendGroupedLog(1, out); } - void GetOriginImpl(Ark_PermissionRequest peer) + Ark_String GetOriginImpl(Ark_PermissionRequest peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getOrigin("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } Array_String GetAccessibleResourceImpl(Ark_PermissionRequest peer) { @@ -30918,13 +30798,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return fnPtr(dummyClassFinalizer); } - void GetOriginImpl(Ark_ScreenCaptureHandler peer) + Ark_String GetOriginImpl(Ark_ScreenCaptureHandler peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getOrigin("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } void GrantImpl(Ark_ScreenCaptureHandler peer, const Ark_ScreenCaptureConfig* config) @@ -31080,29 +30962,35 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return 0; } - void GetLinkUrlImpl(Ark_WebContextMenuParam peer) + Ark_String GetLinkUrlImpl(Ark_WebContextMenuParam peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getLinkUrl("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } - void GetUnfilteredLinkUrlImpl(Ark_WebContextMenuParam peer) + Ark_String GetUnfilteredLinkUrlImpl(Ark_WebContextMenuParam peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getUnfilteredLinkUrl("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } - void GetSourceUrlImpl(Ark_WebContextMenuParam peer) + Ark_String GetSourceUrlImpl(Ark_WebContextMenuParam peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getSourceUrl("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } Ark_Boolean ExistsImageContentsImpl(Ark_WebContextMenuParam peer) { @@ -31124,13 +31012,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return {}; } - void GetSelectionTextImpl(Ark_WebContextMenuParam peer) + Ark_String GetSelectionTextImpl(Ark_WebContextMenuParam peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getSelectionText("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } Ark_ContextMenuSourceType GetSourceTypeImpl(Ark_WebContextMenuParam peer) { @@ -31310,21 +31200,25 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return fnPtr(dummyClassFinalizer); } - void GetMessageImpl(Ark_ConsoleMessage peer) + Ark_String GetMessageImpl(Ark_ConsoleMessage peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getMessage("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } - void GetSourceIdImpl(Ark_ConsoleMessage peer) + Ark_String GetSourceIdImpl(Ark_ConsoleMessage peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getSourceId("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } Ark_Int32 GetLineNumberImpl(Ark_ConsoleMessage peer) { @@ -31386,13 +31280,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return {}; } - void GetRequestUrlImpl(Ark_WebResourceRequest peer) + Ark_String GetRequestUrlImpl(Ark_WebResourceRequest peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getRequestUrl("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } Ark_Boolean IsRequestGestureImpl(Ark_WebResourceRequest peer) { @@ -31424,13 +31320,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return 0; } - void GetRequestMethodImpl(Ark_WebResourceRequest peer) + Ark_String GetRequestMethodImpl(Ark_WebResourceRequest peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getRequestMethod("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } } // WebResourceRequestAccessor namespace WebResourceResponseAccessor { @@ -31462,13 +31360,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return fnPtr(dummyClassFinalizer); } - void GetResponseDataImpl(Ark_WebResourceResponse peer) + Ark_String GetResponseDataImpl(Ark_WebResourceResponse peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getResponseData("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } Opt_Union_String_Number_Buffer_Resource GetResponseDataExImpl(Ark_WebResourceResponse peer) { @@ -31480,29 +31380,35 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return {}; } - void GetResponseEncodingImpl(Ark_WebResourceResponse peer) + Ark_String GetResponseEncodingImpl(Ark_WebResourceResponse peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getResponseEncoding("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } - void GetResponseMimeTypeImpl(Ark_WebResourceResponse peer) + Ark_String GetResponseMimeTypeImpl(Ark_WebResourceResponse peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getResponseMimeType("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } - void GetReasonMessageImpl(Ark_WebResourceResponse peer) + Ark_String GetReasonMessageImpl(Ark_WebResourceResponse peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getReasonMessage("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } Array_Header GetResponseHeaderImpl(Ark_WebResourceResponse peer) { @@ -31634,13 +31540,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return fnPtr(dummyClassFinalizer); } - void GetErrorInfoImpl(Ark_WebResourceError peer) + Ark_String GetErrorInfoImpl(Ark_WebResourceError peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getErrorInfo("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } Ark_Int32 GetErrorCodeImpl(Ark_WebResourceError peer) { @@ -32020,13 +31928,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return fnPtr(dummyClassFinalizer); } - void GetXComponentSurfaceIdImpl(Ark_XComponentController peer) + Ark_String GetXComponentSurfaceIdImpl(Ark_XComponentController peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getXComponentSurfaceId("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } Ark_CustomObject GetXComponentContextImpl(Ark_XComponentController peer) { @@ -32363,13 +32273,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return fnPtr(dummyClassFinalizer); } - void GetStringImpl(Ark_StyledString peer) + Ark_String GetStringImpl(Ark_StyledString peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getString("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } Array_SpanStyle GetStylesImpl(Ark_StyledString peer, const Ark_Number* start, @@ -32428,14 +32340,16 @@ namespace OHOS::Ace::NG::GeneratedModifier { out.append(") \n"); appendGroupedLog(1, out); } - void ToHtmlImpl(Ark_StyledString styledString) + Ark_String ToHtmlImpl(Ark_StyledString styledString) { if (!needGroupedLog(1)) - return; + return {}; string out("toHtml("); WriteToString(&out, styledString); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } Ark_Buffer MarshallingImpl(Ark_StyledString styledString) { @@ -32501,13 +32415,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return fnPtr(dummyClassFinalizer); } - void GetFontFamilyImpl(Ark_TextStyle_styled_string peer) + Ark_String GetFontFamilyImpl(Ark_TextStyle_styled_string peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getFontFamily("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } Ark_Int32 GetFontSizeImpl(Ark_TextStyle_styled_string peer) { @@ -32928,13 +32844,15 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); return fnPtr(dummyClassFinalizer); } - void GetUrlImpl(Ark_UrlStyle peer) + Ark_String GetUrlImpl(Ark_UrlStyle peer) { if (!needGroupedLog(1)) - return; + return {}; string out("getUrl("); out.append(") \n"); + out.append("[return {}] \n"); appendGroupedLog(1, out); + return {}; } } // UrlStyleAccessor namespace MutableStyledStringAccessor { @@ -33315,46 +33233,6 @@ namespace OHOS::Ace::NG::GeneratedModifier { appendGroupedLog(1, out); } } // GlobalScope_Profiler_inspectorAccessor - namespace GlobalScope_inspectorAccessor { - void DestroyPeerImpl(Ark_GlobalScope_inspector peer) - { - if (!needGroupedLog(1)) - return; - string out("destroyPeer("); - out.append(") \n"); - appendGroupedLog(1, out); - } - Ark_CustomObject GetInspectorNodesImpl() - { - if (!needGroupedLog(1)) - return {}; - string out("getInspectorNodes("); - out.append(") \n"); - out.append("[return {}] \n"); - appendGroupedLog(1, out); - return {}; - } - Ark_CustomObject GetInspectorNodeByIdImpl(const Ark_Number* id) - { - if (!needGroupedLog(1)) - return {}; - string out("getInspectorNodeById("); - WriteToString(&out, id); - out.append(") \n"); - out.append("[return {}] \n"); - appendGroupedLog(1, out); - return {}; - } - void SetAppBgColorImpl(const Ark_String* value) - { - if (!needGroupedLog(1)) - return; - string out("setAppBgColor("); - WriteToString(&out, value); - out.append(") \n"); - appendGroupedLog(1, out); - } - } // GlobalScope_inspectorAccessor const GENERATED_ArkUIAnimationExtenderAccessor* GetAnimationExtenderAccessor() { static const GENERATED_ArkUIAnimationExtenderAccessor AnimationExtenderAccessorImpl { @@ -34408,29 +34286,6 @@ namespace OHOS::Ace::NG::GeneratedModifier { struct GestureModifierPeer { virtual ~GestureModifierPeer() = default; }; - const GENERATED_ArkUIGlobalScope_commonAccessor* GetGlobalScope_commonAccessor() - { - static const GENERATED_ArkUIGlobalScope_commonAccessor GlobalScope_commonAccessorImpl { - GlobalScope_commonAccessor::DestroyPeerImpl, - GlobalScope_commonAccessor::GetContextImpl, - GlobalScope_commonAccessor::PostCardActionImpl, - GlobalScope_commonAccessor::Dollar_rImpl, - GlobalScope_commonAccessor::Dollar_rawfileImpl, - GlobalScope_commonAccessor::AnimateToImpl, - GlobalScope_commonAccessor::AnimateToImmediatelyImpl, - GlobalScope_commonAccessor::Vp2pxImpl, - GlobalScope_commonAccessor::Px2vpImpl, - GlobalScope_commonAccessor::Fp2pxImpl, - GlobalScope_commonAccessor::Px2fpImpl, - GlobalScope_commonAccessor::Lpx2pxImpl, - GlobalScope_commonAccessor::Px2lpxImpl, - }; - return &GlobalScope_commonAccessorImpl; - } - - struct GlobalScope_commonPeer { - virtual ~GlobalScope_commonPeer() = default; - }; const GENERATED_ArkUIContextMenuAccessor* GetContextMenuAccessor() { static const GENERATED_ArkUIContextMenuAccessor ContextMenuAccessorImpl { @@ -36149,20 +36004,6 @@ namespace OHOS::Ace::NG::GeneratedModifier { struct GlobalScope_Profiler_inspectorPeer { virtual ~GlobalScope_Profiler_inspectorPeer() = default; }; - const GENERATED_ArkUIGlobalScope_inspectorAccessor* GetGlobalScope_inspectorAccessor() - { - static const GENERATED_ArkUIGlobalScope_inspectorAccessor GlobalScope_inspectorAccessorImpl { - GlobalScope_inspectorAccessor::DestroyPeerImpl, - GlobalScope_inspectorAccessor::GetInspectorNodesImpl, - GlobalScope_inspectorAccessor::GetInspectorNodeByIdImpl, - GlobalScope_inspectorAccessor::SetAppBgColorImpl, - }; - return &GlobalScope_inspectorAccessorImpl; - } - - struct GlobalScope_inspectorPeer { - virtual ~GlobalScope_inspectorPeer() = default; - }; const GENERATED_ArkUIAccessors* GENERATED_GetArkUIAccessors() { static const GENERATED_ArkUIAccessors accessorsImpl = { @@ -36221,7 +36062,6 @@ namespace OHOS::Ace::NG::GeneratedModifier { GetChildrenMainSizeAccessor, GetUICommonEventAccessor, GetGestureModifierAccessor, - GetGlobalScope_commonAccessor, GetContextMenuAccessor, GetCustomDialogControllerAccessor, GetLinearGradientAccessor, @@ -36320,7 +36160,6 @@ namespace OHOS::Ace::NG::GeneratedModifier { GetCustomSpanAccessor, GetLinearIndicatorControllerAccessor, GetGlobalScope_Profiler_inspectorAccessor, - GetGlobalScope_inspectorAccessor, }; return &accessorsImpl; } diff --git a/arkoala/framework/native/src/generated/real_impl.cc b/arkoala/framework/native/src/generated/real_impl.cc index 44b4b07dcc3c6b81c5ba9ccee19dae91be1c7b7c..9f222596045a1fa48733d23e1b98929479590c2a 100644 --- a/arkoala/framework/native/src/generated/real_impl.cc +++ b/arkoala/framework/native/src/generated/real_impl.cc @@ -11453,8 +11453,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { const Ark_Number* globalAlpha) { } - void GetGlobalCompositeOperationImpl(Ark_CanvasRenderer peer) + Ark_String GetGlobalCompositeOperationImpl(Ark_CanvasRenderer peer) { + return {}; } void SetGlobalCompositeOperationImpl(Ark_CanvasRenderer peer, const Ark_String* globalCompositeOperation) @@ -11468,8 +11469,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { const Ark_Union_String_Number_CanvasGradient_CanvasPattern* strokeStyle) { } - void GetFilterImpl(Ark_CanvasRenderer peer) + Ark_String GetFilterImpl(Ark_CanvasRenderer peer) { + return {}; } void SetFilterImpl(Ark_CanvasRenderer peer, const Ark_String* filter) @@ -11539,8 +11541,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { const Ark_Number* shadowBlur) { } - void GetShadowColorImpl(Ark_CanvasRenderer peer) + Ark_String GetShadowColorImpl(Ark_CanvasRenderer peer) { + return {}; } void SetShadowColorImpl(Ark_CanvasRenderer peer, const Ark_String* shadowColor) @@ -11570,8 +11573,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { const Ark_String* direction) { } - void GetFontImpl(Ark_CanvasRenderer peer) + Ark_String GetFontImpl(Ark_CanvasRenderer peer) { + return {}; } void SetFontImpl(Ark_CanvasRenderer peer, const Ark_String* font) @@ -11610,10 +11614,11 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return reinterpret_cast(&DestroyPeerImpl); } - void ToDataURLImpl(Ark_CanvasRenderingContext2D peer, - const Opt_String* type, - const Opt_Number* quality) + Ark_String ToDataURLImpl(Ark_CanvasRenderingContext2D peer, + const Opt_String* type, + const Opt_Float32* quality) { + return {}; } void StartImageAnalyzerImpl(Ark_CanvasRenderingContext2D peer, const Ark_ImageAnalyzerConfig* config, @@ -11666,10 +11671,11 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return reinterpret_cast(&DestroyPeerImpl); } - void ToDataURLImpl(Ark_OffscreenCanvasRenderingContext2D peer, - const Opt_String* type, - const Opt_CustomObject* quality) + Ark_String ToDataURLImpl(Ark_OffscreenCanvasRenderingContext2D peer, + const Opt_String* type, + const Opt_Float32* quality) { + return {}; } Ark_ImageBitmap TransferToImageBitmapImpl(Ark_OffscreenCanvasRenderingContext2D peer) { @@ -12480,8 +12486,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { const Ark_Number* keyCode) { } - void GetKeyTextImpl(Ark_KeyEvent peer) + Ark_String GetKeyTextImpl(Ark_KeyEvent peer) { + return {}; } void SetKeyTextImpl(Ark_KeyEvent peer, const Ark_String* keyText) @@ -12797,64 +12804,6 @@ namespace OHOS::Ace::NG::GeneratedModifier { { } } // GestureModifierAccessor - namespace GlobalScope_commonAccessor { - void DestroyPeerImpl(Ark_GlobalScope_common peer) - { - auto peerImpl = reinterpret_cast(peer); - if (peerImpl) { - delete peerImpl; - } - } - Ark_Context GetContextImpl(const Opt_CustomObject* component) - { - return {}; - } - void PostCardActionImpl(const Ark_CustomObject* component, - const Ark_CustomObject* action) - { - } - Ark_Resource Dollar_rImpl(const Ark_String* value, - const Array_CustomObject* params) - { - return {}; - } - Ark_Resource Dollar_rawfileImpl(const Ark_String* value) - { - return {}; - } - void AnimateToImpl(const Ark_AnimateParam* value, - const Callback_Void* event) - { - } - void AnimateToImmediatelyImpl(const Ark_AnimateParam* value, - const Callback_Void* event) - { - } - Ark_Int32 Vp2pxImpl(const Ark_Number* value) - { - return {}; - } - Ark_Int32 Px2vpImpl(const Ark_Number* value) - { - return {}; - } - Ark_Int32 Fp2pxImpl(const Ark_Number* value) - { - return {}; - } - Ark_Int32 Px2fpImpl(const Ark_Number* value) - { - return {}; - } - Ark_Int32 Lpx2pxImpl(const Ark_Number* value) - { - return {}; - } - Ark_Int32 Px2lpxImpl(const Ark_Number* value) - { - return {}; - } - } // GlobalScope_commonAccessor namespace ContextMenuAccessor { void DestroyPeerImpl(Ark_ContextMenu peer) { @@ -13345,8 +13294,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return reinterpret_cast(&DestroyPeerImpl); } - void GetIdImpl(Ark_EventTargetInfo peer) + Ark_String GetIdImpl(Ark_EventTargetInfo peer) { + return {}; } } // EventTargetInfoAccessor namespace GestureRecognizerAccessor { @@ -13365,8 +13315,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return reinterpret_cast(&DestroyPeerImpl); } - void GetTagImpl(Ark_GestureRecognizer peer) + Ark_String GetTagImpl(Ark_GestureRecognizer peer) { + return {}; } Ark_GestureControl_GestureType GetTypeImpl(Ark_GestureRecognizer peer) { @@ -13610,8 +13561,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { Ark_NavPathStack pathStack) { } - void GetNavDestinationIdImpl(Ark_NavDestinationContext peer) + Ark_String GetNavDestinationIdImpl(Ark_NavDestinationContext peer) { + return {}; } void SetNavDestinationIdImpl(Ark_NavDestinationContext peer, const Ark_String* navDestinationId) @@ -13637,8 +13589,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return reinterpret_cast(&DestroyPeerImpl); } - void GetNameImpl(Ark_NavPathInfo peer) + Ark_String GetNameImpl(Ark_NavPathInfo peer) { + return {}; } void SetNameImpl(Ark_NavPathInfo peer, const Ark_String* name) @@ -14823,8 +14776,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { void KeepEditableStateImpl(Ark_SubmitEvent peer) { } - void GetTextImpl(Ark_SubmitEvent peer) + Ark_String GetTextImpl(Ark_SubmitEvent peer) { + return {}; } void SetTextImpl(Ark_SubmitEvent peer, const Ark_String* text) @@ -15061,8 +15015,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return reinterpret_cast(&DestroyPeerImpl); } - void GetTitleImpl(Ark_FileSelectorParam peer) + Ark_String GetTitleImpl(Ark_FileSelectorParam peer) { + return {}; } Ark_FileSelectorMode GetModeImpl(Ark_FileSelectorParam peer) { @@ -15229,8 +15184,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { void DenyImpl(Ark_PermissionRequest peer) { } - void GetOriginImpl(Ark_PermissionRequest peer) + Ark_String GetOriginImpl(Ark_PermissionRequest peer) { + return {}; } Array_String GetAccessibleResourceImpl(Ark_PermissionRequest peer) { @@ -15257,8 +15213,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return reinterpret_cast(&DestroyPeerImpl); } - void GetOriginImpl(Ark_ScreenCaptureHandler peer) + Ark_String GetOriginImpl(Ark_ScreenCaptureHandler peer) { + return {}; } void GrantImpl(Ark_ScreenCaptureHandler peer, const Ark_ScreenCaptureConfig* config) @@ -15336,14 +15293,17 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return {}; } - void GetLinkUrlImpl(Ark_WebContextMenuParam peer) + Ark_String GetLinkUrlImpl(Ark_WebContextMenuParam peer) { + return {}; } - void GetUnfilteredLinkUrlImpl(Ark_WebContextMenuParam peer) + Ark_String GetUnfilteredLinkUrlImpl(Ark_WebContextMenuParam peer) { + return {}; } - void GetSourceUrlImpl(Ark_WebContextMenuParam peer) + Ark_String GetSourceUrlImpl(Ark_WebContextMenuParam peer) { + return {}; } Ark_Boolean ExistsImageContentsImpl(Ark_WebContextMenuParam peer) { @@ -15353,8 +15313,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return {}; } - void GetSelectionTextImpl(Ark_WebContextMenuParam peer) + Ark_String GetSelectionTextImpl(Ark_WebContextMenuParam peer) { + return {}; } Ark_ContextMenuSourceType GetSourceTypeImpl(Ark_WebContextMenuParam peer) { @@ -15435,11 +15396,13 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return reinterpret_cast(&DestroyPeerImpl); } - void GetMessageImpl(Ark_ConsoleMessage peer) + Ark_String GetMessageImpl(Ark_ConsoleMessage peer) { + return {}; } - void GetSourceIdImpl(Ark_ConsoleMessage peer) + Ark_String GetSourceIdImpl(Ark_ConsoleMessage peer) { + return {}; } Ark_Int32 GetLineNumberImpl(Ark_ConsoleMessage peer) { @@ -15470,8 +15433,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return {}; } - void GetRequestUrlImpl(Ark_WebResourceRequest peer) + Ark_String GetRequestUrlImpl(Ark_WebResourceRequest peer) { + return {}; } Ark_Boolean IsRequestGestureImpl(Ark_WebResourceRequest peer) { @@ -15485,8 +15449,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return {}; } - void GetRequestMethodImpl(Ark_WebResourceRequest peer) + Ark_String GetRequestMethodImpl(Ark_WebResourceRequest peer) { + return {}; } } // WebResourceRequestAccessor namespace WebResourceResponseAccessor { @@ -15505,21 +15470,25 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return reinterpret_cast(&DestroyPeerImpl); } - void GetResponseDataImpl(Ark_WebResourceResponse peer) + Ark_String GetResponseDataImpl(Ark_WebResourceResponse peer) { + return {}; } Opt_Union_String_Number_Buffer_Resource GetResponseDataExImpl(Ark_WebResourceResponse peer) { return {}; } - void GetResponseEncodingImpl(Ark_WebResourceResponse peer) + Ark_String GetResponseEncodingImpl(Ark_WebResourceResponse peer) { + return {}; } - void GetResponseMimeTypeImpl(Ark_WebResourceResponse peer) + Ark_String GetResponseMimeTypeImpl(Ark_WebResourceResponse peer) { + return {}; } - void GetReasonMessageImpl(Ark_WebResourceResponse peer) + Ark_String GetReasonMessageImpl(Ark_WebResourceResponse peer) { + return {}; } Array_Header GetResponseHeaderImpl(Ark_WebResourceResponse peer) { @@ -15578,8 +15547,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return reinterpret_cast(&DestroyPeerImpl); } - void GetErrorInfoImpl(Ark_WebResourceError peer) + Ark_String GetErrorInfoImpl(Ark_WebResourceError peer) { + return {}; } Ark_Int32 GetErrorCodeImpl(Ark_WebResourceError peer) { @@ -15755,8 +15725,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return reinterpret_cast(&DestroyPeerImpl); } - void GetXComponentSurfaceIdImpl(Ark_XComponentController peer) + Ark_String GetXComponentSurfaceIdImpl(Ark_XComponentController peer) { + return {}; } Ark_CustomObject GetXComponentContextImpl(Ark_XComponentController peer) { @@ -15906,8 +15877,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return reinterpret_cast(&DestroyPeerImpl); } - void GetStringImpl(Ark_StyledString peer) + Ark_String GetStringImpl(Ark_StyledString peer) { + return {}; } Array_SpanStyle GetStylesImpl(Ark_StyledString peer, const Ark_Number* start, @@ -15931,8 +15903,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { const Callback_Opt_StyledString_Opt_Array_String_Void* outputArgumentForReturningPromise) { } - void ToHtmlImpl(Ark_StyledString styledString) + Ark_String ToHtmlImpl(Ark_StyledString styledString) { + return {}; } Ark_Buffer MarshallingImpl(Ark_StyledString styledString) { @@ -15963,8 +15936,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return reinterpret_cast(&DestroyPeerImpl); } - void GetFontFamilyImpl(Ark_TextStyle_styled_string peer) + Ark_String GetFontFamilyImpl(Ark_TextStyle_styled_string peer) { + return {}; } Ark_Int32 GetFontSizeImpl(Ark_TextStyle_styled_string peer) { @@ -16175,8 +16149,9 @@ namespace OHOS::Ace::NG::GeneratedModifier { { return reinterpret_cast(&DestroyPeerImpl); } - void GetUrlImpl(Ark_UrlStyle peer) + Ark_String GetUrlImpl(Ark_UrlStyle peer) { + return {}; } } // UrlStyleAccessor namespace MutableStyledStringAccessor { @@ -16351,26 +16326,6 @@ namespace OHOS::Ace::NG::GeneratedModifier { { } } // GlobalScope_Profiler_inspectorAccessor - namespace GlobalScope_inspectorAccessor { - void DestroyPeerImpl(Ark_GlobalScope_inspector peer) - { - auto peerImpl = reinterpret_cast(peer); - if (peerImpl) { - delete peerImpl; - } - } - Ark_CustomObject GetInspectorNodesImpl() - { - return {}; - } - Ark_CustomObject GetInspectorNodeByIdImpl(const Ark_Number* id) - { - return {}; - } - void SetAppBgColorImpl(const Ark_String* value) - { - } - } // GlobalScope_inspectorAccessor const GENERATED_ArkUIAnimationExtenderAccessor* GetAnimationExtenderAccessor() { static const GENERATED_ArkUIAnimationExtenderAccessor AnimationExtenderAccessorImpl { @@ -17424,29 +17379,6 @@ namespace OHOS::Ace::NG::GeneratedModifier { struct GestureModifierPeer { virtual ~GestureModifierPeer() = default; }; - const GENERATED_ArkUIGlobalScope_commonAccessor* GetGlobalScope_commonAccessor() - { - static const GENERATED_ArkUIGlobalScope_commonAccessor GlobalScope_commonAccessorImpl { - GlobalScope_commonAccessor::DestroyPeerImpl, - GlobalScope_commonAccessor::GetContextImpl, - GlobalScope_commonAccessor::PostCardActionImpl, - GlobalScope_commonAccessor::Dollar_rImpl, - GlobalScope_commonAccessor::Dollar_rawfileImpl, - GlobalScope_commonAccessor::AnimateToImpl, - GlobalScope_commonAccessor::AnimateToImmediatelyImpl, - GlobalScope_commonAccessor::Vp2pxImpl, - GlobalScope_commonAccessor::Px2vpImpl, - GlobalScope_commonAccessor::Fp2pxImpl, - GlobalScope_commonAccessor::Px2fpImpl, - GlobalScope_commonAccessor::Lpx2pxImpl, - GlobalScope_commonAccessor::Px2lpxImpl, - }; - return &GlobalScope_commonAccessorImpl; - } - - struct GlobalScope_commonPeer { - virtual ~GlobalScope_commonPeer() = default; - }; const GENERATED_ArkUIContextMenuAccessor* GetContextMenuAccessor() { static const GENERATED_ArkUIContextMenuAccessor ContextMenuAccessorImpl { @@ -19165,20 +19097,6 @@ namespace OHOS::Ace::NG::GeneratedModifier { struct GlobalScope_Profiler_inspectorPeer { virtual ~GlobalScope_Profiler_inspectorPeer() = default; }; - const GENERATED_ArkUIGlobalScope_inspectorAccessor* GetGlobalScope_inspectorAccessor() - { - static const GENERATED_ArkUIGlobalScope_inspectorAccessor GlobalScope_inspectorAccessorImpl { - GlobalScope_inspectorAccessor::DestroyPeerImpl, - GlobalScope_inspectorAccessor::GetInspectorNodesImpl, - GlobalScope_inspectorAccessor::GetInspectorNodeByIdImpl, - GlobalScope_inspectorAccessor::SetAppBgColorImpl, - }; - return &GlobalScope_inspectorAccessorImpl; - } - - struct GlobalScope_inspectorPeer { - virtual ~GlobalScope_inspectorPeer() = default; - }; const GENERATED_ArkUIAccessors* GENERATED_GetArkUIAccessors() { static const GENERATED_ArkUIAccessors accessorsImpl = { @@ -19237,7 +19155,6 @@ namespace OHOS::Ace::NG::GeneratedModifier { GetChildrenMainSizeAccessor, GetUICommonEventAccessor, GetGestureModifierAccessor, - GetGlobalScope_commonAccessor, GetContextMenuAccessor, GetCustomDialogControllerAccessor, GetLinearGradientAccessor, @@ -19336,7 +19253,6 @@ namespace OHOS::Ace::NG::GeneratedModifier { GetCustomSpanAccessor, GetLinearIndicatorControllerAccessor, GetGlobalScope_Profiler_inspectorAccessor, - GetGlobalScope_inspectorAccessor, }; return &accessorsImpl; } diff --git a/arkoala/loader/package.json b/arkoala/loader/package.json index ffa3afb895dfd2779feb0ff4e8163c7c04ef0fa2..0e9a7c7f88bff4cf061c88545b9e58f9da5c582e 100644 --- a/arkoala/loader/package.json +++ b/arkoala/loader/package.json @@ -18,28 +18,26 @@ "ets": "cd src/ets; ets-tsc", "test:hzvm:loader": "npm run compile:hzvm-host", "clean": "ets-tsc -b . --clean && rimraf build dist lib generated unmemoized", - "compile:node-test-host": "npm run gen-resources && npm run -C ../framework compile:native-node-host && ets-tsc -b ../extension-component && npm run ets && npm run compile:node-test", - "compile:node-test-host:unmemoizing": "npm run gen-resources && npm run unmemoize --prefix ../extension-component && npm run ets && ets-tsc -b tsconfig-unmemoize.json && npm run compile:node-test:unmemoizing", + "compile:node-test-host": "npm run -C ../framework compile:native-node-host && ets-tsc -b ../extension-component && npm run ets && npm run compile:node-test", + "compile:node-test-host:unmemoizing": "npm run unmemoize --prefix ../extension-component && npm run ets && ets-tsc -b tsconfig-unmemoize.json && npm run compile:node-test:unmemoizing", "compile:node-test": "WEBPACK_NO_MINIMIZE=true webpack --config webpack.config.node-test.js", "compile:node-test:unmemoizing": "WEBPACK_NO_MINIMIZE=true webpack --config webpack.config.node-test.js --env tsconfig=tsconfig-run-unmemoized.json --env unmemoized=unmemoized", "compile:node-test:unmemoizing:arkts": "bash ../external/incremental/tools/panda/arkts/arktsc --extension sts unmemoized/generated/ets/page.ts --arktsconfig arktsconfig-run-unmemoized.json", - "compile:perf-ets": "npm run plugins:compile && HOS_SDK_HOME='../ohos-sdk/ohos-sdk/HarmonyOS-NEXT-DB1/openharmony' npm run gen-resources && ets-tsc -p ../extension-component && npm run ets", + "compile:perf-ets": "npm run plugins:compile && ets-tsc -p ../extension-component && npm run ets", "compile:perf-node": "WEBPACK_NO_MINIMIZE=true webpack --config webpack.config.node-perf.js", "compile:web": "WEBPACK_NO_MINIMIZE=true webpack serve --open --config webpack.config.web.js", "pack:perf": "npm run compile:perf-ets && npm run compile:perf-node && webpack ./lib/index-perf.js && echo 'Packed to dist/main.js'", "run:perf-node": "npm run compile:perf-ets && npm run compile:perf-node && node --expose-gc ./lib/js/arkoala-perf-node.js", "run:web": "npm run compile:perf-ets && npm run compile:web", - "compile-gen-resources": "npm run --prefix ../ohos-sdk download; cd scripts; tsc gen-resources.ts --types node --target es6 --module commonjs; cd ..", - "gen-resources": "npm run compile-gen-resources && node ./scripts/gen-resources.js", - "compile:hzvm-host": "npm run gen-resources && npm run ets && npm run compile:hzvm", - "compile:hzvm-ohos": "npm run gen-resources && npm run ets && npm run compile:hzvm -- --env os=ohos --env arch=arm64", + "compile:hzvm-host": "npm run ets && npm run compile:hzvm", + "compile:hzvm-ohos": "npm run ets && npm run compile:hzvm -- --env os=ohos --env arch=arm64", "compile:hzvm": "WEBPACK_NO_MINIMIZE=true webpack --entry ./src/index.ts --config webpack.config.ark.js", "compile:hzvm-test": "WEBPACK_NO_MINIMIZE=true webpack --entry ./src/index.test.ts --config webpack.config.app.js", - "compile:test-ohos": "npm run gen-resources && npm run ets && npm run compile:hzvm-test -- --env os=ohos --env arch=arm64", + "compile:test-ohos": "npm run ets && npm run compile:hzvm-test -- --env os=ohos --env arch=arm64", "compile:hzvm-framework": "WEBPACK_NO_MINIMIZE=true webpack --config webpack.config.framework.js", "compile:framework-ohos": "npm run compile:hzvm-framework -- --env os=ohos --env arch=arm64", "compile:framework": "npm run compile:hzvm-framework", - "compile:perf-hzvm-ohos": "npm run gen-resources && npm run ets && npm run compile:perf-hzvm -- --env os=ohos --env arch=arm64", + "compile:perf-hzvm-ohos": "npm run ets && npm run compile:perf-hzvm -- --env os=ohos --env arch=arm64", "compile:perf-hzvm": "WEBPACK_NO_MINIMIZE=true webpack --entry ./src/index.perf.ts --config webpack.config.ark.js" }, "devDependencies": { diff --git a/arkoala/loader/src/ets/tsconfig.json b/arkoala/loader/src/ets/tsconfig.json index 101af63b49ce821350cc11b7b039983762b20d50..aac432cf2f5eb6854a84764eeed63c4f8f8aee48 100644 --- a/arkoala/loader/src/ets/tsconfig.json +++ b/arkoala/loader/src/ets/tsconfig.json @@ -8,7 +8,11 @@ { "transform": "@koalaui/ets-plugin/build/lib/src/ArkExpander.js", "destination": "../../generated/ets", - "arkui": "@koalaui/arkoala-arkui" + "arkui": "@koalaui/arkoala-arkui", + "applicationInfo": { + "bundleName": "com.example.trivial.application", + "moduleName": "entry" + } } ], "types": ["arkoala-runtime"], diff --git a/arkoala/loader/webpack.config.ark.js b/arkoala/loader/webpack.config.ark.js index 3e60676aa499ca3aaff6374eaa8d036b3d05ffa8..968befc0618b884ba4cac741896326eed57634e3 100644 --- a/arkoala/loader/webpack.config.ark.js +++ b/arkoala/loader/webpack.config.ark.js @@ -25,8 +25,6 @@ const ProvidePlugin = require("webpack").ProvidePlugin const minimize = !process.env.WEBPACK_NO_MINIMIZE -const RESOURCES_MODULE = path.resolve(path.join(__dirname, "./generated/ets/__resources.generated.ts")) - /** @returns {import("webpack").WebpackOptionsNormalized} */ const makeConfig = ({ os, arch }) => ({ target: "node", @@ -63,10 +61,6 @@ const makeConfig = ({ os, arch }) => ({ 'LOAD_NATIVE': `globalThis.requireNapi("ArkoalaNative", true)`, 'NATIVE_LIBRARY_NAME': `"ArkoalaNative"`, }), - new ProvidePlugin({ - "$r": [RESOURCES_MODULE, "$r"], - "$rawfile": [RESOURCES_MODULE, "$rawfile"] - }), { apply(compiler) { compiler.hooks.compilation.tap('OHOSCompilationHook', (compilation) => { diff --git a/arkoala/loader/webpack.config.base.js b/arkoala/loader/webpack.config.base.js index b6bc35d15d26d769d6ce186dff7209120934dc7e..4df463c96645abbd0d07a8c06e72c5f594f1624c 100644 --- a/arkoala/loader/webpack.config.base.js +++ b/arkoala/loader/webpack.config.base.js @@ -26,8 +26,6 @@ const ProvidePlugin = require("webpack").ProvidePlugin const minimize = !process.env.WEBPACK_NO_MINIMIZE const is_user_bridge = true -const RESOURCES_MODULE = path.resolve(path.join(__dirname, "./generated/ets/__resources.generated.ts")) - /** @returns {import("webpack").WebpackOptionsNormalized} */ const makeConfig = ({ os, arch }) => ({ target: "node", @@ -54,10 +52,6 @@ const makeConfig = ({ os, arch }) => ({ 'LOAD_NATIVE': is_user_bridge ? `globalThis.requireNapi("ArkoalaNative", true)` : `globalThis.requireNapi("arkoalanative_${os}_${arch}")`, 'NATIVE_LIBRARY_NAME': is_user_bridge ? `"ArkoalaNative"` : `"arkoalanative_${os}_${arch}"`, }), - new ProvidePlugin({ - "$r": [RESOURCES_MODULE, "$r"], - "$rawfile": [RESOURCES_MODULE, "$rawfile"] - }), ], mode: minimize ? "production" : "development", devtool: minimize ? false : "inline-source-map", diff --git a/arkoala/loader/webpack.config.node-perf.js b/arkoala/loader/webpack.config.node-perf.js index 93993fcb4e772487c58e3d8fe524b506fb9fb248..aee9f0bc65dbdc34ebd904196c68bb2bc035d77e 100644 --- a/arkoala/loader/webpack.config.node-perf.js +++ b/arkoala/loader/webpack.config.node-perf.js @@ -19,8 +19,6 @@ const DefinePlugin = require("webpack").DefinePlugin const ProvidePlugin = require("webpack").ProvidePlugin const minimize = !process.env.WEBPACK_NO_MINIMIZE -const RESOURCES_MODULE = path.resolve(path.join(__dirname, "./generated/ets/__resources.generated.ts")) - /** @returns {import("webpack").WebpackOptionsNormalized} */ const makeConfig = ({ os, arch }) => ({ target: "node", @@ -54,10 +52,6 @@ const makeConfig = ({ os, arch }) => ({ plugins: [ new DefinePlugin({ }), - new ProvidePlugin({ - "$r": [RESOURCES_MODULE, "$r"], - "$rawfile": [RESOURCES_MODULE, "$rawfile"] - }), ], mode: minimize ? "production" : "development", diff --git a/arkoala/loader/webpack.config.node-test.js b/arkoala/loader/webpack.config.node-test.js index b3b788852cb41848d3be99562e7f369bfa3be54f..1393a696de7ce62bea972a8c4dab3b8bc2c85378 100644 --- a/arkoala/loader/webpack.config.node-test.js +++ b/arkoala/loader/webpack.config.node-test.js @@ -21,8 +21,6 @@ const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin') const minimize = !process.env.WEBPACK_NO_MINIMIZE -const RESOURCES_MODULE = path.resolve(path.join(__dirname, "./generated/ets/__resources.generated.ts")) - /** @returns {import("webpack").WebpackOptionsNormalized} */ const makeConfig = ({ os, arch, tsconfig, unmemoized }) => ({ target: "node", @@ -72,10 +70,6 @@ const makeConfig = ({ os, arch, tsconfig, unmemoized }) => ({ 'NATIVE_LIBRARY_NAME': `"./ArkoalaNative_${os}_${arch}.node"`, "process.env.KOALAUI_SELF_PROFILE": "false", }), - new ProvidePlugin({ - "$r": [RESOURCES_MODULE, "$r"], - "$rawfile": [RESOURCES_MODULE, "$rawfile"] - }), ], mode: minimize ? "production" : "development", diff --git a/arkoala/loader/webpack.config.web.js b/arkoala/loader/webpack.config.web.js index 77f23b18850ad6d35692b97128d836f0a1058248..5f4c2c1a0e269b8e60b5fbfa338d887c74bca92f 100644 --- a/arkoala/loader/webpack.config.web.js +++ b/arkoala/loader/webpack.config.web.js @@ -19,8 +19,6 @@ const path = require("path") const DefinePlugin = require("webpack").DefinePlugin const ProvidePlugin = require("webpack").ProvidePlugin -const RESOURCES_MODULE = path.resolve(path.join(__dirname, "./generated/ets/__resources.generated.ts")) - /** @returns {import("webpack").WebpackOptionsNormalized} */ module.exports = { target: "web", @@ -51,10 +49,6 @@ module.exports = { plugins: [ new DefinePlugin({ }), - new ProvidePlugin({ - "$r": [RESOURCES_MODULE, "$r"], - "$rawfile": [RESOURCES_MODULE, "$rawfile"], - }), ], mode: "development",